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

CustomGradientPicker / Cover: Update UI #20099

Merged
merged 7 commits into from
Feb 7, 2020

Conversation

ItsJonQ
Copy link

@ItsJonQ ItsJonQ commented Feb 7, 2020

Description

This update adjusts the UI of the CustomGradientPicker, specifically as it appears in the Cover block.
This is a follow up to Design suggestions from #19582 (comment)

How has this been tested?

Tested locally in Gutenberg

Screenshots

Solid Color

Screen Shot 2020-02-07 at 11 16 51 AM

Gradient Color

Screen Shot 2020-02-07 at 11 29 35 AM

Notes

These were the original design update suggestions:

  • Let’s minimize those tabs (Solid color | Gradient) as much as possible. They’re too big right now.
  • Change the word "Overlay" to "Color".
  • Remove the border around the gradient type icons.
  • Provide more vertical padding between all the parts. (24px or some other CSS variable close to that)
  • Make sure the Angle number field and the "Clear" button align along the right side nicely.

I was able to make all of the updates with the exception of the Clear button. The reason is because of how the various UI pieces are composed together. The button actions area, which contains clear, is separate from the color/gradient controls:

Screen Shot 2020-02-07 at 11 14 38 AM

Making this update would require refactoring across multiple components. It's doable, but perhaps something to tackle after WP 5.4.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR.

Jon Q added 2 commits February 7, 2020 11:17
This update adjusts the UI/layout for elements related to the CustomGradientPicker, specifically as it appears in the `Cover` block.
@ItsJonQ ItsJonQ added [Package] Components /packages/components [Block] Cover Affects the Cover Block - used to display content laid over a background image labels Feb 7, 2020
@ItsJonQ ItsJonQ self-assigned this Feb 7, 2020
@ItsJonQ
Copy link
Author

ItsJonQ commented Feb 7, 2020

Coordinated with @mapk + @karmatosed for some new icons for the Gradient Type selector.

Screen Capture on 2020-02-07 at 12-33-58

Above are the new icons with an update for selection UI (selected, hover, focus)

@mapk
Copy link
Contributor

mapk commented Feb 7, 2020

Thanks for your work, @ItsJonQ!

I noticed there's a bit of overlap on the two Gradient Type buttons. Is it possible to position these side-by-side instead of having the overlap?

overlap 2020-02-07 09_49_00

@ItsJonQ
Copy link
Author

ItsJonQ commented Feb 7, 2020

@mapk Thanks for feedback! I'll give it a shot.

Just a heads up, from a code perspective, the updated button styles are a bit messy. This is due to the fact that we don't have a lot of direct control over them, and styles (both core and custom) and mixing together.

Ultimately, we'll do whatever is best for UI/UX.
I just wanted to leave a note here for future reference.

@mapk
Copy link
Contributor

mapk commented Feb 7, 2020

If my next request requires a change beyond just this specific part, it can be disregarded.

Borders that use a border-radius need to account for inner borders that use a border-radius too. As the inner borders get smaller, they should have a smaller border-radius. So the focused state of the Gradient Type icons has a border-radius of 4px. Since this happens, the selected state of the icons (inner border) should probably have a radius of 2px. This improves the visual relationship.

But if this is bigger than this PR, we can handle that elsewhere.

Current:

Screen Shot 2020-02-07 at 9 51 08 AM

Proposed:

Screen Shot 2020-02-07 at 9 51 55 AM

@mapk
Copy link
Contributor

mapk commented Feb 7, 2020

Just a heads up, from a code perspective, the updated button styles are a bit messy.

This probably applies to my last comment as well. I hear ya.

@ItsJonQ
Copy link
Author

ItsJonQ commented Feb 7, 2020

@mapk No worries! I was able to make the changes. How is this?

Screen Shot 2020-02-07 at 1 08 46 PM

It shows the inner/outer borders + border radius, as well as the spacing between each button.

Copy link
Member

@jorgefilipecosta jorgefilipecosta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the code size, these changes seem correct. Awesome work here in record time 👍
Let's wait for an ok from @mapk and ship this change :)

Copy link
Contributor

@mapk mapk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful!!! LGTM :shipit: Thank you, @ItsJonQ !

@jorgefilipecosta jorgefilipecosta merged commit d2b45b7 into master Feb 7, 2020
@jorgefilipecosta jorgefilipecosta deleted the update/custom-gradient-picker-ui-updates branch February 7, 2020 20:06
@github-actions github-actions bot added this to the Gutenberg 7.5 milestone Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Cover Affects the Cover Block - used to display content laid over a background image [Package] Components /packages/components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants