Fix #57: default-expand My Plugins on first encounter#64
Open
lucasmendes-design wants to merge 1 commit into
Open
Fix #57: default-expand My Plugins on first encounter#64lucasmendes-design wants to merge 1 commit into
lucasmendes-design wants to merge 1 commit into
Conversation
Per usability testing: users couldn't immediately tell what the grouping contained when the My Plugins group started collapsed. Default it to expanded on first paint (no stored state) so the contents are visible right away. Manual collapse still wins via sessionStorage. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Closes #57.
Implementation
Single-line behaviour change in
decideInitialState: when no stored state and no URL auto-expand, returntrueforgroupId === 'plugins', otherwisefalse. The existingplugins-only special case ingrouping.js(customize button) made hardcoding the id here consistent with the existing style.Header doc comment and
__tests__/expand-collapse.test.jsupdated to match the new contract.Test plan
/wp-admin/→ My Plugins group renders expanded on first paint./wp-admin/in a fresh tab → group default-expands again (sessionStorage is per-tab).🤖 Generated with Claude Code