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

Update Switch component with new theme color variables #5185

Merged

Conversation

pastelcyborg
Copy link
Contributor

@pastelcyborg pastelcyborg commented Jun 24, 2024

Done

  • Updated colors in Switch component to use new theme variables

Fixes WD-11873

QA

  • Open the Switch example
  • Switch color theme
  • Ensure all UI elements look as expected throughout every interaction

Check if PR is ready for release

If this PR contains Vanilla SCSS code changes, it should contain the following changes to make sure it's ready for the release:

  • PR should have one of the following labels to automatically categorise it in release notes:
    • Feature 🎁, Breaking Change 💣, Bug 🐛, Documentation 📝, Maintenance 🔨.
  • Vanilla version in package.json should be updated relative to the most recent release, following semver convention:
    • if CSS class names are not changed it can be bugfix release (x.x.X)
    • if CSS class names are changed/added/removed it should be minor version (x.X.0)
    • see the wiki for more details
  • Any changes to component class names (new patterns, variants, removed or added features) should be listed on the what's new page.

@webteam-app
Copy link

@pastelcyborg
Copy link
Contributor Author

Please note that I made some assumptions here due to the following:

  • We don't have a themed focus color for links, so I left this the default focus color
  • I left the box-shadow as the default dark color, as shadows should probably always be dark anyway

@pastelcyborg pastelcyborg marked this pull request as ready for review June 24, 2024 15:46
scss/_patterns_switch.scss Outdated Show resolved Hide resolved
@bartaz
Copy link
Member

bartaz commented Jun 26, 2024

Cool, thanks @lyubomir-popov! The shadow update is trivial, but for the focus color, I'll probably need to create a new theme color. Any thoughts about this, @bartaz?

If we need one, than we need one. For now I assumed focus colour has good enough contrast regardless of the theme.
But we can surely add one, $colors--theme--color-focus I guess, (and consistently the CSS variable), with the values that are needed.

And yes, as you mentioned in MM, there is the %vf-focus that is used across the board that would need updating as well (possibly separately).

Maybe it would actually be worth doing a separate PR for focus colour theming, and only then update this one?

@jmuzina jmuzina added Review: Percy needed This PR needs a review of Percy for visual regressions and removed Review: Percy needed This PR needs a review of Percy for visual regressions labels Jun 26, 2024
@jmuzina
Copy link
Member

jmuzina commented Jun 26, 2024

@pastelcyborg
Copy link
Contributor Author

Switching this back to draft, since we talked about doing the focus color variable work prior to this.

@pastelcyborg pastelcyborg marked this pull request as draft June 26, 2024 13:45
@jmuzina
Copy link
Member

jmuzina commented Jun 26, 2024

Blocked pending #5192

@jmuzina jmuzina removed the Review: Percy needed This PR needs a review of Percy for visual regressions label Jun 26, 2024
@pastelcyborg pastelcyborg added Review: Percy needed This PR needs a review of Percy for visual regressions and removed Blocked ⛔ labels Jun 27, 2024
@pastelcyborg pastelcyborg marked this pull request as ready for review June 27, 2024 14:56
@pastelcyborg
Copy link
Contributor Author

This is once again ready for review now that #5192 has been merged.

@bartaz
Copy link
Member

bartaz commented Jun 27, 2024

Code looks good, but let's rebase it now, that the percy combined examples have been merged and see how that runs.

Copy link
Member

@bartaz bartaz left a comment

Choose a reason for hiding this comment

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

Good to go!

@pastelcyborg pastelcyborg merged commit f82114a into canonical:main Jun 27, 2024
10 checks passed
@pastelcyborg pastelcyborg deleted the update-switch-component-theming branch June 27, 2024 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants