docs: fix palette explorer export and frame the palettes page#629
Draft
johnleider wants to merge 1 commit into
Draft
docs: fix palette explorer export and frame the palettes page#629johnleider wants to merge 1 commit into
johnleider wants to merge 1 commit into
Conversation
The palette explorer's Copy Config button emitted a fully commented-out colors block, so pasting its output produced a theme with no colors; the click path emitted keyless token lines that were invalid once uncommented. onExport now emits real, uncommented config: clicked swatches map to theme roles in click order, and the no-click default seeds primary/secondary from hues that actually exist in the selected palette so the reference resolves. Adds framing prose above the explorer (static vs generator, token-reference syntax, axis-flip note) and an in-widget hint explaining click-to-copy.
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.
Problem
The
/guide/features/palettespage rated poorly for being confusing. Root cause was the interactive explorer at the top of the page:onExportproduced acolorsblock where every line was commented out — pasting the output gave a theme with no colors defined (silent no-op). The click path was worse: it emitted bare token strings with no role key, which are a syntax error once uncommented.{palette.…}token syntax were never framed before the widget.Changes
onExportnow emits real, uncommented config. Clicked swatches map to theme roles (primary,secondary, …) in click order; the no-click default seedsprimary/secondaryfrom hues that actually exist in the selected palette (the old default hardcodedblue.500/slate.600, which don't exist outside Tailwind).Verification
vue-tsconapps/docs: 0 errors. ESLint clean.