fix(configurator): render WCAG color swatches, sync to 0.5.29, show display type - #298
Merged
Merged
Conversation
…isplay type Three issues reported after #297 merged: - WCAG panel showed NO color swatches. The configurator never loads the framework stylesheet, so the visible panel's `var(--sf-color-*)` had no values — only the hidden probe roots carried them. Apply the same declaration block (declStr) to the visible .wcag container so the matrix swatches, checker result, on-color usage chips and locked-role swatches actually render (and follow the light/dark preview toggle). - Version stamp stuck at 0.5.28. The v0.5.29 'version-sync' commit bumped package.json but didn't re-run the configurator sync. Re-synced api-index.generated.json -> frameworkVersion 0.5.29 (819 tokens). - Live preview didn't showcase the display font sizes. Added a 'Display type' block (--sf-text-display-l/m/s with --sf-font-display) and a 'Type scale' block (--sf-text-2xl..xs). svelte-check clean, build OK, 42/42 tests.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR adds type-scale preview rendering to the Preview component with supporting styles, fixes token resolution in the WCAG panel by applying theme overrides to the visible container, and updates the framework version to 0.5.29. ChangesConfigurator UI Enhancements
🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request was created by @kiro-agent on behalf of @jackgranatowski 👻
Comment with /kiro fix to address specific feedback or /kiro all to address everything.
Learn about Kiro Web
Fixes three issues reported on the configurator after #297 was merged to
main.1. WCAG panel showed no color swatches
The standalone configurator never loads the framework stylesheet, so
--sf-color-*are undefined on the visible DOM — they're only injected (viabuildPreviewDeclarations) onto elements that carry the declaration block. The livePreviewapplies it to its stage (so it worked), butWcagPanelapplied it only to the hidden resolution probes, leaving every visiblevar(--sf-color-*)swatch blank. The contrast ratios were correct (read from the probes); only the visible color preview was missing.Fix: apply the same
declStrblock to the visible.wcagcontainer, so the matrix header swatches, the pair-checker result/sample, the "Text on colors" usage chips and the locked-role swatches all render — and follow the light/dark preview toggle.2. Version stuck at 0.5.28
The
chore: sync version artifacts to v0.5.29commit bumpedpackage.jsonbut didn't re-run the configurator sync, which stamps the framework version frompackage.json. Fix: re-syncedapi-index.generated.json→frameworkVersion: 0.5.29(819 tokens, unchanged set — display tokens were already present).3. Live preview didn't showcase display font sizes
The display tokens existed in the catalogue but the preview never rendered them. Fix: added a Display type block (
--sf-text-display-l/m/swith--sf-font-display/--sf-font-weight-display/--sf-display-*-line-height) and a Type scale block (--sf-text-2xl…xs).Testing
svelte-check: 0 errors/warnings ·npm run build: clean (framework 0.5.29) ·node --test: 42/42.Note
Branched off the latest
main(8323c14). The WP-plugin WCAG tab already wrapped its panel in the derived-var block, so it was unaffected; if you want the plugin's live preview to also showcase display sizes I can follow up (its preview recomputes vars and would need the display size tokens added).Summary by CodeRabbit
New Features
Bug Fixes