Skip to content

[6.x] Render the legacy slideout action menu as a craft-action-menu - #19801

Merged
brandonkelly merged 1 commit into
6.xfrom
slideout-craft-action-menu
Oct 3, 2026
Merged

brandonkelly merged 1 commit into
6.xfrom
slideout-craft-action-menu

Conversation

@brandonkelly

Copy link
Copy Markdown
Member

Description

The legacy Craft.CpScreenSlideout header was the last place building an action menu as a jQuery disclosure menu. The server sent the menu as disclosure markup (withButton: false), and the client built a trigger button for it and called disclosureMenu().

The slideout payload's actionMenu is now a <craft-action-menu>, rendered by the ActionMenu view component, so it brings its own invoker:

  • CpScreenResponse and the Yii adapter's CpScreenResponseFormatter render the slideout's action menu with ActionMenu::make()->menuItems(). Item collection and rendering still share one InputNamespace::namespaceInputs() closure, so item IDs match the JS the items register against them.
  • CpScreenSlideout inserts the menu as-is, dropping the hand-built trigger, hidden label, and disclosureMenu() setup. That also stops a stray label being left behind on each reload.
  • Live Preview's standalone editor header (Preview.js) reads the same elements/edit payload, so it gets the same treatment.

Because disclosure menus get moved to the <body>, the slideout's menu items used to sit outside the slideout. With <craft-action-menu>, they stay inside it, so item JS can find its slideout with closest('[data-slideout]'). The 5.x fix for #19791 relies on that when it's merged into 6.x.

Full-page screens' action menus (cp.twig) are unchanged.

Related issues

🤖 Generated with Claude Code

CpScreenSlideout was still building its header action menu as a jQuery
disclosure menu. The slideout payload now renders the menu with the
ActionMenu view component, and the slideout (and Live Preview's standalone
editor header) insert it as-is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown

📚 Storybook previews

@craftcms/ui — open Storybook

No changed components detected in this Storybook.

resources/js — open Storybook

No changed components detected in this Storybook.

@brandonkelly
brandonkelly merged commit b288365 into 6.x Oct 3, 2026
20 checks passed
@brandonkelly
brandonkelly deleted the slideout-craft-action-menu branch October 3, 2026 15:10
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.

2 participants