Skip to content

Fix #57: default-expand My Plugins on first encounter#64

Open
lucasmendes-design wants to merge 1 commit into
trunkfrom
lucasmdo/default-expand-plugins-57
Open

Fix #57: default-expand My Plugins on first encounter#64
lucasmendes-design wants to merge 1 commit into
trunkfrom
lucasmdo/default-expand-plugins-57

Conversation

@lucasmendes-design
Copy link
Copy Markdown
Collaborator

Summary

  • Flip the first-encounter default for the My Plugins group from collapsed to expanded, so users immediately see what the grouping contains.
  • Other groups still default to collapsed.
  • All other state paths are unchanged: a user-driven collapse still persists per-tab via sessionStorage, and URL-based auto-expand still wins over both stored state and the new default.

Closes #57.

Implementation

Single-line behaviour change in decideInitialState: when no stored state and no URL auto-expand, return true for groupId === 'plugins', otherwise false. The existing plugins-only special case in grouping.js (customize button) made hardcoding the id here consistent with the existing style.

Header doc comment and __tests__/expand-collapse.test.js updated to match the new contract.

Test plan

  • Activate the plugin on a fresh tab, clear sessionStorage, reload /wp-admin/My Plugins group renders expanded on first paint.
  • Click the My Plugins toggle to collapse it, reload → group stays collapsed (stored state honored).
  • Open /wp-admin/ in a fresh tab → group default-expands again (sessionStorage is per-tab).
  • Navigate to a page belonging to a non-plugins group (if any are configured) → that group does not auto-expand; My Plugins still default-expands.
  • Navigate to a page whose slug matches a child of My Plugins → group expands as before (auto-expand path unchanged).

🤖 Generated with Claude Code

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>
@chriskmnds chriskmnds added the pending: Calypso-parity Not yet implemented on the Calypso side. label May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending: Calypso-parity Not yet implemented on the Calypso side.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default-expand My Plugins on first show

2 participants