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

WIP: Fix examples color theme system #5086

Closed

Conversation

jmuzina
Copy link
Member

@jmuzina jmuzina commented May 9, 2024

Done

Vanilla's example components have color theme pickers to help users view components in different color themes, however the color theme picker has some usability problems as-is:

  • The "selected" color theme is not shown on the theme picker. So the only way to tell which theme is selected is to guess or to click buttons until you find the active theme.
  • Some examples (such as Suru) have theme options for themes they do not support. For example, Suru only supports Paper & Dark, but the example page has an option for light (clicking this button does not do anything). This is confusing, and it also leads to a question of listing which components support which themes for maintainability reasons.

This PR makes the theme picker reflect the state of the example component, and only reflect the themes that are supported for the component.

Further, the color theme switcher has been changed to use the Segmented Control component as it is a better fit for our use case.

Fixes:

Color theme selection rules

(diagram / explanation WIP)

QA

  • Open demo
  • [Add QA steps]
  • Review updated documentation:
    • [List any updated documentation for review]

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 relesase (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.

Screenshots

[if relevant, include a screenshot or screen capture]

@jmuzina jmuzina added the Documentation 📝 Documentation changes or updates label May 9, 2024
@jmuzina jmuzina self-assigned this May 9, 2024
@webteam-app
Copy link

@jmuzina jmuzina force-pushed the example-color-theme-improvements branch from 64f1633 to e1c2ad8 Compare May 9, 2024 23:05
@jmuzina jmuzina force-pushed the example-color-theme-improvements branch from e1c2ad8 to 25f6acf Compare May 9, 2024 23:25
@jmuzina jmuzina force-pushed the example-color-theme-improvements branch from 3b876b1 to ed20283 Compare May 10, 2024 13:24
@jmuzina jmuzina mentioned this pull request May 10, 2024
3 tasks
@jmuzina
Copy link
Member Author

jmuzina commented May 10, 2024

Closed as too-broadly-scoped. Opting for more limited version #5087

@jmuzina jmuzina closed this May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation 📝 Documentation changes or updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants