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

UnitControl: Update unit select's focus styles #42383

Merged
merged 3 commits into from
Jul 15, 2022

Conversation

aaronrobertshaw
Copy link
Contributor

Related:

What?

Fixes the unit select's focus styling within the UnitControl component.

Why?

As it currently stands the UnitControl wrapper's border obscures focus styles. The focus border/box-shadow is a little inconsistent as well.

How?

  • Brings in the style overrides previously applied to the unit select within the BorderControl component.
  • The focus styles were initially outlined in Border Tools: Inconsistent focus borders #40897
  • Removes 1px left/right margin from UnitSelect which caused inset box-shadow to expose the wrapper's border.

Testing Instructions

  1. Take a look at the focus styling for the UnitControl in Storybook on trunk
  2. Checkout this branch and ensure the unit select's focus styles are visible and consistent with the inputs
  3. Repeat the process this time checking instances of the UnitControl within the editors

Screenshots or screencast

Before

Screen.Recording.2022-07-13.at.3.21.28.pm.mp4

After

Screen.Recording.2022-07-13.at.3.27.16.pm.mp4

@aaronrobertshaw aaronrobertshaw added [Type] Enhancement A suggestion for improvement. [Feature] UI Components Impacts or related to the UI component system CSS Styling Related to editor and front end styles, CSS-specific issues. labels Jul 13, 2022
@aaronrobertshaw aaronrobertshaw requested a review from mirka July 13, 2022 05:39
@aaronrobertshaw aaronrobertshaw self-assigned this Jul 13, 2022
@andreszs
Copy link

This PR looks perfect.

There seems to be an alarming increase in GUI flaws recently. Maybe some additional testing is required before adding more features in subsequent WP versions?

Copy link
Contributor

@glendaviesnz glendaviesnz left a comment

Choose a reason for hiding this comment

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

Tested well for me in Storybook and Editor

@ciampo ciampo self-requested a review July 14, 2022 18:43
Copy link
Member

@mirka mirka left a comment

Choose a reason for hiding this comment

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

Thanks for bringing the fix "upstream", it looks a lot nicer!

The CSS sure looks painful though, maybe we'll sort it out one day if it becomes a common pattern.

These styles will be introduced into the UnitControl via a separate PR. The transition
@aaronrobertshaw aaronrobertshaw force-pushed the update/unit-control-select-focus-styling branch from 2cfb9f2 to 4a6a3e6 Compare July 15, 2022 05:02
@aaronrobertshaw aaronrobertshaw merged commit 2ee09f0 into trunk Jul 15, 2022
@aaronrobertshaw aaronrobertshaw deleted the update/unit-control-select-focus-styling branch July 15, 2022 05:51
@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
CSS Styling Related to editor and front end styles, CSS-specific issues. [Feature] UI Components Impacts or related to the UI component system [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants