Skip to content

Conversation

Myestery
Copy link
Collaborator

@Myestery Myestery commented Oct 16, 2025

This pull request introduces a comprehensive migration to new semantic CSS tokens throughout the design system and component library. The main goals are to standardize color usage, improve theme consistency (especially for dark and light modes), and enforce semantic naming conventions in both code and linting rules. The changes span the CSS variable definitions, Tailwind mappings, ESLint configuration, and numerous Vue components.

Design System & CSS Tokens

  • Added a full set of semantic CSS tokens for both light and dark modes to style.css, covering text, accent, button, interface, node, modal, and tooltip colors. These tokens are mapped to base palette values and replace previous ad-hoc color references. [1] [2]
  • Introduced Tailwind mappings for the new semantic tokens, enabling consistent usage of colors via semantic names in utility classes.

Linting and Code Quality

  • Updated the ESLint configuration to enforce the use of semantic CSS tokens by restricting direct usage of non-semantic class names (e.g., raw bg-, text-, border- with color codes), in addition to the existing restriction on the dark: prefix.

Component Refactors (Theme Consistency & Semantic Usage)

  • Refactored a wide range of Vue components (ShortcutsList.vue, IconGroup.vue, MoreButton.vue, CardContainer.vue, CardDescription.vue, SquareChip.vue, FormImageUpload.vue, LazyImage.vue, WorkflowTemplateSelectorDialog.vue) to use the new semantic CSS tokens in their classes, replacing previous hardcoded color, background, and border values. This ensures that all UI elements respond correctly to theme changes and follow the new design guidelines. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]

Summary of Most Important Changes

1. Semantic CSS Token Infrastructure

  • Added and mapped a comprehensive set of semantic CSS tokens for both light and dark themes in style.css. [1] [2]
  • Created Tailwind mappings for all new semantic tokens to facilitate consistent utility class usage.

2. Linting Enforcement

  • Updated ESLint rules to restrict usage of raw color classnames and enforce semantic token usage in Vue templates.

3. Component Refactors for Theme Consistency

  • Migrated color, background, and border classes in all major UI components to use semantic CSS tokens, removing direct palette references and ensuring proper dark/light theme support. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]

These changes will make the codebase easier to maintain, enhance accessibility, and ensure visual consistency across all themes and components.

┆Issue is synchronized with this Notion page by Unito

- Add 137 semantic tokens to style.css with light/dark mode variants
- Add tokens for text, accent, button, interface, node, modal, tooltip
- Add Tailwind @theme inline mappings for all new tokens
- Tokens enable automatic theme switching without conditional classes
- ExecuteButton: use bg-button-surface-blue
- BypassButton: use bg-button-hover-surface
- MenuOptionItem: use bg-button-surface-blue and bg-button-bkg-secondary for badges
- WidgetRecordAudio: use bg-button-surface-danger for stop button
- WidgetFileUpload: use node-component-surface and node-component-border tokens
- Remove inline style hex colors in favor of Tailwind token classes
…mponents

- buttonTypes: use bg-button-surface-contrast and text-accent-contrast
- VerticalDivider, SubmenuPopover, NodeOptions: use interface/* tokens
- Remove conditional dark-theme classes for automatic theme switching
…mponents

- MultiSelect: use bg-accent-blue and bg-button-surface
- SingleSelect: use text-text-primary and text-text-secondary
- SearchBox: use text-text-primary and text-text-secondary
- Enable automatic theme switching without conditional classes
…nents

- CardContainer, CardDescription: use modal-card-* tokens
- SquareChip: use text-text-secondary
- MoreButton, IconGroup: use button-* and interface-* tokens
- Remove conditional dark-theme classes
…omponents

- BaseModalLayout: use bg-modal-panel-surface
- NavTitle, NavItem: use text-text-secondary and interface-* tokens
- RightSidePanel, LeftSidePanel: use interface-panel-* tokens
- Remove conditional dark-theme classes for automatic theme switching
…mponents

- MediaAssetCard, AssetCard: use interface-panel-card-* tokens
- Media*Top/Bottom components: use text-text-secondary
- AssetGrid, AssetBadgeGroup: use interface-panel-* tokens
- MediaAssetMoreMenu, MediaAssetButtonDivider: use interface-* tokens
- Remove all conditional dark-theme classes
…xtensions

- AudioPreviewPlayer: use node-component-* and accent-primary tokens
- WidgetChart: use text-text-primary
- FormDropdownMenuFilter, FormDropdownMenuActions: use node-component-* tokens
- Remove conditional dark-theme classes
…components

- PackCard: use modal-card-* tokens
- WarningTabPanel: use modal-panel-* and text-text-* tokens
- PackVersionSelectorPopover: use modal-* tokens
- NodeConflictDialogContent, ManagerDialogContent: use modal-* tokens
- ManagerProgressFooter, ManagerProgressDialogContent: use modal-* and border-accent-primary
- Remove all conditional dark-theme classes
…nd misc components

- MissingCoreNodesMessage: use text-text-secondary
- FormImageUpload, LazyImage: use interface-* and modal-* tokens
- WorkflowTemplateSelectorDialog: use text-text-secondary
- ShortcutsList: use interface-* tokens
- ChatHistoryWidget, CopyButton: use interface-* and button-* tokens
- Remove conditional dark-theme classes
- AssetBrowserModal, AssetCard, AssetFilterBar stories: use modal-* tokens
- MultiSelect, SingleSelect stories: use bg-modal-background
- Update decorator backgrounds to use semantic tokens
- Remove conditional dark-theme classes from story configurations
- Prevent dark: prefix (require dark-theme: instead)
- Prevent direct hex colors in bg/text/border/fill/stroke classes
- Prevent dark-theme: usage (require semantic tokens that auto-switch)
- Add comments explaining each rule's purpose
Copy link

github-actions bot commented Oct 16, 2025

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 10/17/2025, 08:29:23 PM UTC

🔗 Links


🎉 Your Storybook is ready for review!

Copy link

github-actions bot commented Oct 16, 2025

🎭 Playwright Test Results

⚠️ Tests passed with flaky tests

⏰ Completed at: 10/17/2025, 08:44:01 PM UTC

📈 Summary

  • Total Tests: 499
  • Passed: 467 ✅
  • Failed: 0
  • Flaky: 2 ⚠️
  • Skipped: 30 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 458 / ❌ 0 / ⚠️ 2 / ⏭️ 30
  • chromium-2x: View Report • ✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • chromium-0.5x: View Report • ✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • mobile-chrome: View Report • ✅ 6 / ❌ 0 / ⚠️ 0 / ⏭️ 0

🎉 Click on the links above to view detailed test results for each browser configuration.

@Myestery Myestery marked this pull request as ready for review October 17, 2025 21:02
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Oct 17, 2025
@christian-byrne
Copy link
Contributor

Hm, is that unit test just flaky here? Seems pretty unrelated but a bit hard to tell.

@Myestery
Copy link
Collaborator Author

Hm, is that unit test just flaky here? Seems pretty unrelated but a bit hard to tell.

yeah its flaky, works here
However There are some colors I got wrong, doing manual visual checks again

@christian-byrne
Copy link
Contributor

Gotcha, can you assign me when it's ready?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think with a lot of this we're getting too granular.
For example: --text-blue and --accent-blue and --button-surface-blue having tokens.

What we'd want is just something like --warning: var(--color-ochre-700); --warning-surface: var(--color-stone-300);, not multiple warning/success/etc for each aspect of each context. We want fewer theme tokens that are more versatile (so that users who want to customize don't have to define 200 separate colors).

Copy link
Contributor

Choose a reason for hiding this comment

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

Would that be changed by designers or coders?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants