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

ColorPicker: Cleanly implement large size #42002

Merged
merged 3 commits into from
Jul 15, 2022
Merged

ColorPicker: Cleanly implement large size #42002

merged 3 commits into from
Jul 15, 2022

Conversation

mirka
Copy link
Member

@mirka mirka commented Jun 28, 2022

What?

Replaces the hacky implementation of the 40px size.

Why?

We now have large size variants on the underlying components that can be used cleanly via props.

Testing Instructions

  1. npm run storybook:dev
  2. See the story for ColorPicker. There should be no visual changes in all modes (Hex, RGB, HSL).

@mirka mirka added the [Package] Components /packages/components label Jun 28, 2022
@mirka mirka requested a review from ciampo June 28, 2022 10:32
@mirka mirka self-assigned this Jun 28, 2022
@mirka mirka requested a review from ajitbohra as a code owner June 28, 2022 10:32
@ciampo ciampo added [Type] Enhancement A suggestion for improvement. [Feature] UI Components Impacts or related to the UI component system labels Jul 1, 2022
@ciampo ciampo force-pushed the fix/color-picker-large branch from 43c6a1e to 98284d2 Compare July 1, 2022 10:39
Copy link
Contributor

@ciampo ciampo left a comment

Choose a reason for hiding this comment

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

It's great to see the results of previous work, code definitely looks cleaner!

The only side-effect of this change is the horizontal padding in the input fields — previously it was 8px, while with the changes from this PR, it becomes 16px (see source code)

trunk this PR
Screenshot 2022-07-01 at 12 40 21 Screenshot 2022-07-01 at 12 40 08

I'm going to approve this PR, as I think still think this is fine for the sake of applying a more uniform design across our components (cc @jameskoster in case you have any feedback).

@ciampo ciampo requested a review from chad1008 July 1, 2022 10:44
@jameskoster
Copy link
Contributor

I say this with no understanding of the impact on the underlying component(s), or how best to proceed, but that spacing does feel a bit large to me :) An 8px gap between prefix and input value seems more natural.

The 16px gap on the right is good. It would be nice to match the prefix spacing with that, currently it is 14px for some reason 🤔

@mirka
Copy link
Member Author

mirka commented Jul 5, 2022

Great catch @ciampo, and thanks for the check @jameskoster. I proposed #42166 for better default padding in the prefix/suffix case. If that looks good, let's wait for that to land before merging this PR.

The 16px gap on the right is good. It would be nice to match the prefix spacing with that, currently it is 14px for some reason

Will do 👍

@mirka mirka force-pushed the fix/color-picker-large branch from 98284d2 to 4160194 Compare July 15, 2022 02:46
@mirka
Copy link
Member Author

mirka commented Jul 15, 2022

Spacings looking good after #42166

R/G/B prefixes in the ColorPicker with correct spacing

@mirka mirka merged commit 40ba2c9 into trunk Jul 15, 2022
@mirka mirka deleted the fix/color-picker-large branch July 15, 2022 08:58
@github-actions github-actions bot added this to the Gutenberg 13.8 milestone Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] UI Components Impacts or related to the UI component system [Package] Components /packages/components [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants