Conversation
✅ Deploy Preview for boosted ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
7c68469 to
cbcf0a2
Compare
|
Just a quick comment, but it would be great to also have the associated theme that should be used in combination of the class |
There was a problem hiding this comment.
🟡 Changes recommended
The updated background documentation no longer clearly surfaces the per-utility recommended data-bs-theme values (a key requirement of #3489), and the current table rendering introduces at least one misleading preview case (transparent).
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the background utilities documentation to present background-related utilities in a tabular “color table” format (similar to the color utilities docs), and extends the shared ColorTable shortcode to support non-token-based class lists.
Changes:
- Replaces several
<Example>blocks inutilities/background.mdxwith<ColorTable>instances for Bootstrap compatibility and OUDS background/surface/always/opacity groupings. - Enhances
ColorTable.astroto supportbasicClasses(non-token-driven rows) and an optionalhasBackdropflag, and refactors token collection into a singletokenslist.
File summaries
| File | Description |
|---|---|
| site/src/content/docs/utilities/background.mdx | Switches background utility documentation examples to ColorTable tables, including Bootstrap-compatibility and OUDS token-backed sections. |
| site/src/components/shortcodes/ColorTable.astro | Adds support for basicClasses-driven tables and optional backdrop indication, and refactors token extraction/rendering accordingly. |
Review details
Suppressed comments (1)
site/src/components/shortcodes/ColorTable.astro:140
- Same issue as the light-mode column: the preview class name for
basicClassesis derived fromgetUsage(token.colorName)withoutcolorPrefix, which can break the defaultgetUsageimplementation and is inconsistent with the usage cell.
Pass colorPrefix and use a boolean value for class:list for clarity.
class:list={['w-100 h-100 mb-none d-flex justify-content-center align-items-center', basicClasses.length > 0 ? { [ getUsage(token.colorName).replace('.', '')]: token.colorName } : {}]}
- Files reviewed: 2/2 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| <ColorTable | ||
| colorPrefix="ouds/color/bg/" | ||
| tokenRegexp={/\$ouds-color-(bg-(?<colorName>.*)-light)/} | ||
| getUsage={(colorName) => `.bg-${colorName}`} /> |
| <ColorTable | ||
| colorPrefix="ouds/color/transparent/" | ||
| basicClasses={['transparent']} | ||
| getUsage={(colorName) => `.bg-${colorName}`} /> |
Related issues
Closes #3489
Description
Improves background documentation by displaying them in color tables like in color utilities docs.
Checklists
Progression (for Core Team only)
ouds/mainfollowing conventional commitLive previews