Conversation
🦋 Changeset detectedLatest commit: 13fe473 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Design Token Diff (CSS)The message is too long to be displayed here. For more details, please check the job summary. |
Design Token Diff (StyleLint)The message is too long to be displayed here. For more details, please check the job summary. |
Design Token Diff (Figma)
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 19 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Special handling for data visualization colors - use pattern compression | ||
| if (category === 'data') { | ||
| const categoryDesc = getCategoryDescription(category) | ||
| if (categoryDesc) { | ||
| lines.push('') | ||
| lines.push(categoryDesc) | ||
| } | ||
| lines.push('') | ||
|
|
||
| // Get usage and rules from the first token with LLM metadata | ||
| const firstWithMeta = nonSemanticTokens.find(t => t.usage || t.rules) | ||
| if (firstWithMeta) { | ||
| if (firstWithMeta.usage && firstWithMeta.usage.length > 0) { | ||
| lines.push(`**U:** ${firstWithMeta.usage.join(', ')}`) | ||
| } | ||
| if (firstWithMeta.rules) { | ||
| lines.push(`**R:** ${firstWithMeta.rules}`) | ||
| } | ||
| lines.push('') | ||
| } | ||
|
|
||
| outputDataVisColorPattern(nonSemanticTokens, lines) | ||
| continue | ||
| } | ||
|
|
||
| // Special handling for display colors - use pattern compression | ||
| if (category === 'display') { | ||
| const categoryDesc = getCategoryDescription(category) | ||
| if (categoryDesc) { | ||
| lines.push('') | ||
| lines.push(categoryDesc) | ||
| } | ||
| lines.push('') | ||
|
|
||
| // Get usage and rules from the first token with LLM metadata | ||
| const firstWithMeta = nonSemanticTokens.find(t => t.usage || t.rules) | ||
| if (firstWithMeta) { | ||
| if (firstWithMeta.usage && firstWithMeta.usage.length > 0) { | ||
| lines.push(`**U:** ${firstWithMeta.usage.join(', ')}`) | ||
| } | ||
| if (firstWithMeta.rules) { | ||
| lines.push(`**R:** ${firstWithMeta.rules}`) | ||
| } | ||
| lines.push('') | ||
| } | ||
|
|
||
| outputDisplayColorPattern(nonSemanticTokens, lines) | ||
| continue | ||
| } | ||
|
|
||
| // Special handling for color category (ansi, prettylights subcategories) | ||
| if (category === 'color') { | ||
| // Separate tokens by subcategory | ||
| const ansiTokens = nonSemanticTokens.filter(t => t.name.startsWith('color-ansi-')) | ||
| const prettylightsTokens = nonSemanticTokens.filter(t => t.name.startsWith('color-prettylights-')) | ||
| const otherTokens = nonSemanticTokens.filter( | ||
| t => !t.name.startsWith('color-ansi-') && !t.name.startsWith('color-prettylights-'), | ||
| ) | ||
|
|
||
| // Output ANSI tokens with pattern compression | ||
| if (ansiTokens.length > 0) { | ||
| lines.push('### ANSI Terminal Colors') | ||
| lines.push('') | ||
| const ansiMeta = ansiTokens.find(t => t.description) | ||
| if (ansiMeta?.description) { | ||
| lines.push(ansiMeta.description) | ||
| lines.push('') | ||
| } | ||
| const ansiWithMeta = ansiTokens.find(t => t.usage || t.rules) | ||
| if (ansiWithMeta) { | ||
| if (ansiWithMeta.usage && ansiWithMeta.usage.length > 0) { | ||
| lines.push(`**U:** ${ansiWithMeta.usage.join(', ')}`) | ||
| } | ||
| if (ansiWithMeta.rules) { | ||
| lines.push(`**R:** ${ansiWithMeta.rules}`) | ||
| } | ||
| lines.push('') | ||
| } | ||
| outputAnsiColorPattern(ansiTokens, lines) | ||
| } | ||
|
|
||
| // Output prettylights tokens with prefix grouping | ||
| if (prettylightsTokens.length > 0) { | ||
| lines.push('### Syntax Highlighting (prettylights)') | ||
| lines.push('') | ||
| const plMeta = prettylightsTokens.find(t => t.description) | ||
| if (plMeta?.description) { | ||
| lines.push(plMeta.description) | ||
| lines.push('') | ||
| } | ||
| const plWithMeta = prettylightsTokens.find(t => t.usage || t.rules) | ||
| if (plWithMeta) { | ||
| if (plWithMeta.usage && plWithMeta.usage.length > 0) { | ||
| lines.push(`**U:** ${plWithMeta.usage.join(', ')}`) | ||
| } | ||
| if (plWithMeta.rules) { | ||
| lines.push(`**R:** ${plWithMeta.rules}`) | ||
| } | ||
| lines.push('') | ||
| } | ||
| outputPrettylightsPattern(prettylightsTokens, lines) | ||
| } | ||
|
|
||
| // Output any other color tokens normally | ||
| if (otherTokens.length > 0) { | ||
| for (const token of otherTokens) { | ||
| lines.push(`### ${token.name}`) | ||
| if (token.description) { | ||
| lines.push(token.description) | ||
| } | ||
| if (token.usage && token.usage.length > 0) { | ||
| lines.push(`**U:** ${token.usage.join(', ')}`) | ||
| } | ||
| if (token.rules) { | ||
| lines.push(`**R:** ${token.rules}`) | ||
| } | ||
| lines.push('') | ||
| } | ||
| } | ||
| continue | ||
| } |
There was a problem hiding this comment.
New output paths were added for data, display, and color categories (pattern compression + prettylights/ANSI grouping), but there are no corresponding unit tests asserting the generated markdown for these cases. Since this formatter is already covered by tests, please add targeted cases for the new branches (e.g., data-*-color-*, display-*-scale-*, color-ansi-*, color-prettylights-*) to prevent regressions.
Adding metadata: