Skip to content

Conversation

@noisysocks
Copy link
Contributor

@noisysocks noisysocks commented Dec 12, 2025

Asana Task/Github Issue: https://app.asana.com/1/137249556945/project/1209121419454298/task/1210127348056275

Description

Updates the Button, Switch and Text shared components to use --ds theme variables. These variables adjust according to the data-theme-variant set by the user, making the components look different depending on the user’s theme variant.

Since these components are shared we can’t assume that theme variables always exist and so we always fallback to default-light or default-dark.

On Windows, Button and Switch both have a custom design, so I updated all color variables here to use the themed variables.

On macOS, Button and Switch are styled to look like they’re native controls, so I only updated the accent colors to use the themed variables.

Testing Steps

Look at these pages and pay attention to the buttons in the RMF banner and the switches in the Customize sidebar.

Test the hover, active, and disabled states.

Test different themeVariant params: default, coolGray, slateBlue, green, violet, rose, orange, desert.

Test light and dark mode (set &theme=dark).

Test that default variant (default) looks similar to how it did before.

Checklist

Please tick all that apply:

  • I have tested this change locally
  • I have tested this change locally in all supported browsers
  • This change will be visible to users
  • I have added automated tests that cover this change
  • I have ensured the change is gated by config
  • This change was covered by a ship review
  • This change was covered by a tech design
  • Any dependent config has been merged

Note

Migrates Button, Switch, and Text styles to DS theme variables with platform-specific tokens, dark-mode fallbacks, and refined state handling.

  • Shared Components
    • Button (special-pages/shared/components/Button/Button.module.css)
      • Replaces hardcoded colors with --ds theme tokens across light/dark.
      • Adds :hover/:active guards :not(:disabled), sets disabled cursor, and updates focus handling.
      • macOS: introduces accent/focus token vars; adjusts text colors and active mixing; dark-mode variants.
      • Windows: replaces colors with DS tokens; adds outline-based focus ring; updates hover/active/disabled states.
      • iOS/No-platform: preserves platform styles; aligns active/disabled behaviors.
    • Switch (special-pages/shared/components/Switch/Switch.module.css)
      • Fully tokenizes off/on/hover/pressed states with --ds variables (light/dark).
      • Adds explicit hover/active/checked-hover styling and border-color updates.
      • macOS: uses system track/handle with DS accent for on-states; disables hover; adds pressed variants; size tweaks.
    • Text (special-pages/shared/components/Text/Text.module.css)
      • Updates link color to DS accent text tokens with dark-mode variant.
  • Misc
    • Typo fix: "macOS" capitalization.

Written by Cursor Bugbot for commit 053285f. This will update automatically on new commits. Configure here.

@netlify
Copy link

netlify bot commented Dec 12, 2025

Deploy Preview for content-scope-scripts ready!

Name Link
🔨 Latest commit 053285f
🔍 Latest deploy log https://app.netlify.com/projects/content-scope-scripts/deploys/693fd87abf851100079bc2e2
😎 Deploy Preview https://deploy-preview-2099--content-scope-scripts.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 12, 2025

Temporary Branch Update

The temporary branch has been updated with the latest changes. Below are the details:

Please use the above install command to update to the latest version.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 12, 2025

[Beta] Generated file diff

Time updated: Mon, 15 Dec 2025 09:45:34 GMT

Apple
    - apple/pages/new-tab/dist/index.css
  • apple/pages/onboarding/dist/index.css
  • apple/pages/release-notes/dist/index.css
  • apple/pages/special-error/dist/index.css
  • apple/pages/special-error/index.html

File has changed

Integration
    - integration/pages/new-tab/dist/index.css
  • integration/pages/onboarding/dist/index.css
  • integration/pages/release-notes/dist/index.css
  • integration/pages/special-error/dist/index.css

File has changed

Windows
    - windows/pages/new-tab/dist/index.css
  • windows/pages/onboarding/dist/index.css
  • windows/pages/release-notes/dist/index.css
  • windows/pages/special-error/dist/index.css
  • windows/pages/special-error/index.html

File has changed

@noisysocks noisysocks force-pushed the randerson/shared-components-styling branch from a501f01 to efb45b5 Compare December 12, 2025 00:44
@noisysocks noisysocks marked this pull request as ready for review December 12, 2025 00:45
@noisysocks noisysocks requested review from a team, mgurgel and shakyShane as code owners December 12, 2025 00:45
@noisysocks noisysocks force-pushed the randerson/shared-components-styling branch from 6c3ce5f to 87c7711 Compare December 12, 2025 00:55
@noisysocks noisysocks force-pushed the randerson/shared-components-styling branch from de1953f to 628009f Compare December 12, 2025 01:00
@noisysocks noisysocks force-pushed the randerson/shared-components-styling branch from 5270f40 to a640b29 Compare December 12, 2025 05:16
@cursor
Copy link

cursor bot commented Dec 15, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@noisysocks noisysocks added this pull request to the merge queue Dec 15, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Dec 15, 2025
@noisysocks noisysocks enabled auto-merge December 15, 2025 09:51
@noisysocks noisysocks added this pull request to the merge queue Dec 15, 2025
Merged via the queue into main with commit d89478e Dec 15, 2025
17 checks passed
@noisysocks noisysocks deleted the randerson/shared-components-styling branch December 15, 2025 09:59
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.

3 participants