Add support for the Show button text labels preference to the Widgets editor#68531
Add support for the Show button text labels preference to the Widgets editor#68531
Conversation
|
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. |
|
Size Change: +429 B (+0.02%) Total Size: 1.84 MB
ℹ️ View Unchanged
|
|
Regarding the unexpected icon reported in the original issue, I'm not sure I understand why the To my understanding, the current CSS-based implementation expects the buttons to have a This PR doesn't make any change to |
|
Flaky tests detected in 55b5792. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/13201810266
|
4468263 to
9967e3e
Compare
37babb8 to
55b5792
Compare
55b5792 to
31e5a6b
Compare
31e5a6b to
9bbd91e
Compare

Fixes #57646
What?
Apparently, support for the 'Show button text labels' preference was never implemented in the Widgets editor.
The Poist, Site, and Widgets editors used to have separate preferences stores. The Widgets editor never had an UI to set this preference so the lack of support for
showIconLabelswasn't a huge problem. However, now that it's a cross-editor preference, thje lack of suppor tin the Widgets editor is evident and also leads to issues like displaying a wrong icon as reported in #57646.Why?
As
showIconLabelsis now a cross-editor preference, it should work in all editors.Also, displaying a 'check` icon for the Settings toggle button should be prevented. (More on this in a separate comment).
How?
showIconLabelsby using the CSS_based approach in use in the other editors.showIconLabelsis true, for consistency with the other editors.Testing Instructions
window.wp.data.dispatch( 'core/preferences' ).set( 'core', 'showIconLabels', true );Testing Instructions for Keyboard
Screenshots or screencast
Animated GIF to illustrate the preference in action:
The styling of the buttons when
showIconLabelsis enabled in the Widgets editor compared with the one in the Post editor:Widgets editor:
Post editor: