-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add reset/clear to the group block background image control #54319
Comments
I wrote a comment regarding this and posted it in the related issue: #46859 (comment) |
Thanks for opening this Rich! I'll look into a follow-up. |
We probably need to consider both clear and reset: – Clear removes the image, IE If a background image is applied globally and locally, then its conceivable that there should be separate clear/reset actions when editing in the local context. |
I wouldn't think this would be common (or likely even?). |
Or perhaps "Remove" covers both bases. It removed this application of image (or even color, font, duotone, etc). It just falls back to whatever is in global styles, not background-image: none, just like color does. |
Probably not common, but if it is made possible to add a background image globally then we need to consider it. A single "Remove" could work. First click would reset to global default, a second click would effectively set I figured it'd make sense to plot the patterns proposed in #49278 against this use case and here's what we get: I reckon this works well, though I acknowledge we're not quite ready to implement it yet. |
I don't think it should tbh. "Reset" and "Clear" are similar enough that most folks won't understand the nuance here (we use both inconsistently already). And that exposes functionality we don't support elsewhere — i.e. if you set a background color to the group block, you can't simply "remove" that color in the editor. |
Good discussion, folks! Over in #54341 the proposed code change is to clear out the local background image via the Reset menu item, but without imposing any |
And just to be clear (pun unintended, but welcomed), that's with a proposed label of "Reset"? |
I just realised I used the word "clear" in my sentence, too! 😆 Yes, that PR is with the proposed label of "Reset" 🙂 |
Then we should make that nuance clearer (continuing the pun). If you've added a background image to a group locally then these are both valid actions:
We could make it sequential, IE the first "reset" resets to the global default, and a subsequent "reset" sets background-image: none. I'm not a big fan because removing takes so many more clicks, but it's an option. Alternatively the labels could be more explicit. Perhaps "Reset to default" (which is only available when there is a default) and "Remove"?
Color is a bit different because you can effectively 'remove' a background color by setting the transparency to 0. I suppose you could upload a transparent background image to fudge |
I agree with @jameskoster's comment on resetting. I expected to find the "Reset" control within the new group block's background image panel. You can reset it within the tools panel, but it feels necessary (and familiar, i.e. the Site Logo block) to have it here.
Another note (related to #53997), we should consistent on "Clear" vs. "Reset".
We're using "Clear" within the color palette popover, but "Reset" within the tools panel. Same follows for the Cover block's "Clear media" button.
Current:
Expected:
The text was updated successfully, but these errors were encountered: