WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@jkuelz
Copy link
Member

@jkuelz jkuelz commented Dec 3, 2025

Issue #, if available:

Description of changes:

  • Seed-based color palette generation

    • Added color-generation/ module with HCT (Hue-Chroma-Tone) color space utilities
    • Implemented palette generators for primary, neutral, and warning color schemes
    • Support for both single seed colors and mode-aware seeds (light/dark)
    • Automatic generation of 50-1000 palette steps from a single seed color
  • Enhanced CSS variable handling

    • This was built upon feat: Add property for preserving css variables in token resolution #128, however instead of enabling through a feature flag, css variables will be the new default inheritance mechanism, for the reasons listed in that PR's description. Originally it was going to be a feature flag for runtime theming only, but it relies on also having the built theme (internal) enabling the flag as well.
    • Fixed transitive dependency tracking for context-overridden tokens
    • Improved transformer logic for nested var() references in non-global selectors
    • Better handling of mode vs context rule inheritance
  • Reference token processing

    • Handles three input types: string seed, explicit palette, or hybrid (seed + overrides)
    • Mode-aware palette generation with proper merging of explicit overrides
  • Code quality improvements

    • Extracted helper functions to reduce complexity in resolve.ts, transformer.ts, process.ts, and index.ts
    • Removed duplicate token collection logic
    • Added CSS variable reference extraction utilities

Testing

  • Added palette generation spec and a11y tests
  • Added runtime performance tests
  • Dev pipeline

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@jkuelz jkuelz requested a review from a team as a code owner December 3, 2025 08:05
@jkuelz jkuelz requested review from ernst-dev and removed request for a team December 3, 2025 08:05
@codecov
Copy link

codecov bot commented Dec 3, 2025

Codecov Report

❌ Patch coverage is 99.60707% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.49%. Comparing base (e28b540) to head (d82bbb4).

Files with missing lines Patch % Lines
src/shared/theme/resolve.ts 98.09% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #130      +/-   ##
==========================================
+ Coverage   97.43%   97.49%   +0.05%     
==========================================
  Files          45       48       +3     
  Lines        2185     2591     +406     
  Branches      413      541     +128     
==========================================
+ Hits         2129     2526     +397     
- Misses         56       65       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ernst-dev ernst-dev disabled auto-merge December 5, 2025 14:32
@ernst-dev ernst-dev enabled auto-merge December 5, 2025 14:32
@jkuelz jkuelz disabled auto-merge December 8, 2025 16:42
@jkuelz jkuelz added this pull request to the merge queue Dec 8, 2025
Merged via the queue into main with commit 531e8e6 Dec 8, 2025
194 of 228 checks passed
@jkuelz jkuelz deleted the jkuelz-seed-api-color-generation branch December 8, 2025 16:50
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.

2 participants