Fix #55: lock group collapse while customize mode is active#66
Merged
Conversation
Users could collapse the My Plugins group via its chevron mid-reorder, stranding the customize session with no items visible — surfaced during May 2026 usability testing. Disable the group toggle <button> on enterCustomizer and re-enable it on exit. The chevron <span> forwards clicks via `toggle.click()`, which is a no-op on a disabled button, so it's neutralised for free. A marker class on the locked group drives a `cursor: not-allowed` + dimmed opacity rule on the chevron for a visible affordance cue. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
10 tasks
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.
Summary
Users could collapse the My Plugins group via its chevron mid-reorder, stranding the customize session with no items visible — surfaced during May 2026 usability testing.
This PR adopts the first option the issue proposes ("stay expanded, chevron disabled"):
<button>carries the native:disabledstate for the duration of the customize session — blocks both mouse and keyboard activation.<span>forwards its click viatoggle.click(), which is a no-op against a disabled button, so it's neutralised for free.wp-admin-sidebar-group--reorder-locked) on the locked group drives acursor: not-allowed+ dimmed-opacity rule on the chevron so the affordance reads as inactive.Closes #55.
Implementation
All changes piggyback on
expandGroupsForCustomizing()— the existing function that force-expands reassignable groups on enter and pairs entry-decoration with a restorer. Lock + visual marker are applied alongside the force-expand; the restorer re-enables the toggle before running the existing click-to-restore logic (otherwise the click would be swallowed and the group would be stranded in its forced state).CSS lives in
customizer.cssnext to the other customize-mode-scoped rules. Opacity dim matches the existing.wp-admin-sidebar-group__customize:disabledtreatment.No behaviour change outside customize mode.
Test plan
not-allowed, chevron opacity drops to ~0.4.🤖 Generated with Claude Code