Skip to content

[6.x] Style legacy pagination, menu buttons, status dots and go links on bridged screens - #20576

Merged
riasvdv merged 2 commits into
6.xfrom
bugfix/legacy-screen-gaps
Nov 10, 2026
Merged

riasvdv merged 2 commits into
6.xfrom
bugfix/legacy-screen-gaps

Conversation

@riasvdv

@riasvdv riasvdv commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

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:

On legacy screens Before After
.pagination .page-link empty boxes, no arrows 32px buttons with chevrons, flipped in RTL
.btngroup + .menubtn no caret, split button 2px out of line joined split button with a caret
Icon-only .menubtn no accessible name aria-label="More actions" unless it has text, aria-label, aria-labelledby or title
Empty a.go 0px wide arrow in a 24×24 target
.status dots 0px wide 12px dots in the --c-color-* / --c-status-* token colors
table.data th centered start-aligned
Craft.Slideout#$container undefined (only CpScreenSlideout had it) jQuery wrapper on the base class
legacy.css                @scope (.cp-legacy-screen) { th, .status, .go, .btngroup, .menubtn::after, .pagination }
garnish/menu-btn.ts       init(): name icon-only buttons "More actions"
slideout/slideout.ts      get $container()  ← moved up from cp-screen-slideout.ts

All colors come from UI tokens, so the indicators follow dark mode and forced colors.

Evidence

  • Before: the new tests fail on 6.x
    • legacyStyles.browser.test.ts: th text-align is center, the .status width is 0px, and the split menu button is 2px off
    • slideout.browser.test.ts: new Craft.Slideout(...).$container is undefined
    • menu-btn.test.ts: an empty .menubtn has aria-label null
  • After: they pass
    • vp test run legacyStyles.browser.test.ts slideout.browser.test.ts --project browser: 5 passed
    • vp test run tests/menu-btn.test.ts (Garnish): 14 passed, and the full Garnish suite passed with 383 tests
  • On a Craft 6 host with the Webhooks plugin through yii2-adapter, the activity table, pagination and Save split button render as described above in light mode, dark mode and forced colors.

Related issues

riasvdv and others added 2 commits November 10, 2026 16:28
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
@github-actions

Copy link
Copy Markdown
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.

@riasvdv
riasvdv merged commit 6071b97 into 6.x Nov 10, 2026
@riasvdv
riasvdv deleted the bugfix/legacy-screen-gaps branch November 10, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant