Repository navigation
[CLOV-CSS] Migrate bpk-component-flare to CSS custom properties - #4929
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Migrates bpk-component-flare styling toward CSS custom properties (with Sass token fallbacks) and adds a Storybook example to demonstrate dark mode rendering.
Changes:
- Updated flare SCSS modules to use CSS custom properties for color tokens while annotating flare-specific dimension tokens.
- Updated Storybook styles to use CSS custom properties for palette/text tokens.
- Added a dark mode Storybook story using
BpkDarkExampleWrapper.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/backpack-web/src/bpk-component-flare/src/bpk-flare-bar.module.scss | Adds CSS custom property for surface fill; annotates flare dimension tokens. |
| packages/backpack-web/src/bpk-component-flare/src/bpk-content-bubble.module.scss | Adds CSS custom property for surface fill; annotates flare dimension tokens and normalizes formatting. |
| packages/backpack-web/src/bpk-component-flare/src/BpkFlare.stories.tsx | Adds BpkContentBubbleDarkMode story wrapped in BpkDarkExampleWrapper. |
| packages/backpack-web/src/bpk-component-flare/src/BpkFlare.stories.module.scss | Migrates story colors to CSS custom properties with Sass fallbacks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| max-width: 45rem; | ||
| margin: tokens.bpk-spacing-xl(); | ||
| color: tokens.$bpk-text-primary-inverse-day; | ||
| color: var(--bpk-text-inverse, tokens.$bpk-text-primary-inverse-day); |
| <BpkContentBubble | ||
| className={getClassName('bpk-flare-stories__content-bubble')} | ||
| rounded | ||
| flareProps={{svgClassName: getClassName('bpk-flare-stories__flare-bar--svg')}} | ||
| content={contentShort} |
0286356 to
b088101
Compare
|
Visit https://backpack.github.io/storybook-prs/4929 to see this build running in a browser. |
b088101 to
8583364
Compare
- Replace static SASS tokens with CSS var() + SASS fallbacks in SCSS modules - bpk-content-bubble: fill uses --bpk-surface-default - bpk-flare-bar: fill uses --bpk-surface-default - stories module: background-color uses --bpk-core-primary / --bpk-core-accent, color uses --bpk-text-inverse - Flare-specific dimension tokens annotated with gap comments - Add BpkContentBubbleDarkMode story using BpkDarkExampleWrapper Closes #4839 Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
8583364 to
5531b4b
Compare
|
Visit https://backpack.github.io/storybook-prs/4929 to see this build running in a browser. |
Vincent Liu (xiaogliu)
left a comment
There was a problem hiding this comment.
Reviewed ✅ — no issues found.
--bpk-core-primary(container background + flare-bar svg fill) updated together — paired correctly.--bpk-core-accent(content-bubble background) +--bpk-text-inverse(corresponding text colour) updated together — no missed sibling changes.--bpk-surface-default(rounded-corner fill) confirmed.- All new vars are confirmed to exist in the theme CSS files with values matching the original SASS tokens.
- Nice catch: the
stylelint-disable-next-linecomments were correctly converted todisable/enableblock pairs, since the reformatted multi-linecalc()would no longer be covered by a single-line disable.
Verified new token values against token-sync/css/theme-backpack-light.css / theme-backpack-dark.css / primitives.css.
|
Visit https://backpack.github.io/storybook-prs/4929 to see this build running in a browser. |
Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
|
Visit https://backpack.github.io/storybook-prs/4929 to see this build running in a browser. |
….scss Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
… bpk-component-flare Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
|
Visit https://backpack.github.io/storybook-prs/4929 to see this build running in a browser. |
Closes #4839
Changes
Migrates
bpk-component-flareSCSS modules to CSS custom properties with SASS token fallbacks for light/dark mode support.SCSS migrations
bpk-content-bubble.module.scssfill: tokens.$bpk-surface-default-day→fill: var(--bpk-surface-default, tokens.$bpk-surface-default-day)$bpk-flare-corner-radius,$bpk-flare-height-desktop,$bpk-flare-height-mobile) annotated with/* gap: flare-specific dimension */commentsbpk-flare-bar.module.scssfill: tokens.$bpk-surface-default-day→fill: var(--bpk-surface-default, tokens.$bpk-surface-default-day)BpkFlare.stories.module.scssbackground-color: tokens.$bpk-core-primary-day→var(--bpk-core-primary, tokens.$bpk-core-primary-day)fill: tokens.$bpk-core-primary-day→var(--bpk-core-primary, tokens.$bpk-core-primary-day)background-color: tokens.$bpk-core-accent-day→var(--bpk-core-accent, tokens.$bpk-core-accent-day)color: tokens.$bpk-text-primary-inverse-day→var(--bpk-text-inverse, tokens.$bpk-text-primary-inverse-day)Stories
Added
BpkContentBubbleDarkModestory usingBpkDarkExampleWrapperto demonstrate dark mode rendering.No themeAttributes changes
No
themeAttributes.tsxfile exists for this component — flare has no per-instance theme override API.