Repository navigation
[6.x] Style legacy pagination, menu buttons, status dots and go links on bridged screens - #20576
Merged
Merged
Conversation
Twig screens rendered inside the Inertia shell lost several styles when the legacy CP stylesheet was dropped. Plugin screens such as the Webhooks activity log showed: - pagination links with no arrows - split menu buttons with no caret, misaligned within their button group - empty `go` links and status dots with no width - centered data table headers legacy.css now draws these within the legacy screen scope, using the UI token colors so they follow dark mode and forced colors. Icon-only menu buttons with no accessible name are now labeled "More actions". Craft.Slideout instances have their `$container` jQuery getter again, which plugin slideouts read; the duplicate getter on cp-screen slideouts is gone. Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-01a1bb52-1bc2-7562-8c0c-c85c057b73a4
[ci skip] Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-01a1bb52-1bc2-7562-8c0c-c85c057b73a4
Contributor
📚 Storybook previews@craftcms/ui — open Storybook No changed components detected in this Storybook. resources/js — open Storybook No changed components detected in this Storybook. |
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
Twig screens shown inside the Inertia shell lost these styles when the legacy CP stylesheet was dropped. Plugin screens such as the Webhooks activity log (craftcms/webhooks#102) show all of them:
.pagination .page-link.btngroup+.menubtn.menubtnaria-label="More actions"unless it has text,aria-label,aria-labelledbyortitlea.go.statusdots--c-color-*/--c-status-*token colorstable.data thCraft.Slideout#$containerundefined(onlyCpScreenSlideouthad it)All colors come from UI tokens, so the indicators follow dark mode and forced colors.
Evidence
6.xlegacyStyles.browser.test.ts:thtext-align iscenter, the.statuswidth is0px, and the split menu button is 2px offslideout.browser.test.ts:new Craft.Slideout(...).$containerisundefinedmenu-btn.test.ts: an empty.menubtnhasaria-labelnullvp test run legacyStyles.browser.test.ts slideout.browser.test.ts --project browser: 5 passedvp test run tests/menu-btn.test.ts(Garnish): 14 passed, and the full Garnish suite passed with 383 testsyii2-adapter, the activity table, pagination and Save split button render as described above in light mode, dark mode and forced colors.Related issues