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: Style without accessing InputControl internals #59069

Merged
merged 3 commits into from
Feb 15, 2024

Conversation

mirka
Copy link
Member

@mirka mirka commented Feb 15, 2024

What?

In the ColorPicker component:

  • Style the borderless SelectControl using the new internal isBorderless API via context.
  • Remove unnecessary selector access to InputControl internals when setting the width on the NumberControls in HSL/RGB mode.

Why?

Testing Instructions

In the Storybook for ColorPicker, confirm that the styling is the same with trunk. The affected elements are the color mode dropdown and the number input fields in HSL/RGB mode.

Testing Instructions for Keyboard

When tabbing through the interactive elements, the borderless color mode dropdown should still show a focus ring when focused.

@mirka mirka added [Type] Code Quality Issues or PRs that relate to code quality [Package] Components /packages/components labels Feb 15, 2024
@mirka mirka self-assigned this Feb 15, 2024
Copy link

github-actions bot commented Feb 15, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: mirka <0mirka00@git.wordpress.org>
Co-authored-by: tyxla <tyxla@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@mirka mirka requested a review from a team February 15, 2024 10:42
Copy link

Flaky tests detected in 1938b33.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7914650146
📝 Reported issues:

Copy link
Member

@tyxla tyxla left a comment

Choose a reason for hiding this comment

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

Both the color mode dropdown and the number input fields look identical 👍

Screenshot 2024-02-15 at 13 39 14

@mirka mirka merged commit f33e8b6 into trunk Feb 15, 2024
59 checks passed
@mirka mirka deleted the color-picker-cleanup branch February 15, 2024 15:07
@github-actions github-actions bot added this to the Gutenberg 17.8 milestone Feb 15, 2024
aristath added a commit that referenced this pull request Feb 16, 2024
* trunk: (78 commits)
  Components: Use `Element.scrollIntoView()` instead of `dom-scroll-into-view` (#59085)
  DataViews: Correctly display featured image that don't have image sizes (#59111)
  Elements: Fix block instance element styles for links applying to buttons (#59114)
  Allow editing of image block alt and title attributes in content only mode (#58998)
  Add toggle for grid types and stabilise Grid block variation. (#59051)
  Global Styles: fix console error in block preview (#59112)
  Navigation: Avoid using embedded records from fallback API (#59076)
  Refactor responsive logic for grid column spans. (#59057)
  Editor: Unify Mode Switcher component between post and site editor (#59100)
  Move StopEditingAsBlocksOnOutsideSelect to Root (#58412)
  Fix logic error in #58951 (#59101)
  Block-editor: Auto-register block commands (#59079)
  Fix small typo in rich text reference guide (#59089)
  Components: Add lint rules for theme color CSS var usage (#59022)
  Enter editing mode via Enter or Spacebar (#58795)
  Updating Storybook to v7.6.15 (latest) (#59074)
  CustomSelectControl (v1 & v2): Fix errors in unit test setup (#59038)
  Add stylelint rule to prevent theme CSS vars outside of wp-components (#59020)
  ColorPicker: Style without accessing InputControl internals (#59069)
  Pattern block: batch replacing actions (#59075)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants