Repository navigation
Close three gaps in the legacy screen bridge - #20591
Merged
Merged
Conversation
Keep the legacy table header alignment from 6.x alongside the adapter gap fixes and the relocated table width rule. Amp-Thread-ID: https://ampcode.com/threads/T-3bf9411b-4c7a-4d04-9d33-00f5aff10d7f Co-authored-by: Amp <amp@ampcode.com>
📚 Storybook previews@craftcms/ui — open Storybook Changed components: resources/js — open Storybook No changed components detected in this Storybook. |
[ci skip] Amp-Thread-ID: https://ampcode.com/threads/T-3bf9411b-4c7a-4d04-9d33-00f5aff10d7f Co-authored-by: Amp <amp@ampcode.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Three things a Craft 5 plugin screen got wrong when rendered through the v6 shell. Found while putting Feed Me through it; none of the fixes are plugin-specific.
Tabs.
LegacyTabsShimonly upgraded anchor tabs, so a screen whose tabs are page links fell through to a strip v6 has no styling for. It now splits by what the tabs are: all-anchor becomescraft-tabspanes, all-url becomes a labelled<nav>aroundcraft-nav-list, and a mixed set is left alone. The link case wanted a strip that is still a list — the APG tabs pattern describes in-page panels, socraft-nav-listgained anappearancerather thancraft-tabsgaining anhrefmode. A test asserts the strip keepsrole="listitem"and never claimstablist.Save controls. Craft 5 puts a full-page form's Save in
{% block actionButton %}andcp.twigstill carried that default, while the shell independently draws save controls in the content footer — so every bridged form had two.cp.twignow skips the default when the render is being collected for the shell (craft.cp.collectsScreenFragments()), and a screen that brings its own buttons teleports them into the footer'sprimary-actionslot, whereLayoutSlotOutletalready drops its fallback when the slot is filled.Tables. The
table.dataport had dropped two rules the legacy sheet carried —thead th { text-align: start }andth.thin— and kept the defaultborder-spacing, which showed the page between cells as a grid.Evidence
Tables — computed styles, Feed Me's feed list against the entries index:
.cp-table(entries index)thead thtext-aligncenterstartstartthead thbackgroundrgb(233, 238, 243)rgb(255, 255, 255)rgb(255, 255, 255)thead thheightborder-spacing2px0px0px1px transparent)1px oklab(… / 0.24)1px oklab(… / 0.24)tbody thweightThe new browser case, run against the stylesheet as it stands on
6.x:and on this branch:
Save controls — before,
/feed-me/feeds/newrenderedSave/Save & Continuein the header and a shellSavein the footer. After, one set, indiv.content-footer, and the relocateddata-actionbuttons still submit: clicking Save POSTs tofeed-me/feeds/newand comes back with field errors. A full-page form with no button override (Feed Me → Settings) renders exactly one Save, the shell's own.Suites
Each new case was run against the branch point first and seen to fail there.
🤖 Generated with Claude Code
https://claude.ai/code/session_01NjeigCjRgjTJpnhbvyrxv8