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

Consolidating Gradient Controls #21269

Closed
pablohoneyhoney opened this issue Mar 30, 2020 · 8 comments
Closed

Consolidating Gradient Controls #21269

pablohoneyhoney opened this issue Mar 30, 2020 · 8 comments
Assignees
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Feature] UI Components Impacts or related to the UI component system Needs Accessibility Feedback Need input from accessibility Needs Design Feedback Needs general design feedback.

Comments

@pablohoneyhoney
Copy link

As we evolve the sidebar to the new UI language, here a smaller step to consolidate some UI controls within gradient that seem a bit disconnected, unpolished, and congested.

Current

current-gradient

New

  • Removing labels as the functions are in context of Color / Gradient.
  • Gradient types becoming its own label and dropdown, to allow scalability to angular, diamond on top of linear and radial.
  • Aligning styles.

Here some permutations

new-gradient-controls

The one that seems working better and more balanced

new-gradientcontrols

@ItsJonQ ItsJonQ added [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Feature] UI Components Impacts or related to the UI component system labels Mar 30, 2020
@mapk mapk added the Needs Accessibility Feedback Need input from accessibility label Mar 30, 2020
@pablohoneyhoney
Copy link
Author

Here another iteration in case we do need to keep labels.

new-gradientcontrols

@mapk
Copy link
Contributor

mapk commented Mar 30, 2020

Thanks for including a version with labels, @pablohoneyhoney.

  1. The dropdown you've got is so much cleaner and communicates the gradient type just fine.
  2. I really like the "Angle" label aligning to the edge of the angle degree input field. This adds the needed balance.
  3. Of the 3 angle dial controls, I prefer the black dot. It ties in nicely with the other fields.
  4. My only hesitation here is the capitalization of the labels. All caps can cause readability issues for some. Worth getting more feedback on that.

@mapk mapk added the Needs Design Feedback Needs general design feedback. label Mar 30, 2020
@ItsJonQ ItsJonQ self-assigned this Jun 24, 2020
@ItsJonQ
Copy link

ItsJonQ commented Jun 24, 2020

@pablohoneyhoney This is lovely! I started working on this 😊

First step is refactoring the AnglePickerControl a bit with the new styles. The JS works quite well, so I didn't need to do much there. I've also replaced the regular input with our new G2ified NumberControl, which supports features like drag-to-update and Shift key jumping.

2020-06-24 16-57-01 2020-06-24 16_57_16

I pushed things here for now:
https://github.com/WordPress/gutenberg/tree/update/gradient-controls

(Still WIP of course)

Next is to update the <SelectControl /> with G2 styles.

And lastly... putting it all together :D

@ItsJonQ
Copy link

ItsJonQ commented Jun 29, 2020

Updates!

Screen Shot 2020-06-29 at 4 27 07 PM

Working on a new <SelectControl />. Style wise, it looks exactly like our new InputControl, which has the new G2 styles ✨ . It also has the same props, like size="small", and other features (e.g. floating labels). Last detail... The down arrow is using the chevronDown from @wordpress/icons, rather than the default HTML arrow. This gives us more UI control to ensure consistency across platforms.

GIF Demo:

demo

@jasmussen
Copy link
Contributor

This is looking really fine. I'll try and work on some consistency with buttons in the sidebar today, which should help us get closer.

@jasmussen
Copy link
Contributor

I was needing a gradient yesterday, and wanted one that was really sharp, as in not really a gradient at all, just two solid colors in a diagonal. But the draggable controls can't overlap:

gradient

Can we allow this? It seems like a fair use case. Or even if I wanted to flip the gradient entirely, move the orange color all the way to the right past the red color?

@pablohoneyhoney
Copy link
Author

Looking good!

Worth looking at proportions (perhaps taller dragging area so it becomes hierarchically more prominent with a bigger area of interaction) and more distance between the slider and the controls below.

@paaljoachim
Copy link
Contributor

I am closing this issue as @ItsJonQ Jon has made a PR which has also been merged.
Please reopen if I am mistaken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Feature] UI Components Impacts or related to the UI component system Needs Accessibility Feedback Need input from accessibility Needs Design Feedback Needs general design feedback.
Projects
None yet
Development

No branches or pull requests

5 participants