Skip to content

Introduce static color palette using Leonardo, update button variants and appearances, add Docs#18791

Open
gcamacho079 wants to merge 26 commits into
6.xfrom
a11y/static-color-palette
Open

Introduce static color palette using Leonardo, update button variants and appearances, add Docs#18791
gcamacho079 wants to merge 26 commits into
6.xfrom
a11y/static-color-palette

Conversation

@gcamacho079
Copy link
Copy Markdown
Contributor

@gcamacho079 gcamacho079 commented May 5, 2026

Description

  • Adds a static color theme (example: --color-static-blue-300) for colors we don’t want to change based on light/dark theme. This theme can be viewed on the Color Palette Storybook page.
  • Updates warning color value in generate-colors.js to be consistent with other warning colors in the control panel
  • Made updates to variant and appearance names for clarity and consistency.
    • accent was previously a semantic variant as well as the name for the “most accented” component. In this PR, I retained the semantic name but updated the appearance name to be “solid.”
  • Buttons were pared down to 3 appearances (solid, outline, and plain), which is consistent with the larger appearance subset (leaving out outline-fill and fill).
  • Button hover and active colors are generated by dropping the lightness level of the colors, which should help to maintain contrast ratios.
  • Rather than having default amongst the semantic color names, the default option has been renamed to neutral. I personally found the use of default really confusing, since it wasn’t clear whether it referred to an appearance or a variant. Sticking to a semantic naming style helped clarify this.
    • I think the only remaining thing we could clarify is that info/accent are used similarly and have a similar color scheme. 🤔
  • Updates the primary/accent color to blue to prevent using a similar color to the danger variant
Static color palette viewed in Storybook Screenshot of the callout variants and appearances, and how they are consistent with the button variant/appearance subset

Related issues

Resolves ACC-36

@semanticdiff-com
Copy link
Copy Markdown

semanticdiff-com Bot commented May 5, 2026

Review changes with  SemanticDiff

Changed Files
File Status
  resources/js/composables/useCraftData.ts  100% smaller
  resources/js/pages/SettingsSectionsIndexPage.vue  100% smaller
  resources/js/pages/SettingsSitesIndex.vue  100% smaller
  resources/build/cp3.js  100% smaller
  resources/build/InputCombobox.js  100% smaller
  resources/build/AppLayout.js  100% smaller
  resources/build/SettingsSectionsEditPage.js  97% smaller
  resources/build/useEditableTable.js  97% smaller
  resources/build/SettingsSitesEdit.js  96% smaller
  resources/build/SettingsSectionsIndexPage.js  95% smaller
  resources/build/SettingsSitesIndex.js  95% smaller
  resources/build/assets/InputCombobox.css  86% smaller
  resources/js/components/form/EntryTypeSelect.vue  83% smaller
  packages/craftcms-cp/scripts/generate-color-palette.js  82% smaller
  resources/build/assets/SettingsSectionsEditPage.css  59% smaller
  resources/build/assets/SettingsSitesIndex.css  56% smaller
  resources/build/manifest.json  34% smaller
  packages/craftcms-cp/src/components/button/button.styles.ts  21% smaller
  resources/build/_plugin-vue_export-helper.js  15% smaller
  packages/craftcms-cp/src/components/button/button.stories.ts  10% smaller
  packages/craftcms-cp/src/components/indicator/indicator.ts  9% smaller
  packages/craftcms-cp/src/components/button/Docs.mdx Unsupported file format
  packages/craftcms-cp/src/components/switch-button/switch-button.ts  0% smaller
  packages/craftcms-cp/src/stories/tokens/Colors.mdx Unsupported file format
  packages/craftcms-cp/src/styles/color-definitions.js  0% smaller
  packages/craftcms-cp/src/styles/shared/color-palette.css  0% smaller
  packages/craftcms-cp/src/styles/shared/tokens.css  0% smaller
  resources/build/assets/AppLayout.css Unsupported file format
  resources/build/assets/cp.css Unsupported file format
  resources/js/components/DevModeIndicator.vue  0% smaller

@gcamacho079 gcamacho079 changed the title A11y/static color palette Introduce static color palette using Leonardo, update button variants and appearances, add Docs May 15, 2026
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 15, 2026

ACC-36

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a Leonardo-generated static color palette (theme-invariant), updates craft-button variants/appearances to a new model, and adds/expands Storybook documentation around tokens and buttons.

Changes:

  • Added a static Leonardo theme + new static tokens, and updated the generated static palette values.
  • Refactored craft-button to new variant/appearance options and updated related styles/stories/docs.
  • Propagated read-only handling and updated a few CP UI components to use the new static colors.

Reviewed changes

Copilot reviewed 18 out of 32 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
resources/js/pages/SettingsSitesIndex.vue Minor table state formatting tweak (column visibility).
resources/js/pages/SettingsSectionsIndexPage.vue Table column visibility formatting; action button markup adjusted.
resources/js/composables/useCraftData.ts Type formatting fix (semicolon).
resources/js/components/form/EntryTypeSelect.vue Formatting/markup adjustments around action arrays and buttons.
resources/js/components/DevModeIndicator.vue Switches dev-mode stripes to use a (new) static warning color token.
resources/build/useEditableTable.js Built output updated (read-only handling and imports).
resources/build/SettingsSitesIndex.js Built output updated (read-only derived from dist + column visibility).
resources/build/SettingsSitesEdit.js Built output updated (read-only derived from dist + disabled wiring).
resources/build/SettingsSectionsIndexPage.js Built output updated (read-only derived from dist + UI changes).
resources/build/SettingsSectionsEditPage.js Built output updated (read-only derived from dist + entry type UI changes).
resources/build/manifest.json Adds new build import dependency entries (e.g. _dist.js).
resources/build/InputCombobox.js Built output updated (adds disabled support wiring).
resources/build/assets/SettingsSitesIndex.css Built CSS hash updated for scoped styles.
resources/build/assets/SettingsSectionsEditPage.css Built CSS hash updated for scoped styles.
resources/build/assets/InputCombobox.css Built CSS hash updated for scoped styles.
resources/build/assets/AppLayout.css Built CSS updated (dev mode stripe token ref + scoped hash).
resources/build/AppLayout.js Built output updated (scope hash changes reflected).
packages/craftcms-cp/src/styles/static-variants.styles.ts New shared Lit CSS for static variant-to-token mapping.
packages/craftcms-cp/src/styles/shared/tokens.css Adds --c-text-black and introduces static component color tokens.
packages/craftcms-cp/src/styles/shared/color-palette.css Replaces static palette values with newly generated ones.
packages/craftcms-cp/src/styles/color-definitions.js Adds static contrast ratios and exports a staticTheme.
packages/craftcms-cp/src/stories/tokens/Colors.mdx Documents static colors and renders the static palette in Storybook.
packages/craftcms-cp/src/components/switch-button/switch-button.ts Updates checked track color to reference a static success token.
packages/craftcms-cp/src/components/indicator/indicator.ts Moves indicator styling to the new static variants token system.
packages/craftcms-cp/src/components/button/Docs.mdx New Storybook docs page for button appearance/variant guidance.
packages/craftcms-cp/src/components/button/button.ts Updates the public button API (appearance/variant definitions).
packages/craftcms-cp/src/components/button/button.styles.ts Refactors button appearance/variant styling to match new API.
packages/craftcms-cp/src/components/button/button.stories.ts Updates stories to new API + adds variant-focused story.
packages/craftcms-cp/scripts/generate-color-palette.js Generates static palette from staticTheme (not the light theme).
Files not reviewed (11)
  • resources/build/AppLayout.js: Language not supported
  • resources/build/InputCombobox.js: Language not supported
  • resources/build/SettingsSectionsEditPage.js: Language not supported
  • resources/build/SettingsSectionsIndexPage.js: Language not supported
  • resources/build/SettingsSitesEdit.js: Language not supported
  • resources/build/SettingsSitesIndex.js: Language not supported
  • resources/build/assets/AppLayout.css: Language not supported
  • resources/build/assets/InputCombobox.css: Language not supported
  • resources/build/assets/SettingsSectionsEditPage.css: Language not supported
  • resources/build/assets/SettingsSitesIndex.css: Language not supported
  • resources/build/useEditableTable.js: Language not supported

Comment thread packages/craftcms-cp/src/components/switch-button/switch-button.ts Outdated
Comment thread resources/js/components/DevModeIndicator.vue Outdated
Comment thread resources/js/pages/SettingsSectionsIndexPage.vue
Comment thread packages/craftcms-cp/src/components/button/button.ts
Comment thread packages/craftcms-cp/src/components/button/button.stories.ts Outdated
@gcamacho079 gcamacho079 marked this pull request as ready for review May 17, 2026 19:10
@gcamacho079 gcamacho079 requested a review from brianjhanson May 17, 2026 19:10
@gcamacho079
Copy link
Copy Markdown
Contributor Author

@brianjhanson, we discussed a few more changes in the last design meeting (such as opt-out/styleless buttons), but I wanted to keep this PR focused on the static color palette and working through some of the naming consistency we discussed.

@gcamacho079 gcamacho079 added accessibility 👤 features related to accessibility ui 👀 features related to the control panel UI 🖥 UI labels May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility 👤 features related to accessibility ui 👀 features related to the control panel UI 🖥 UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants