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

Cover: Allow creating the block with only color/gradient backgrounds (without an image) #2275

Closed
pinarol opened this issue May 20, 2020 · 4 comments
Assignees
Labels
good first issue Good for newcomers [Status] Needs Design [Type] Enhancement Improves a current area of the editor

Comments

@pinarol
Copy link
Contributor

pinarol commented May 20, 2020

There's no way to create a color/gradient background for Cover blocks on mobile. We can render this if it is set on web but there's no way to create one. On web, this can be created with the options on the Placeholder:

Screen Shot 2020-05-20 at 12 47 36

There's also no way to remove the image once you set it, same on web.

How do you think we should do this on mobile? @iamthomasbishop

@pinarol pinarol added the [Type] Enhancement Improves a current area of the editor label May 20, 2020
@pinarol pinarol changed the title Cover: Allow for color/gradient backgrounds (without an image) Cover: Allow creating the block with only color/gradient backgrounds (without an image) May 27, 2020
@iamthomasbishop
Copy link
Contributor

iamthomasbishop commented May 28, 2020

@pinarol I would suggest we do something similar, at least for a v1. We now have color picker components that we can utilize, which is really exciting 😄 Here's what I think the flow could look like, hoping we can use existing components:

  • The placeholder would be very similar to what exists now, but like the web would show some shortcut swatches. I suggest we show black and white first, then 2-3 solid defaults if we are able to display a couple of theme defaults (if not, we'd skip these 2-3), then the custom color picker indicator (the rainbow swatch).
  • If you tap a swatch in this list that isn't the custom color, that color will be applied straight away, and — a notable change to the current flow — the parent (cover) stays selected. In the top corner, a little "image" icon shows to hint that you can also add an image background.
  • If you tap the custom color swatch, the custom color picker UI shows. You can tap "Cancel" to go back, or tap "Apply" to proceed. That color is then set as the background of the block.

One other note: I wondered if we should roll the "opacity" slider into the custom picker in this case, because it's often desirable to adjust the opacity of the overlay alongside the color. What do you think?

There's also no way to remove the image once you set it, same on web.

A couple of things here:

  • We currently allow a long-press on the image to show a menu of image sources to choose from (essentially the "replace image" task). I think this would be one place for a "Clear media" menu button.
  • The other place we might want to consider showing this option is in the block settings sheet. We obviously don't have any media-related settings in the sheet yet, but I think there was some discussion about adding focal point and other items soon, so I would put this "clear media" button nearby those items (similar to web).

Does all of this make sense? Let me know if you have any questions about the flow or design.

@antonis
Copy link

antonis commented Jul 10, 2020

Hello @iamthomasbishop,
I was also thinking of adding a 'clear color' button like the web. It seems like a quick win on the code side.
Screenshot 2020-07-10 at 4 08 25 PM
Wdyt?

@antonis
Copy link

antonis commented Jul 28, 2020

@antonis antonis closed this as completed Jul 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers [Status] Needs Design [Type] Enhancement Improves a current area of the editor
Projects
None yet
Development

No branches or pull requests

3 participants