-
Notifications
You must be signed in to change notification settings - Fork 18
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
Duotone: Try moving to the block toolbar #145
Comments
@joen I could use some guidance on the duotone toolbar UI. It's pushed up under the add/duotone-filter branch if you wanted to play around with it. I figured it would be better to wait for the Gutenberg RC to come out before opening a PR so people don't get too excited too soon and so it's open when they will be less distracted by getting a release out the door. The base layout seems fine. And I haven't finished the keyboard interactions yet, but I was planning on having the arrow keys to navigate around the dropdown since we're within the context of a toolbar. Where it starts getting tricky is with the custom color palette. I made the dark and light color buttons to expand to show the color picker underneath. It still needs an expandable indicator, the button should probably be 100% width, the clear button needs to be hidden, and I need to add arrow key navigation since it's within a toolbar. I haven't gone that far with it because I'm starting to think this isn't the right way to go. Then things start getting really gnarly when you add on the custom color picker as another popover on top of the existing popover. This part would need a good bit of rework for keyboard interaction. And the additional popover seems messy. The text color toolbar works like this right now, but keyboard navigation is also currently broken there (see WordPress/gutenberg#26115 and WordPress/gutenberg#26114) With the amount of rework needed to get this going, do you think it would be better to start with this in the sidebar and do another pass to get it in the toolbar? I like having it in the toolbar, but there's just too many accessibility issues with doing that right now. The toolbar interaction for all color/gradient pickers could really use a redesign instead of trying to use what we have in the sidebar in a toolbar context where it doesn't work. We can do better than popovers on popovers on popovers and make it easier to use. |
Thanks so much both for the effort moving to the toolbar, and for the exhaustive writeup. It's very clear from those notes that what we need here is a much better color component, that works whether in the sidebar or otherwise. I still think that the block toolbar is the correct place for this control. It's a better experience, and it surfaces much more visibly and intuitively just what a cool feature this is, so I don't think we should move it back to the sidebar to ship it earlier, despite how excited I am about the feature. Some thoughts:
But to frame it differently, the long view is a substantially improved color picker component. What's the near view? |
Done! |
I've been tinkering with some mockups that move the duotone feature to the block toolbar of the image block. I'm picturing this — when you click the "Edit image" button that currently has a crop icon:
You get a new button in that mode, Duotone:
And when you pick one of the presets (and those presets should include some really nice black and white filters), you get a duotone image:
The above mockups go a bit further with some ideas I've been toying with for general image tools enhancements. Please ignore those.
CC: @ajlende
The text was updated successfully, but these errors were encountered: