Skip to content
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/Filters: Presets only in block toolbar, advanced filtering in inspector #39452

Open
jasmussen opened this issue Mar 15, 2022 · 2 comments
Labels
[Block] Image Affects the Image Block [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi Needs Design Feedback Needs general design feedback. [Type] Enhancement A suggestion for improvement.

Comments

@jasmussen
Copy link
Contributor

jasmussen commented Mar 15, 2022

This ticket extracts and builds upon initial work in #38556 (comment).

There are some issues with the Duotone filter dropdown, mainly that it covers content. For simplicity, we could change the block toolbar to only show duotone/filter presets, giving trivial access without covering the image:

Presets toolbar

Note a suggested new Filter icon for the toolbar.

We would still need (as tracked in #38556) an explicit button to toggle off a filter, for example when a theme has set a duotone filter by default:

Explicit none

When a theme sets a default duotone, how should the "Clear" button work? With an explicit "no filter" button, and the theme's intent of showing images duotoned by default, arguably it should reset the image to theme defaults. But we should make that clearer. In this case, the image was explicitly set to "no filter", and clearing reverts to the red/blue theme default:

Clearing

Shown also, the ability to select the filter palette from the dropdown.

How would you customize a duotone filter? To be able to customize duotone presets in Global Styles, there needs to be an inspector interface regardless (#34574), and in that vein, it makes sense to use the same interface here:

Customize duotone

A flyout is used when in the Post Editor context, as the block inspector doesn't use a drilldown, but the contents of the flyout is the same as the panel in Global Styles:

Global styles

At some point in the future, we'd want to consider new filters, and even let you combine multiple, such as duotone plus dithering. Inspired by #39427 from @javierarce, this uses a similar ItemGroup based layer interface:

Additional filters

See also:

@ajlende
Copy link
Contributor

ajlende commented Feb 20, 2023

Since there are some accessibility issues with completely replacing the toolbar, maybe we could do something like this for the time being when the detailed controls move to the sidebar.

Presets toolbar

The goal of replacing the toolbar was to not obscure the image so you could see the filter being applied fully. Removing the custom filter makes the dropdown a little smaller to help a little bit. And updating the copy for the clear button, I think, is also a small improvement.

@jasmussen
Copy link
Contributor Author

We can probably skip the inline buttons in the toolbar for now, yes. They seem valuable to me still, but if it's onerous to implement the value proposition may not be that clear.

I still think it's valuable to surface them in the inspector 👍 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Image Affects the Image Block [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi Needs Design Feedback Needs general design feedback. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants