Skip to content

fix(actionbutton): reduce mod interception #3664

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

castastrophe
Copy link
Collaborator

@castastrophe castastrophe commented Apr 10, 2025

Description

This update aims to simplify --mod- access by ensuring local variants and states aren't hooking into those custom properties for overrides. This updates all local variants and states to override the --spectrum-actionbutton- properties instead and adjusts the specificity to ensure no regressions in rendered results.

Other changes of note:

  • Removes the .spectrum-ActionButton--sizeM as unnecessary and duplicate as these styles are applied in the base class.
  • Reduces the use of the :not() pseudo-class in theme overrides as these selectors are more complex to remap for web component projects.

How and where has this been tested?

Please tag yourself on the tests you've marked complete to confirm the tests have been run by someone other than the author.

Validation steps

  • Expect no visual changes to the component.
  • Expect to be able to overwrite the following modifiers:

Regression testing

Validate:

  1. The documentation pages for at least two other components are still loading, including:
  • The pages render correctly, are accessible, and are responsive.
  1. 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

  • I have read the contribution guidelines.
  • 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. ✨

Copy link

changeset-bot bot commented Apr 10, 2025

🦋 Changeset detected

Latest commit: 5ca3f4d

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/actionbutton Patch

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

@castastrophe castastrophe force-pushed the fix-action-button-reduce-mod-interception branch from d8953bd to f320825 Compare April 10, 2025 18:39
@castastrophe castastrophe self-assigned this Apr 10, 2025
@castastrophe castastrophe added bug Results from a bug in the CSS implementation size-3 M ~18-30hrs; moderate effort or complexity, several work days needed. run_vrt For use on PRs looking to kick off VRT size-2 S ~6-18hrs; not hard or time consuming, one or two work days to complete. and removed size-3 M ~18-30hrs; moderate effort or complexity, several work days needed. labels Apr 10, 2025
Copy link
Contributor

github-actions bot commented Apr 10, 2025

File metrics

Summary

Total size: 2.25 MB*

Package Size Minified Gzipped
actionbutton 26.04 KB 24.95 KB 3.00 KB

actionbutton

Filename Head Minified Gzipped Compared to base
index-base.css 20.12 KB 19.27 KB 2.70 KB 🔴 ⬆ 0.01 KB
index-theme.css 8.66 KB 8.42 KB 0.94 KB 🔴 ⬆ 0.96 KB
index.css 26.04 KB 24.95 KB 3.00 KB 🔴 ⬆ 0.72 KB
metadata.json 15.75 KB - - 🔴 ⬆ 1.44 KB
themes/express.css 6.59 KB 6.39 KB 0.93 KB 🔴 ⬆ 0.85 KB
themes/spectrum-two.css 6.53 KB 6.33 KB 0.93 KB 🔴 ⬆ 0.85 KB
themes/spectrum.css 6.76 KB 6.56 KB 0.95 KB 🔴 ⬆ 0.85 KB
* Size is the sum of all main files for packages in the library.
* An ASCII character in UTF-8 is 8 bits or 1 byte.

Copy link
Contributor

github-actions bot commented Apr 10, 2025

🚀 Deployed on https://pr-3664--spectrum-css.netlify.app

@castastrophe castastrophe force-pushed the fix-action-button-reduce-mod-interception branch from f320825 to 66f33c0 Compare April 10, 2025 20:27
@castastrophe castastrophe force-pushed the fix-action-button-reduce-mod-interception branch from 6cd48e5 to d214ec4 Compare April 11, 2025 15:37
@castastrophe castastrophe force-pushed the fix-action-button-reduce-mod-interception branch from d687176 to 5ca3f4d Compare April 16, 2025 21:29
@@ -68,7 +66,39 @@
--spectrum-actionbutton-border-color: transparent;
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ [stylelint] <spectrum-tools/no-unused-custom-properties> reported by reviewdog 🐶
Unused custom property --spectrum-actionbutton-border-color defined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Results from a bug in the CSS implementation run_vrt For use on PRs looking to kick off VRT size-2 S ~6-18hrs; not hard or time consuming, one or two work days to complete.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants