fix(rating): address inconsistent hover behavior
Description
Provides more granular control over the hover behavior of child stars within the rating component to prevent hovering in space adjacent to the component from highlighting all stars.
CSS-735
How and where has this been tested?
Verified in local Storybook story for rating component.
Validation steps
- Fetch the branch and run it locally or open the Storybook URL for the PR.
- Navigate to the rating component.
- Verify that hovering over rating stars is now more controlled and that hovering between stars doesn't result or all/no stars being displayed as active.
- Verify that changing the selected star works as expected with the hover behavior.
Regression testing
Validate:
- The documentation pages for at least two other components are still loading, including:
- [ ] The pages render correctly, are accessible, and are responsive.
- If components have been modified, VRTs have been run on this branch:
- [ ] VRTs have been run and looked at.
- [ ] Any VRT changes have been accepted (by reviewer and/or PR author), or there are no changes.
Screenshots
To-do list
- [x] I have read the contribution guidelines.
- [x] I have updated relevant storybook stories and templates.
- [ ] I have tested these changes in Windows High Contrast mode.
- [ ] If my change impacts other components, I have tested to make sure they don't break.
- [ ] If my change impacts documentation, I have updated the documentation accordingly.
- [ ] ✨ This pull request is ready to merge. ✨
🦋 Changeset detected
Latest commit: eaf9568281f96e65ffdfc6648b65875bf4924044
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
| Name | Type |
|---|---|
| @spectrum-css/rating | Major |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
🚀 Deployed on https://pr-3196--spectrum-css.netlify.app
File metrics
Summary
Total size: 4.27 MB* Total change (Δ): 🔴 ⬆ 0.61 KB (0.01%)
Table reports on changes to a package's main file. Other changes can be found in the collapsed Details section below.
| Package | Size | Δ |
|---|---|---|
| rating | 9.99 KB | 🔴 ⬆ 0.20 KB |
Details
rating
| Filename | Head | Compared to base |
|---|---|---|
| index-base.css | 9.21 KB | 🔴 ⬆ 0.20 KB (2.20%) |
| index-theme.css | 1.39 KB | - |
| index-vars.css | 9.99 KB | 🔴 ⬆ 0.20 KB (2.02%) |
| index.css | 9.99 KB | 🔴 ⬆ 0.20 KB (2.02%) |
| themes/express.css | 1.02 KB | - |
| themes/spectrum.css | 1.01 KB | - |
* Results are not gzipped or minified.
* An ASCII character in UTF-8 is 8 bits or 1 byte.
Marking this as blocked for now until we get S2 Foundations merged into main. Once we do, we'll come back to this, get it rebased against the new main stuff, and then look to get it merged in.
Closing this — going to see if we can lift the hover logic into the S2 migration. https://github.com/adobe/spectrum-css/pull/3627