Repository navigation
Global Styles: Add icons and tweak styling for element and block buttons - #85363
Conversation
🤖 PR meta 🤖🎉 PropsUnlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @jinaparekh14. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. 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. Updated as activity occurs, without notifying anyone named here. Add the 📦 Bundle sizeSize Change: +2.1 kB (+0.02%) Total Size: 9.05 MB 📦 View Changed
⚡ PerformanceShow the resultsClient side metrics exclude the server response time. front-end-block-theme
front-end-classic-theme
media-processing
media-upload
post-editor
site-editor
🏁 Flaky testsSome tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information. Regression: updating a specific option will only change its value and will not corrupt others in
|
ramonjd
left a comment
There was a problem hiding this comment.
Thanks, this is looking much better
| Styles | In Editor | Filtered |
|---|---|---|
![]() |
![]() |
![]() |
Will let @jasmussen et. al, have the final say 😄
Not a blocker:
One thing that stood out was the usage of the caption icon for citation.
Maybe it's because they're sitting next to each other in the list. Would quote be a better fit?
4684d06 to
ec13541
Compare
|
Thanks for the quick review @ramonjd!
I'll leave this PR open so we can see what @jasmussen or others think, but yes, sounds like it might be worth trying one of the others for citation. My only concern is that the Quote icon might make it look like it's for styling the whole quote, though it does look neater:
I haven't pushed the above just yet (so this PR is still with the duplicate icons), but happy to go whichever way folks like! |
|
Thanks both, FAST WORK! I agree caption and citation having the same icon is a challenge. But that challenge is the meta challenge we have, of designing an icon for every block and every element. For example initially I designed a different button for the "form button", and I wanted to design a different link icon for the link element (because the link icon means "make hyperlink"). The choices to go with icons that exist were not because they were necessarily ideal, but because I am unsure the alternative is better. If you all prefer the quote icon over the caption icon for citations, we can do that. I would still consider it situational—that we still might follow up and either design bespoke icons, or reconsider which icon to use. In that vein, this is an iteration, go with the preference you have! Thanks. |
mikachan
left a comment
There was a problem hiding this comment.
Thanks @andrewserong! This is testing well for me, and the code changes look good.
I'd agree with @jasmussen on the citation icon, in that we can follow up with a change of icon/s if we want to. My vote would be to bring this in as it is and tweak the icons after.
| { hasBlockResults && ( | ||
| <ListGroup title={ __( 'Blocks' ) }> | ||
| <div | ||
| <ItemGroup |
Test ReportPatch tested: #85363 Environment
Steps taken
Expected result
All of the above confirmed ✅ Additional Notes
Screenshots with results
Support Content
|
|
Thanks for the discussion and reviews, everyone! I'll merge this in as-is and we can follow-up with new or different icons further down the track if and when we'd like to. Cheers! 🙇 |
|
There was a conflict while trying to cherry-pick the commit to the wp/7.2 branch. Please resolve the conflict manually and create a PR to the wp/7.2 branch. PRs to wp/7.2 are similar to PRs to trunk, but you should base your PR on the wp/7.2 branch instead of trunk. |
…ons (#85363) (#85414) * Global Styles: Add icons and tweak styling for element and blocks buttons in global styles * Update changelog * Make sure the comment is in the right place Unlinked contributors: jinaparekh14. Co-authored-by: ramonjd <ramonopoly@git.wordpress.org> Co-authored-by: mikachan <mikachan@git.wordpress.org> Co-authored-by: jasmussen <joen@git.wordpress.org> Co-authored-by: andrewserong <andrewserong@git.wordpress.org>
|
Backported to the |
This updates the pinned commit hash of the Gutenberg repository from `be6a50be6834e922b9db12c75c9a2cd817b2db59` to `d72020a651eda64dcc53b5dbd5b9d5bd511c4cc9` (version 24.3.0-rc.1). A full list of changes included in this commit can be found on GitHub: WordPress/gutenberg@be6a50b...d72020a - BorderControl: Remove double focus outline (WordPress/gutenberg#85173) - Snackbar: Use design system focus ring (WordPress/gutenberg#85168) - SelectControl: Fix default options showing the `Select` placeholder (WordPress/gutenberg#85172) - Actions API: Remove the unsupported `single` action context (WordPress/gutenberg#85186) - Client-side media: Upgrade wasm-vips to 0.0.19 and raise memory budgets accordingly (WordPress/gutenberg#84980) - Styles: Fix inconsistent 'Elements' tools panel heading level (WordPress/gutenberg#85247) - `media-utils`/MediaEdit: use design system focus ring (WordPress/gutenberg#84940) - Icons: Add new form based icons. (WordPress/gutenberg#84074) (WordPress/gutenberg#85360) - Navigation: keep custom CSS off inner list containers (WordPress/gutenberg#84881) (WordPress/gutenberg#85367) - Navigation: keep Global Styles custom CSS off inner list containers (WordPress/gutenberg#85366) - Edit as HTML: Show design system focus ring on the HTML textarea (WordPress/gutenberg#85266) (WordPress/gutenberg#85359) - Icons: Restore the missing speech bubble in postComments (WordPress/gutenberg#85275) - Block Directory: Standardize downloadable block focus indicators (WordPress/gutenberg#85307) - Global Styles: Add icons and tweak styling for element and block buttons (WordPress/gutenberg#85363) (WordPress/gutenberg#85414) - Tests: Stop asserting Core lacks the core fields functions (WordPress/gutenberg#85201) - Meta Boxes: Use the design system focus ring for the panel toggle (WordPress/gutenberg#85355) (WordPress/gutenberg#85410) - DataViews: Use the design system focus ring for list items. (WordPress/gutenberg#85358) (WordPress/gutenberg#85435) - Components: Standardize checkbox and radio focus outlines (WordPress/gutenberg#85379) (WordPress/gutenberg#85436) - UI: Use solid brand highlights for popup items (WordPress/gutenberg#84087) - Media: Preserve EXIF metadata when converting HEIC to JPEG client-side (WordPress/gutenberg#82040) - Icons: Add error, info and postComments to the core-admin collection (WordPress/gutenberg#85452) - UnitControl: Use the design system outline for the unit select focus ring (WordPress/gutenberg#85444) - Page List: Keep pages visible in the Navigation sidebar in contentOnly (WordPress/gutenberg#85357) - Icons: Add new asterisk icon (WordPress/gutenberg#85442) (WordPress/gutenberg#85498) - wp-env: Keep Debian security updates in Bullseye-based images (WordPress/gutenberg#85469) - Editor: Guard entity preload filters and share entity actions/fields logic (WordPress/gutenberg#85390) (WordPress/gutenberg#85499) - UI: Scale Spinner stroke width with its size (WordPress/gutenberg#85378) - [WP 7.2] Fix the block-library TypeScript test project (WordPress/gutenberg#85533) - Editor: Vertically center the Categories loading spinner (WordPress/gutenberg#85563) - DataViews: Render table bulk actions outside the table (WordPress/gutenberg#85250) (WordPress/gutenberg#85571) - Record e2e traces only when a failed test is retried (WordPress/gutenberg#85428) - Writing flow: fix triple click in a list item selecting the next item (WordPress/gutenberg#85569) - Build: Limit concurrent wp-build builds (WordPress/gutenberg#79889) - Icons: Promote Dashicon replacements to `core-admin` and map their Dashicons (WordPress/gutenberg#85541) Props peterwilsoncc, mamaduka. See #66340 git-svn-id: https://develop.svn.wordpress.org/trunk@64796 602fd350-edb4-49c9-b593-d223f7449a82
This updates the pinned commit hash of the Gutenberg repository from `be6a50be6834e922b9db12c75c9a2cd817b2db59` to `d72020a651eda64dcc53b5dbd5b9d5bd511c4cc9` (version 24.3.0-rc.1). A full list of changes included in this commit can be found on GitHub: WordPress/gutenberg@be6a50b...d72020a - BorderControl: Remove double focus outline (WordPress/gutenberg#85173) - Snackbar: Use design system focus ring (WordPress/gutenberg#85168) - SelectControl: Fix default options showing the `Select` placeholder (WordPress/gutenberg#85172) - Actions API: Remove the unsupported `single` action context (WordPress/gutenberg#85186) - Client-side media: Upgrade wasm-vips to 0.0.19 and raise memory budgets accordingly (WordPress/gutenberg#84980) - Styles: Fix inconsistent 'Elements' tools panel heading level (WordPress/gutenberg#85247) - `media-utils`/MediaEdit: use design system focus ring (WordPress/gutenberg#84940) - Icons: Add new form based icons. (WordPress/gutenberg#84074) (WordPress/gutenberg#85360) - Navigation: keep custom CSS off inner list containers (WordPress/gutenberg#84881) (WordPress/gutenberg#85367) - Navigation: keep Global Styles custom CSS off inner list containers (WordPress/gutenberg#85366) - Edit as HTML: Show design system focus ring on the HTML textarea (WordPress/gutenberg#85266) (WordPress/gutenberg#85359) - Icons: Restore the missing speech bubble in postComments (WordPress/gutenberg#85275) - Block Directory: Standardize downloadable block focus indicators (WordPress/gutenberg#85307) - Global Styles: Add icons and tweak styling for element and block buttons (WordPress/gutenberg#85363) (WordPress/gutenberg#85414) - Tests: Stop asserting Core lacks the core fields functions (WordPress/gutenberg#85201) - Meta Boxes: Use the design system focus ring for the panel toggle (WordPress/gutenberg#85355) (WordPress/gutenberg#85410) - DataViews: Use the design system focus ring for list items. (WordPress/gutenberg#85358) (WordPress/gutenberg#85435) - Components: Standardize checkbox and radio focus outlines (WordPress/gutenberg#85379) (WordPress/gutenberg#85436) - UI: Use solid brand highlights for popup items (WordPress/gutenberg#84087) - Media: Preserve EXIF metadata when converting HEIC to JPEG client-side (WordPress/gutenberg#82040) - Icons: Add error, info and postComments to the core-admin collection (WordPress/gutenberg#85452) - UnitControl: Use the design system outline for the unit select focus ring (WordPress/gutenberg#85444) - Page List: Keep pages visible in the Navigation sidebar in contentOnly (WordPress/gutenberg#85357) - Icons: Add new asterisk icon (WordPress/gutenberg#85442) (WordPress/gutenberg#85498) - wp-env: Keep Debian security updates in Bullseye-based images (WordPress/gutenberg#85469) - Editor: Guard entity preload filters and share entity actions/fields logic (WordPress/gutenberg#85390) (WordPress/gutenberg#85499) - UI: Scale Spinner stroke width with its size (WordPress/gutenberg#85378) - [WP 7.2] Fix the block-library TypeScript test project (WordPress/gutenberg#85533) - Editor: Vertically center the Categories loading spinner (WordPress/gutenberg#85563) - DataViews: Render table bulk actions outside the table (WordPress/gutenberg#85250) (WordPress/gutenberg#85571) - Record e2e traces only when a failed test is retried (WordPress/gutenberg#85428) - Writing flow: fix triple click in a list item selecting the next item (WordPress/gutenberg#85569) - Build: Limit concurrent wp-build builds (WordPress/gutenberg#79889) - Icons: Promote Dashicon replacements to `core-admin` and map their Dashicons (WordPress/gutenberg#85541) Props peterwilsoncc, mamaduka. See #66340 Built from https://develop.svn.wordpress.org/trunk@64796 git-svn-id: http://core.svn.wordpress.org/trunk@63946 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The block list's rows are inset 4px since #85363. The bordered override list already sits inside the screen padding, so it drops the inset.
The block list's rows are inset 4px since #85363. The bordered override list already sits inside the screen padding, so it drops the inset.
The block list's rows are inset 4px since #85363. The bordered override list already sits inside the screen padding, so it drops the inset.
…ons (#85363) * Global Styles: Add icons and tweak styling for element and blocks buttons in global styles * Update changelog * Make sure the comment is in the right place Unlinked contributors: jinaparekh14. Co-authored-by: andrewserong <andrewserong@git.wordpress.org> Co-authored-by: ramonjd <ramonopoly@git.wordpress.org> Co-authored-by: mikachan <mikachan@git.wordpress.org> Co-authored-by: jasmussen <joen@git.wordpress.org>
The block list's rows are inset 4px since #85363. The bordered override list already sits inside the screen padding, so it drops the inset.

















What?
Follow-up to #81645, trying out these suggestions: #81645 (comment)
In Global Styles, #81645 combined elements with blocks in the big list of things that a user can style. This PR adds icons to the elements buttons, and tweaks the styling across both elements and blocks so that they share the same dimensions and spacing.
Why?
To make the look and feel of the list consistent across elements and blocks. This particular screen is a filterable and searchable collection of items, so (hopefully) it'll look a bit more balanced if every clickable item is of a similar size and shape.
I went with the compact form of these buttons to more closely match how the list view displays this kind of list of items, but happy to tweak the spacing and size further if this looks off.
How?
ItemGroups for both the elements and blocks so that they look consistentsmallvariant so that the icons line up, and so that we can fit more items in a single page view to reduce how far a user needs to scroll (keeping things compact)Form inputinstead ofinput, etc)Testing Instructions
trunkthe elements buttons were a bit misaligned and looked different visually to the block buttonsQuestions for the reviewer
Screenshots or screencast
Use of AI Tools
Claude Code (Opus 5.5)