You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The show button text label feature should not rely on a global classname #46025
If you toggle the "show button text label" feature, a classname "show-icon-labels" is added as a top level element of the editors and components from the "block-editor" package check the presence of a global classname to trigger or not text labels on icon buttons.
I see two issues with this approach:
The classname is not an actual API, it could be considered but I think it's not ideal.
Performance could be impacted since changing a global classname re-renders all components that are children of the root component where the classname is applied.
Potential approaches:
Adding a showIconLabels prop to UI components like BlockToolbar...
or Adding a showIconLabels setting to the BlockEditorProvider settings prop.
I think I prefer the first approach if possible but the second is ok too.
Step-by-step reproduction instructions
Trigger the "show button text labels" option in the preferences modal.
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.
Activity