-
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
Edit Widgets: Settings toggle shows wrong icon when 'Show button text labels' is on #57646
Comments
Thanks for opening this! It is a bug, due to support for button text labels never having been implemented in the widgets editor. Now that it's a cross-editor preference it should be made to work correctly in this editor too. |
@karthick-murugan thanks for your PR at #68116 As @tellthemachines mentioned, the broader issue is that support for the The current mechanism to hide the SVG icons and display text is CSS-based, see the implementation in the gutenberg/packages/editor/src/components/header/style.scss Lines 121 to 134 in aecb645
I'm not saying that's ideal. I would prefer a more solid, programamtic, approach like the one you tried on #68116 but for now I'd think it's best to keep the implementation consistent and use the current CSS approach. A better, more solid, implementation should be considered in the context of the following dedicated issue: #61763 It's also worth noting that the implementation in the post editor and in the site editor is inconsistent. In the post editor, the Instead, in the site editor it's still added to the edit-site-layout element. I'll submit a PR shortly to start adding support for showIconLabels in the Widgets editor. |
@afercia - Thanks for the detailed explanation. In that case, can I close my PR? |
@karthick-murugan yes thanks. Feedback and thoughts on the alternative PR #68531 welcome. |
Description
In the Edit Widgets page, the Settings panel toggle button shows a wrong icon when 'Show button text labels' is on.
It appears the Edit Widgets page is a bit behind and maybe a little overlooked.
To start with, it should fullly support 'Show button text labels', like the two other editors.
Anyways, when 'Show button text labels' is enabled in the post editor, the widgets editor shows a wrong icon instead of text.
See:
https://github.com/WordPress/gutenberg/blame/302c1487c0298a75b4a0094e77ec87256f15ccdf/packages/interface/src/components/complementary-area/index.js#L190
I'm not sure why the Complementary area toggle is supposed to show the 'check' icon when
showIconLabels
is true. There's no apparent reason for that, unless I'm missing something. Cc @tellthemachinesIt seems to be there since #24304
I'm not even shure the other editors use the
ComplementaryArea
andComplementaryAreaToggle
this way.Step-by-step reproduction instructions
drawerRight
.Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: