-
Notifications
You must be signed in to change notification settings - Fork 50
[06] [Project Solar / Phase 1 / Dry-run] Migration dry-run for foundations and components #3332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: project-solar/phase-1/HDS-5242_showcase/carbonization-pages-scaffolding
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
86a4951 to
0a9791e
Compare
3731bea to
60813bf
Compare
0a9791e to
06337a0
Compare
60813bf to
d9c624f
Compare
06337a0 to
94eef11
Compare
d9c624f to
1a2dc30
Compare
94eef11 to
5eaa1a9
Compare
1a2dc30 to
d9b9424
Compare
5eaa1a9 to
4ebba11
Compare
d9b9424 to
034f90f
Compare
4ebba11 to
de9fc57
Compare
034f90f to
a7961ca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements a migration dry-run for the HDS "carbonization" project, adding component-level design tokens with mode definitions to support both default HDS styling and Carbon Design System themes (cds-g0, cds-g10, cds-g90, cds-g100). The work focuses on foundations (typography, colors) and select components (Badge, BadgeCount, Button, Modal, Form inputs) to validate the migration approach before full implementation.
Key changes:
- Introduced
$modesdefinitions in token JSON files to support theme variations - Created component-specific token files for Button, Badge, and BadgeCount
- Updated SCSS styles to reference new component-level tokens instead of hardcoded values or generic tokens
- Added postbuild scripts to copy generated CSS to showcase public assets
Reviewed changes
Copilot reviewed 23 out of 58 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/tokens/src/products/shared/typography.json | Restructured font stack definitions with "combined" properties and added $modes for Carbon theme support |
| packages/tokens/src/products/shared/button.json | New comprehensive button token definitions covering height, padding, typography, colors, borders, and icons with theme modes |
| packages/tokens/src/products/shared/badge.json | New badge token definitions for sizing, typography, colors, surfaces, borders, and icons with theme modes |
| packages/tokens/src/products/shared/badge-count.json | New badge-count specific horizontal padding tokens with theme modes |
| packages/tokens/src/products/shared/form/radiocard.json | Added border radius and color tokens with theme modes |
| packages/tokens/src/global/color/semantic-*.json | Added $modes to semantic color tokens for Carbon theme mapping |
| packages/tokens/src/global/color/palette-*.json | Added $modes to palette color tokens for Carbon theme mapping |
| packages/tokens/src/global/border/radius.json | Added $modes to border radius tokens (0 for all Carbon themes) |
| packages/tokens/package.json | Added postbuild script to copy themed token CSS to showcase assets |
| packages/components/src/styles/mixins/_button.scss | Replaced hardcoded values and Sass variables with component-level design tokens |
| packages/components/src/styles/mixins/_interactive-dark-theme.scss | Updated border-radius to use button token instead of Sass variable |
| packages/components/src/styles/components/button.scss | Added Carbon-specific styling with justify-content adjustment |
| packages/components/src/styles/components/badge.scss | Refactored to use badge tokens, simplified color/type combinations with loops |
| packages/components/src/styles/components/badge-count.scss | Refactored to use badge tokens, simplified with loops |
| packages/components/src/styles/components/form/*.scss | Updated button-related properties to use button tokens |
| packages/components/src/styles/components/dropdown.scss | Replaced button Sass variables with button tokens |
| packages/components/package.json | Added postbuild script to copy component CSS to showcase assets |
6e213a8 to
b69f52a
Compare
|
Are the Percy visual diffs all as expected? The preview for the |
…nd components, to copy relevant CSS files to showcase public folder
…palette` src JSON tokens
… updated CSS styling to use them
…es in other components’ files
b69f52a to
62f73a0
Compare
@KristinLBradley I don't know why it's happening, I also tried to re-run all the tests but they fail again. It seems strange, since nothing has changed in terms of Table/Advanced table. Maybe something related to Percy itself? (those pages are huge to screenshot) |
62f73a0 to
6e3d58b
Compare
📌 Summary
This PR contains the code changes for the actual dry-run of the HDS migration/carbonization.
This PR is based on top of #3241
🛠️ Detailed description
In this PR I have added new tokens (where needed) and
$modesdefinitions insrcJSON tokens for:typographycolor/semanticandcore/palettebadge/badge-countbuttonmodalfile/text-inputfile/radio-cardThen I have updated the CSS styling to use the newly created component-level tokens.
Finally, I have
🛠️ How to test
Note
This is a dry-run, not a final implementation, so the goal was to learn and discover, not perfection or production-ready code; the proper "final" design tokens and styles will be implemented during the proper "migration" (next phase).
Open the different "carbonized" pages and see how the HDS components are rendered, and how the Carbon Web components are rendered, and what are the differences (some are very similar, others are quite different).
Note: the implementation of focus rings for the component will be done in separate work stream.
If you want, you can also test the adoption in the consumers' application (see PRs below).
🔗 External links
Jira tickets:
Bage/BadgeCount: https://hashicorp.atlassian.net/browse/HDS-5664Button: https://hashicorp.atlassian.net/browse/HDS-5665Modal: https://hashicorp.atlassian.net/browse/HDS-5685Form/RadioCard: https://hashicorp.atlassian.net/browse/HDS-5684Consumer testing PRs:
👀 Component checklist
A changelog entry was added via Changesets if needed (see templates here)💬 Please consider using conventional comments when reviewing this PR.
📋 PCI review checklist
Examples of changes to controls include access controls, encryption, logging, etc.
Examples include changes to operating systems, ports, protocols, services, cryptography-related components, PII processing code, etc.