Skip to content
This repository was archived by the owner on Aug 5, 2026. It is now read-only.

[CLOV-CSS] Migrate bpk-component-journey-arrow to CSS custom properties - #4939

Merged
Vincent Liu (xiaogliu) merged 3 commits into
mainfrom
migrate/css-vars-journey-arrow-4812
Jul 23, 2026
Merged

Vincent Liu (xiaogliu) merged 3 commits into
mainfrom
migrate/css-vars-journey-arrow-4812

Conversation

@gert-janvercauteren

Copy link
Copy Markdown
Contributor

Closes #4812

Changes

Migrates bpk-component-journey-arrow SCSS to CSS custom properties with SASS token fallbacks for light/dark mode support.

Token migrations

SASS token CSS var
tokens.$bpk-surface-default-day var(--bpk-surface-default, ...)
tokens.$bpk-status-danger-spot-day var(--bpk-status-danger-spot, ...)

Gap

The border-image SVG data URI contains a hardcoded fill colour (%23C1C7CF) that cannot reference CSS custom properties — a TODO comment marks this gap for future resolution.

Stories

Added VisualTestDark story using BpkDarkExampleWrapper with bpkTheme: 'dark' and dark-mode-compatible tag.

Copilot AI review requested due to automatic review settings July 22, 2026 08:19
@skyscanner-backpack-bot

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-journey-arrow styling toward CSS custom properties (with SASS token fallbacks) and adds Storybook coverage for dark mode.

Changes:

  • Updated Journey Arrow SCSS to use CSS custom properties with SASS token fallbacks.
  • Added a dark-mode visual test story using BpkDarkExampleWrapper.
  • Reformatted Storybook example JSX for consistency/readability.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/backpack-web/src/bpk-component-journey-arrow/src/BpkJourneyArrow.stories.tsx Adds dark-mode visual test story and reformats the example markup.
packages/backpack-web/src/bpk-component-journey-arrow/src/BpkJourneyArrow.module.scss Replaces specific token usages with CSS custom properties and fallbacks for theme support.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@skyscanner-backpack-bot

Copy link
Copy Markdown
Contributor

@gert-janvercauteren
Gert-Jan Vercauteren (gert-janvercauteren) force-pushed the migrate/css-vars-journey-arrow-4812 branch 2 times, most recently from c0262cf to 37d472b Compare July 22, 2026 09:59
@skyscanner-backpack-bot

Copy link
Copy Markdown
Contributor

Closes #4812

Migrates $bpk-surface-default-day and $bpk-status-danger-spot-day to
var(--bpk-surface-default, ...) and var(--bpk-status-danger-spot, ...)
with SASS fallbacks for dark mode support.

Adds a gap comment for the hardcoded SVG fill colour in the border-image
data URI, which cannot reference CSS custom properties.

Adds VisualTestDark story using BpkDarkExampleWrapper.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
@skyscanner-backpack-bot

Copy link
Copy Markdown
Contributor

Removes the TODO comment that was incorrectly placed inside &__stop
instead of alongside the border-image line, and was missing the required
empty line before it (stylelint comment-empty-line-before error).

Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
@skyscanner-backpack-bot

Copy link
Copy Markdown
Contributor

@xiaogliu

Copy link
Copy Markdown
Contributor

Token value audit — verified every new CSS var introduced in this PR against token-sync/css/theme-backpack-light.css / theme-backpack-dark.css and the original SASS token source (base.default.scss):

CSS var Old SASS fallback Light value Dark value Match
--bpk-surface-default $bpk-surface-default-day #ffffff #131d2b ✅
--bpk-status-danger-spot $bpk-status-danger-spot-day #e70866 #ff649c ✅

All new/old values match — no visual regression risk from this migration.

@xiaogliu Vincent Liu (xiaogliu) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@xiaogliu
Vincent Liu (xiaogliu) merged commit 33338a5 into main Jul 23, 2026
20 of 21 checks passed
@xiaogliu
Vincent Liu (xiaogliu) deleted the migrate/css-vars-journey-arrow-4812 branch July 23, 2026 08:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate bpk-component-journey-arrow to CSS custom properties

3 participants