-
Notifications
You must be signed in to change notification settings - Fork 178
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
Color Picker - Gradient Editing #263
Comments
See #263 for new issue tracking that implementation
Thanks for the IB @barklund. Trying to catch up on this and it feels like a sizable departure from the current state. Basically, we no longer only care about @samitron7 can you confirm that the opacity would still be there, even though it doesn't apply in many cases. Or are we planning to hide opacity for non-opaque patterns? Re: Pattern type. I think the proposal is solid. Couple of notes:
|
Yeah, that's probably the best choice. I was a bit worried about some fields have
It's just because the color picker internally use this split, that it made sense to also store it this way. But sure, a string is more compact, however we'd need to unpack it every time the color picker is opened. I'm good with either, it's a cheap calculation either way.
That's definitely also an option, but then this intermediate format would still be used - just only inside the color picker. It would make migration easier and would make repeated renders a lot faster. Again, I'm good with either.
We do? I have no strong feeling here. |
Hm, thinking it over, a string based strategy is probably much simpler and safer to do. The only trick is knowing how to apply the color to CSS in a given case when you just have a the string, but a small helper could do the trick then - applying the color string to either Then the whole complex object and state, etc, is only necessary inside the color picker component and will be calculated from the input string and updated internally. Then it makes sense to do it as a reducer, having actions such as I'll rewrite the above brief to reflect this idea in stead. |
Regardless whether you find it easier or not to use a single string for the whole type, I'd still say there would be benefit from having a string |
Hi everyone involved in working on colors. Just note the following:
I'm working on this now and will have it by monday |
Do we really need an additional color opacity number outsider of the color
picker?
…On Fri, Feb 28, 2020, 2:54 PM samitron7 ***@***.***> wrote:
Hi everyone involved in working on colors. Just note the following:
1. We need a global slider to allow the user to change the opacity of
an element
2. But in certain situations we also additionally need to add opacity
that is attached to the color swatches in the design panel (ie possibly
text and textbox)
I'm working on this now and will have it by monday
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#263>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFRIIO5JULMWOZ4E3E7AHLRFGIZ5ANCNFSM4KRU5EJQ>
.
|
@barklund One additional confirmation. It looks like we also want a separate opacity component for gradient as well. We can model it whichever way it's convenient for us. It works as a opacity multiplier for each color-step. In other words:
When outputting, for now we could, I think, use Does it make our string-only idea harder? |
As a user I want to be able to set color gradients
This ticket is a followup to #106
This ticket has a followup in #403 which deals with visually displaying and manipulating the gradient shape and color stops on the selected element/page background.
This leaves this ticket dealing with only the color picker and gradient manipulation inside the color picker.
Feature brief
For this we need a way to store a pattern in data, where the Pattern can be either opaque or some gradient.
After a lot of discussion with @swissspidy and @dvoytenko, we've decided to use a data format throughout the application, but to make sure it's as compact as possible for the common case of just an opaque color. This data format will then be assigned to anything that can have a user-configurable color (whether or not it can be a gradient or not) and passed to the color picker.
Helper functions will let components get the background CSS value from a Pattern object.
Format
Examples:
Todo
Before considering adding gradient support to the color picker:
Then implementing gradients is "simply" adding the desired functionality to the color picker and the rest of the functionality should follow:
Acceptance Criteria
Design**
The text was updated successfully, but these errors were encountered: