v6: Cheatsheet Example updates#42361
Open
coliff wants to merge 2 commits intotwbs:v6-devfrom
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the cheatsheet example to reflect new button variants and themed list group styling.
Changes:
- Update theme-color button examples to use
btn-outline+theme-*classes. - Add a new theme-color button example for
btn-subtle. - Update theme-color list group items to use
theme-*classes.
Comments suppressed due to low confidence (1)
site/src/assets/examples/cheatsheet/index.astro:1
- The visible label uses
${themeColor.name}(likely lowercase/internal token), while the button examples use${themeColor.title}for user-facing text. For consistency and more readable output in the cheatsheet, consider switching the list-group text to${themeColor.title}.
---
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
745
to
751
| <Example showMarkup={false} code={getData('theme-colors').map((themeColor) => ` | ||
| <button type="button" class="btn-solid theme-outline-${themeColor.name}">${themeColor.title}</button> | ||
| <button type="button" class="btn-outline theme-${themeColor.name}">${themeColor.title}</button> | ||
| `)} /> | ||
|
|
||
| <Example showMarkup={false} code={getData('theme-colors').map((themeColor) => ` | ||
| <button type="button" class="btn-subtle theme-${themeColor.name}">${themeColor.title}</button> | ||
| `)} /> |
There was a problem hiding this comment.
This maps over getData('theme-colors') twice in a row to render nearly identical button markup. Consider consolidating into a single loop over the variants (e.g., ['btn-outline', 'btn-subtle']) to reduce duplication and make future variant additions less error-prone.
f498e09 to
ee2b05c
Compare
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.
.btn-iconclass)There's still some remaining issues left, but I think they could be dealt with separately.
Ideally should add all new components too - e.g. OTP, chi[s, combo box, pw strength. nav overflow, drawer - but that can be done in a separate PR too though.
Type of changes
Checklist
npm run lint)Live previews
Related issues