-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for the Show button text labels preference to the Widgets editor #68531
base: trunk
Are you sure you want to change the base?
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 9967e3e. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12672153291
|
4468263
to
9967e3e
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
showIconLabels
wasn'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
showIconLabels
is 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?
showIconLabels
by using the CSS_based approach in use in the other editors.showIconLabels
is 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
showIconLabels
is enabled in the Widgets editor compared with the one in the Post editor:Widgets editor:
Post editor: