-
Notifications
You must be signed in to change notification settings - Fork 58
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 Block: gradient backgrounds with type radial are not rendered in the app #2140
Comments
Thanks for opening the issue @designsimply! Radial gradients aren't supported just yet, only linear ones. It does look a bit weird showing a solid background for these cases but not sure what could be the best approach while we don't give support for radial gradients. What do you think @pinarol? |
@geriux does the library we use for linear gradient come with the radial capability?
I’d better defer this question to @iamthomasbishop |
Sadly no, I even checked there's an opened issue about it but doesn't look like they will add it anytime soon =( |
@geriux I'm surprised that the library supports linear gradients but not radial ones — is this something we can extend, or investigate another library that provides this? I think this will become very important to support, especially when we expand on/allow customization of gradients in the color picking flow. |
Yeah, when I checked the name of the library I saw there's another library that only does radial gradients, so maybe we can just bring that functionality into the library we are using now. |
@geriux Ah, I didn't realize when I wrote my response that the library was literally titled
I think that makes sense, although I would hope there is another library somewhere (or if it's worth creating our own and sharing it) that provides more comprehensive gradient support (radial, linear, angle, etc). I'll defer to y'all when it comes to libraries and which we use 😄 |
I've just started working on supporting
However, some questions arose during the work:
@iamthomasbishop please give me some feedback |
@lukewalczak I analyzed the flow on web, and found that it’s a bit weird, and in some cases I couldn’t even get any background colors to apply (there seems to be some bugs on this, at least for MacOS Safari). I have a bunch of thoughts (and if they are too long, we can always drop them in a separate issue) that I’ll share below, but first I’ll try to answer your questions.
It depends on where it’s located and how we want to place it in the hierarchy, but I would likely either use a Segmented Control, a drop down button, or a table row with a disclosure (chevron on right side to indicate another action). I’ll share more on this in my notes below.
I think that’d be nice but the hierarchy is unclear on web and I’m not sure if it makes sense to distinctly separate different gradient types. I imagine various types of gradients can and should coexist in the same list.
Yes, I think so. ProblemsIn theory, the gradient presets make sense, but it’s when you go to customize the gradient is when it gets confusing to me — let me explain. When you select a preset from the list, it selects a linear gradient. This is as expected, but when you make any customizations to the gradient, it is not clear what is selected or what you’re editing. For example, if I select a preset, then tap the Radial type button, it removes selection and de-selects the swatch. I’m not actually customizing that swatch I had selected, I’m creating a new singular gradient and it’s applied to the setting. We should make it clear and very distinct when you’re customizing and what/where that is. Note: this confusion applies to any customization you make after selecting a preset, but I’ll focus on the Radial/Linear selection here. The other thing is the type selector is awkwardly placed and thus feels disconnected in terms of hierarchy. As a result (similar to the point above), I was confused that when I selected the Radial option, the current swatch was de-selected instead of it being clear that I was making a custom gradient. I have the same problem with the angle property. You aren’t ever actually changing the swatch itself, but it’s not clear that that is what’s happening. ProposalI’ll share some suggestions based on what I think a more “ideal” flow would be based on our new color picking UX via the Button(s) blocks, then I will offer what I think could be a quicker but more crude and not-as-good UX. My proposal would be to approach this similarly to how we did the main color picker flow, but with an added step that would be very familiar. Build on the current gradients sheetWe could build on the current gradients sheet, but append a Explicit gradient customize/add sheetThe gradient customizer shows you a large preview of the gradient, a slider that allows you to see/customize the control points (and add a new one) similar to the web’s component. If you tap on any of the control points, we would show the custom picker. Tap & dragging on a control point moves its position property. Then we have a vanilla Slider component to customize the angle. This sheet would have a Segmented Control for the Linear/Radial type selector, as well as “Cancel” and “Apply” buttons just like on the current custom picker. Tapping “Apply” applies the new gradient to the end of the list, where the All together nowThis is what that looks like altogether. The main additions of note are the (+) button on the gradients sheet and the new gradient customizer sheet, which we’ll obviously need to sort out. Quick fixIf we need to apply a quick fix, I would suggest we stick to only the type and angle controls — unless we can implement the color scale slider thingy quickly. This would mean they can’t customize the color control points but they can customize the angle (if linear is selected) — because I think we’re going to want to at least allow users to edit the angle. Here’s a couple of options with that in mind: Option AThis combines everything into the current Gradients sheet. It adds gradient type (either a disclosure or a toggle using the web’s linear/radial icons) and angle (using our Slider component). Option BAdds a “Customize Gradient” button to the existing Gradients sheet. It goes to a sub-sheet to customize the type and angle properties. Feedback@lukewalczak I’m curious to know what you think. Would the preferred option make sense and be feasible to extend our current color sheets? Or do you have other ideas? |
I think that initially, we are going to implement one of the quick solutions. I'm more convinced into option B since it will be easier later to iterate on it and add next functionalities such as adding the new color to a gradient. I'm going then to: Leave gradient swatches as they are right now (keep linear), but change indicator according to chosen type. I assume that:
Questions:
cc: @pinarol |
That’s what I was also thinking, glad to hear you agree 😀.
What do you mean by “change the indicator”?
Both correct 👍
I think so, because you’re essentially just picking a different type of the same gradient. Although this diverges from the web (this is related to one of my noted confusions in the last comment), it makes more sense to me and I think is a subtle enough difference that it shouldn’t create user-facing problems. |
Ahh yes, that’s good 👍. I would assume that if I customize the angle and/or the type that the end result also shows on the indicator as well, is that correct? |
SUMMARY What have to be done within that issue:
Next iteration to achieve complete gradient settings will be handled in separate issue: #2284 |
Does that mean we can close this ticket @lukewalczak? |
Since radial gradient is supported in the app we can close that issue |
Describe the bug
Gradient backgrounds with type radial are not rendered in the app.
To Reproduce
Expected behavior
I expected to see a result similar to the web view when I open the cover block in the app.
Screenshots
Tested with WPAndroid 14.6-rc-1 on Pixel 3 Android 10.
Smartphone
The text was updated successfully, but these errors were encountered: