-
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
Eliminate 'isEditing' mode from PaletteEdit component #45657
Conversation
…or paletts are being edited they are always 'editable'
Open in CodeSandbox Web Editor | VS Code | VS Code Insiders |
Size Change: -66 B (0%) Total Size: 1.29 MB
ℹ️ View Unchanged
|
This is a nice change and it's working well for me, from a usability perspective (I didn't test keyboard navigation, will try that in a moment): test.how.color.palettes.are.edited.movIt does change the UI a bit since, since the editable view of the color palettes are all expanded by default. FWIW I am still a fan of this approach more, because it feels more directly manipulative. Pinging @jasmussen for a check here. |
I prefer the approach in #45681, since it allows you to switch between two views. |
Thanks for the ping. This does need a lot of love as it's a bit fiddly and hard to glean what's going on. This editing affordance is also coming up in similar fashions in #45271, and #44417 (comment), and the short of it seems that it does make sense to simplify the flow, but we need some more context to tell you that yes, you are in fact editing now. In that light, I would echo Ben, that 45681 may be a better initial direction. Thanks for the PR! |
What?
Eliminate 'isEditing' flag for PaletteEdit component so that when color paletts are being edited they are always 'editable'
Why?
Addresses #44138
Rather than making the "non-editing" mode of the color palette open the edit state this change makes the color
PaletteEdit
item always in edit mode. Thus clicking on the color palette list item will open the color editor as expected. Additionally for custom color items the name can be changed.How?
The change is accomplished by removing the
isEditing
flag from the component and no longer switching behavior based on that value.Testing Instructions
Open the Site Editor with a theme activated that has color palette values defined.
Navigate to the Global Styles Panel > Colors > Palette
Note that the 'edit' menu item has been eliminated from all three color items (Theme, Global, Custom) as well as gradient items.
Click on any of the color or gradient list items and note that the color picker is shown.
Note the absence of the 'Done' link.
Screenshots or screencast
Before:
After:
cc @WordPress/block-themers