Edit Site: Move show-icon-labels handling to specific edit-site call sites#77287
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the show-icon-labels preference styling by removing it from the shared @wordpress/admin-ui Page styles and re-scoping it to the specific edit-site header action areas that need it (Styles sidebar + Patterns page).
Changes:
- Removed
.show-icon-labelsheader-action button styling from@wordpress/admin-uiPage stylesheet. - Added edit-site scoped
.show-icon-labelsstyles for the Styles sidebar and Patterns page header actions. - Introduced per-callsite action wrapper class names to target the correct header action buttons.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/edit-site/src/components/sidebar-global-styles/style.scss | Adds edit-site scoped .show-icon-labels styling for Styles header actions. |
| packages/edit-site/src/components/sidebar-global-styles/index.js | Adds a class hook on the Styles header actions container. |
| packages/edit-site/src/components/page-patterns/style.scss | Adds edit-site scoped .show-icon-labels styling for Patterns header actions. |
| packages/edit-site/src/components/page-patterns/actions.js | Wraps Patterns actions in an HStack to provide a styling hook. |
| packages/admin-ui/src/page/style.scss | Removes the global .show-icon-labels header actions styling from admin-ui Page. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
What?
Follow up to #77088
This PR extracts the
show-icon-labelsclass handling from the shared/global location and moves it to the specific edit-site call sites that actually require it. This is a preparatory refactoring to simplify an upcoming larger change and ensure proper separation of concerns.Why?
How?
show-icon-labelsclass handling from admin-uishow-icon-labelsclass management to the two specific edit-site instances that depend on itTesting Instructions
Use of AI Tools
Used Claude Sonnet 4.6 to review the changes