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

fix(picker): correctly process the CSS for the quiet hover effect #4167

Merged
merged 2 commits into from
Mar 12, 2024

Conversation

Rocss
Copy link
Contributor

@Rocss Rocss commented Mar 12, 2024

Description

Seems like the problem is that the CSS for the quiet variant of the sp-picker was not correctly processed:

:host([open]) #button:not(.spectrum-Picker--quiet) {

observe the spectrum-Picker--quiet class which should be translated to the HTML quiet attribute.

I added some more processing rules in the spectrum-config which should take care of that. Let me know if there is a better config to use for this.

Also, in the storybook, the sp-label-field should have the same size as the sp-picker, or else it looks weird and the sp-picker climbs over the sp-label-field. I adjusted the stories to pass the size attribute to the sp-label-field as well, if present.

Related issue(s)

Motivation and context

Solves a CSS bug in the Picker component when using the quiet variant and hovering over the component.

How has this been tested?

Screenshots (if appropriate)

Screenshot 2024-03-12 at 11 26 08

Screenshot 2024-03-12 at 12 07 13

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (minor updates related to the tooling or maintenance of the repository, does not impact compiled assets)

Checklist

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • If my change required a change to the documentation, I have updated the documentation in this pull request.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices

Best practices

This repository uses conventional commit syntax for each commit message; note that the GitHub UI does not use this by default so be cautious when accepting suggested changes. Avoid the "Update branch" button on the pull request and opt instead for rebasing your branch against main.

Copy link

github-actions bot commented Mar 12, 2024

Lighthouse scores

Category Latest (report) Main (report) Branch (report)
Performance 0.98 0.9 0.98
Accessibility 1 1 1
Best Practices 1 1 1
SEO 1 0.92 0.92
PWA 1 1 1
What is this?

Lighthouse scores comparing the documentation site built from the PR ("Branch") to that of the production documentation site ("Latest") and the build currently on main ("Main"). Higher scores are better, but note that the SEO scores on Netlify URLs are artifically constrained to 0.92.

Transfer Size

Category Latest Main Branch
Total 242.62 kB 229.255 kB 228.971 kB 🏆
Scripts 61.40 kB 54.718 kB 🏆 54.723 kB
Stylesheet 48.688 kB 42.604 kB 42.371 kB 🏆
Document 5.82 kB 5.221 kB 5.165 kB 🏆
Third Party 126.712 kB 126.712 kB 126.712 kB

Request Count

Category Latest Main Branch
Total 43 43 43
Scripts 35 35 35
Stylesheet 5 5 5
Document 1 1 1
Third Party 2 2 2

Copy link

github-actions bot commented Mar 12, 2024

Tachometer results

Chrome

action-menu permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 644 kB 166.48ms - 169.90ms - unsure 🔍
-2% - +1%
-2.89ms - +1.98ms
branch 636 kB 166.91ms - 170.38ms unsure 🔍
-1% - +2%
-1.98ms - +2.89ms
-

picker permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 510 kB 574.20ms - 590.29ms - unsure 🔍
-3% - +1%
-15.95ms - +5.91ms
branch 502 kB 579.86ms - 594.66ms unsure 🔍
-1% - +3%
-5.91ms - +15.95ms
-

split-button permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 717 kB 1866.36ms - 1869.62ms - unsure 🔍
-0% - +0%
-3.41ms - +0.84ms
branch 710 kB 1867.91ms - 1870.64ms unsure 🔍
-0% - +0%
-0.84ms - +3.41ms
-
Firefox

action-menu permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 644 kB 321.65ms - 328.71ms - unsure 🔍
-2% - +1%
-6.75ms - +4.23ms
branch 636 kB 322.23ms - 330.65ms unsure 🔍
-1% - +2%
-4.23ms - +6.75ms
-

picker permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 510 kB 1038.49ms - 1064.79ms - unsure 🔍
-1% - +2%
-7.55ms - +21.35ms
branch 502 kB 1038.74ms - 1050.74ms unsure 🔍
-2% - +1%
-21.35ms - +7.55ms
-

split-button permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 717 kB 1658.00ms - 1664.52ms - unsure 🔍
-0% - +0%
-3.22ms - +6.26ms
branch 710 kB 1656.30ms - 1663.18ms unsure 🔍
-0% - +0%
-6.26ms - +3.22ms
-

@Rocss Rocss marked this pull request as ready for review March 12, 2024 10:00
@Rocss Rocss linked an issue Mar 12, 2024 that may be closed by this pull request
1 task
Westbrook
Westbrook previously approved these changes Mar 12, 2024
Copy link
Contributor

@Westbrook Westbrook left a comment

Choose a reason for hiding this comment

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

Awesome! You're a Picker Pro now 😜

LGTM. Justing waiting for CI to go green again and I'll merge this in.

@Westbrook Westbrook force-pushed the rocss/picker-quiet-hover branch from d9faaa6 to c9a42ab Compare March 12, 2024 13:45
@Westbrook
Copy link
Contributor

@Rocss I rebased this not expecting the VRTs to fail, can you help us update the cache here?

Copy link
Contributor

@Westbrook Westbrook left a comment

Choose a reason for hiding this comment

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

Merging, take two!

@Westbrook Westbrook merged commit eb282fa into main Mar 12, 2024
49 checks passed
@Westbrook Westbrook deleted the rocss/picker-quiet-hover branch March 12, 2024 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Quiet Picker has incorrect hover effect
2 participants