Conversation
|
Thanks @nreese. Give me some time to think over the design of this component. It seems we can most likely condense it into a single input. I've also added the checklist back into the summary of the PR. It's vital that new components get checked against this. I also see you're lacking any doc description text. Can you add some? |
|
Users will need to be able to define the color stop for each color. Think of the use case were you want to show traffic colors. Red for really slow traffic, yellow for slow traffic and green for fast traffic. Just defining a gradient is not enough. Users must have the ability to define at which numerical value the color will switch from one to the next |
|
@nreese will you know the range ahead of time? I guess it could be anything huh, even data that's not yet in the set. Hmm. |
This input is envisioned for cases where you know the range ahead of time. Use cases like speeds, file sizes, temperature, weights and such that fall into a known range and want to styled by that range |
|
Think of another use case where you are sizing icons based on upload size. You most likely do not want to style based on relative size but want to style based on fixed size ranges so items on the map that are large mean the same thing regardless of the data set. For example, its really confusing to see a large icon symbolize 100MB and then zoom the map to a different location and see the same large icon symbolize 5MB (just because its the largest out of the data set). It would be better if the size is consistent for a defined range regardless of whats in the data set and how the value is relative to other values in the data set. |
|
That would work. The user just needs to be able to define as many stop/color pairs as needed to describe the data set. I think there is some value in being able to see all of the stop numerical values one a single screen so users can see how data flows through the stops and is able to compare and contrast each stop against the others. |
Shouldn't the legend take care of that? |
|
The other question though, is it actually creating a gradient or are these hard stops, or can it be either? Hard stops as in the case of your stoplight, solid Green from |
Yeah, it might just be where our heads are at right now, but we're trying to make things as minimal as possible from a footprint perspective with anything that might sit in an edit panel since you folks love to add stuff and those side controls get super scrolly! This one seems like something we'd only use in an edit panel, and it's a pretty common layout for designery tools. Prolly hardest bit would be figuring out some of the accessibility. You'd likely need a tab + enter to make a new stop before tabbing to the individual stops. We'll chat it up in our design meeting today. |
|
Did a small sess on this. Mock above would work (needs cleanup). Feature wize it needs to include the hex value and give some way to delete the stop. Accessibility will be challenging. |
* Make mixin for placeholder and use in disabled
* Added `display` option to EuiPopover * Updated color picker * Updated super date picker * Updated super select
|
@thompsongl @snide Point popoversThe popover contains a text input for the stop value, a delete button, the color picker, and an input for the hex value. In reality, there would never be two popovers open at the same time, but the screenshot below includes an example of a popover with a validation error. Note that this uses the new compressed inputs. Keyboard navigation
At this point, the user can use the up/down arrows to cycle through the stops or use 'Tab' to move past the |
|
@ryankeairns Nice! I'm going to move your spec to a new issue and copy over relevant discussion. This PR will be used as prior art and may have some cherry-pick-able code, but we've ultimately decided to go in a different functional direction. |



Add EuiColorStops component. The Maps application will use this component to allow users to specify custom color ramps with ranges.
Checklist
[ ] This required updates to Framer X components