[6.x] Render the legacy slideout action menu as a craft-action-menu - #19801
Merged
Merged
Conversation
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>
📚 Storybook previews@craftcms/ui — open Storybook No changed components detected in this Storybook. resources/js — open Storybook No changed components detected in this Storybook. |
brianjhanson
approved these changes
Oct 3, 2026
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
The legacy
Craft.CpScreenSlideoutheader 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 calleddisclosureMenu().The slideout payload's
actionMenuis now a<craft-action-menu>, rendered by theActionMenuview component, so it brings its own invoker:CpScreenResponseand the Yii adapter'sCpScreenResponseFormatterrender the slideout's action menu withActionMenu::make()->menuItems(). Item collection and rendering still share oneInputNamespace::namespaceInputs()closure, so item IDs match the JS the items register against them.CpScreenSlideoutinserts the menu as-is, dropping the hand-built trigger, hidden label, anddisclosureMenu()setup. That also stops a stray label being left behind on each reload.Preview.js) reads the sameelements/editpayload, 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 withclosest('[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