Skip to content

Conversation

@Faye-Xiao
Copy link
Contributor

Remember to include the following changes:

  • Ensure the PR title includes the name of the component you are changing so it's clear in the release notes for consumers of the changes in the version e.g [Clover-123][BpkButton] Updating the colour
  • README.md (If you have created a new component)
  • Component README.md
  • Tests
  • Accessibility tests
    • The following checks were performed:
      • Ability to navigate using a keyboard only
      • Zoom functionality (Deque University explanation):
        • The page SHOULD be functional AND readable when only the text is magnified to 200% of its initial size
        • Pages must reflow as zoom increases up to 400% so that content continues to be presented in only one column i.e. Content MUST NOT require scrolling in two directions (both vertically and horizontally)
      • Ability to navigate using a screen reader only
  • Storybook examples created/updated
  • For breaking changes or deprecating components/properties, migration guides added to the description of the PR. If the guide has large changes, consider creating a new Markdown page inside the component's docs folder and link it here

Faye (Faye-Xiao) and others added 2 commits December 2, 2025 19:04
…irectory and add BpkProvider,BpkBox (#4067)

* feat(layout): add BpkProvider/BpkBox, tokens, tests and examples

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Faye-Xiao Faye (Faye-Xiao) added DON'T MERGE PoC Do not merge it to main major Breaking change labels Dec 8, 2025
Faye (Faye-Xiao) and others added 5 commits December 9, 2025 16:46
* add BpkStack

* add BpkStack-test and change Stories

* change bpkStack test

* add flex props

* add semicolumn and add more descriptions to Stack examples

* change lint and main.ts

* add accessibility test for stack
* add Grid and Flex

* update

* add GridItem

* responsive

* fix test issue

* add Grid responsive example

* responsive

* split story book

* wrap props responsive

* add basis type

---------

Co-authored-by: Faye <faye.xiao@skyscanner.net>
…dy up storybook examples (#4085)

* fix(layout): align breakpoints and remove large-desktop

- Restrict public breakpoints to 5 foundations tiers

- Align token->Chakra breakpoint mapping with theme

- Update README and tests; fix Grid test typo

* chore(storybook): regroup layout stories by component

- Use a single 'bpk-component-layout' sidebar node

- Add dedicated examples for Flex/Grid/Stack components

* chore(storybook): group layout stories by component

- Keep Provider example at bpk-component-layout root

- Move Box/Flex/Grid/Stack examples into dedicated story groups

- Add tabbed docs content on root layout page

* chore(storybook): split layout examples by component

- Make Box examples independent (no Stack in Box examples file)

- Reuse flex-examples/grid-examples/stack-examples directly

- Remove duplicate default exports from stories

* chore(storybook): move layout visual tests to root

- Put VisualTest and VisualTestWithZoom under bpk-component-layout

- Use default Storybook docs rendering for root

- Remove visual test exports from Box story

* feat(layout): add responsive support for Box layout props

- Allow Backpack breakpoint objects for BpkBox flex/grid/display props

- Keep spacing token processing unchanged

- Document component roles and responsive support

* refactor(layout): centralize responsive prop allowlists

- Add component-scoped allowlists in tokenUtils

- Introduce processBpkComponentProps to avoid duplicate breakpoint mapping

- Simplify Box/Flex/Grid/Stack prop processing

* fix(layout): align breakpoints to Backpack ranges

- Use min-width lower-bounds for Chakra breakpoints

- Clarify mobile-first semantics in README

- Update ResponsiveExample to include base defaults

* fix(layout): prevent unprocessed responsive props from leaking

- Drop allowlisted layout props from processed props before merging

- Add test to ensure Chakra array responsive values are rejected

* refactor(layout): group responsive allowlists by role

- Organize allowlisted responsive props into container vs item groups per component

- Preserve existing allowlist behavior

* chore(storybook): clarify layout example boundaries

- Add framed wrapper and item outlines for examples

- Improve Stack item visibility without using layout border props

* fix(layout): satisfy lint for tokenUtils

- Fix import order/grouping

- Add JSDoc for processBpkComponentProps

* refactor(layout): consolidate Stack types and utils

- Merge BpkStack types into types.ts

- Inline Stack prop processing and remove redundant tokenUtils file
@Faye-Xiao Faye (Faye-Xiao) marked this pull request as ready for review December 23, 2025 03:07
Copilot AI review requested due to automatic review settings December 23, 2025 03:07
Copy link
Contributor

Copilot AI left a 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 introduces a new layout system for Backpack as a proof-of-concept, built on top of Chakra UI v3. It provides type-safe, token-driven layout primitives with responsive capabilities using Backpack breakpoints.

Key changes:

  • Adds new layout components (BpkBox, BpkFlex, BpkGrid, BpkStack) with strict typing and token-based APIs
  • Introduces comprehensive type definitions and utility functions for responsive layouts
  • Includes extensive test coverage and accessibility tests
  • Adds Chakra UI v3 dependency for the underlying layout system

Reviewed changes

Copilot reviewed 35 out of 37 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/package.json Adds Chakra UI React v3.30.0 dependency
packages/bpk-component-layout/src/types.ts Defines comprehensive TypeScript types for layout components
packages/bpk-component-layout/src/tokens.ts Defines spacing, breakpoint, and value type tokens
packages/bpk-component-layout/src/tokenUtils.ts Implements token conversion and responsive prop processing
packages/bpk-component-layout/src/theme.ts Maps Backpack tokens to Chakra UI theme configuration
packages/bpk-component-layout/src/commonProps.ts Defines shared props interface for layout components
packages/bpk-component-layout/src/BpkProvider.tsx Provides Chakra UI context with Backpack configuration
packages/bpk-component-layout/src/BpkBox.tsx Implements base layout primitive component
packages/bpk-component-layout/src/BpkFlex.tsx Implements flexbox layout component
packages/bpk-component-layout/src/BpkGrid.tsx Implements CSS grid layout component
packages/bpk-component-layout/src/BpkStack.tsx Implements stack layout components
packages/bpk-component-layout/README.md Comprehensive documentation for the layout system
examples/bpk-component-layout/* Storybook stories and examples demonstrating usage
.storybook/main.ts Updates story pattern to support nested story files
Files not reviewed (1)
  • packages/package-lock.json: Language not supported

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

dependabot bot and others added 12 commits December 23, 2025 16:10
…4060)

* Bump @skyscanner/stylelint-config-skyscanner from 13.1.0 to 14.2.0

Bumps [@skyscanner/stylelint-config-skyscanner](https://github.com/Skyscanner/stylelint-config-skyscanner) from 13.1.0 to 14.2.0.
- [Release notes](https://github.com/Skyscanner/stylelint-config-skyscanner/releases)
- [Changelog](https://github.com/Skyscanner/stylelint-config-skyscanner/blob/main/CHANGELOG.md)
- [Commits](Skyscanner/stylelint-config-skyscanner@13.1.0...14.2.0)

---
updated-dependencies:
- dependency-name: "@skyscanner/stylelint-config-skyscanner"
  dependency-version: 14.2.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix check error

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kerrie Wu <kerrie.wu@skyscanner.net>
* Bump the storybook group across 1 directory with 5 updates

Bumps the storybook group with 5 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [@storybook/addon-a11y](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/a11y) | `9.1.13` | `10.1.2` |
| [@storybook/addon-docs](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/docs) | `9.1.13` | `10.1.2` |
| [@storybook/addon-webpack5-compiler-babel](https://github.com/storybookjs/addon-webpack5-compiler-babel) | `3.0.6` | `4.0.0` |
| [@storybook/react-webpack5](https://github.com/storybookjs/storybook/tree/HEAD/code/frameworks/react-webpack5) | `9.1.13` | `10.1.2` |
| [storybook](https://github.com/storybookjs/storybook/tree/HEAD/code/core) | `9.1.13` | `10.1.2` |



Updates `@storybook/addon-a11y` from 9.1.13 to 10.1.2
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.1.2/code/addons/a11y)

Updates `@storybook/addon-docs` from 9.1.13 to 10.1.2
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.1.2/code/addons/docs)

Updates `@storybook/addon-webpack5-compiler-babel` from 3.0.6 to 4.0.0
- [Release notes](https://github.com/storybookjs/addon-webpack5-compiler-babel/releases)
- [Changelog](https://github.com/storybookjs/addon-webpack5-compiler-babel/blob/main/CHANGELOG.md)
- [Commits](storybookjs/addon-webpack5-compiler-babel@v3.0.6...v4.0.0)

Updates `@storybook/react-webpack5` from 9.1.13 to 10.1.2
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.1.2/code/frameworks/react-webpack5)

Updates `storybook` from 9.1.13 to 10.1.2
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.1.2/code/core)

---
updated-dependencies:
- dependency-name: "@storybook/addon-a11y"
  dependency-version: 10.1.2
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: storybook
- dependency-name: "@storybook/addon-docs"
  dependency-version: 10.1.2
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: storybook
- dependency-name: "@storybook/addon-webpack5-compiler-babel"
  dependency-version: 4.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: storybook
- dependency-name: "@storybook/react-webpack5"
  dependency-version: 10.1.2
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: storybook
- dependency-name: storybook
  dependency-version: 10.1.2
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: storybook
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix storybook update issue

* fix conflict and issue

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: kerrie-wu <52308828+kerrie-wu@users.noreply.github.com>
Co-authored-by: Kerrie Wu <kerrie.wu@skyscanner.net>
* Bump jws from 3.2.2 to 3.2.3

Bumps [jws](https://github.com/brianloveswords/node-jws) from 3.2.2 to 3.2.3.
- [Release notes](https://github.com/brianloveswords/node-jws/releases)
- [Changelog](https://github.com/auth0/node-jws/blob/master/CHANGELOG.md)
- [Commits](auth0/node-jws@v3.2.2...v3.2.3)

---
updated-dependencies:
- dependency-name: jws
  dependency-version: 3.2.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* update package-lock.json

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: gc.zhu <gc.zhu@skyscanner.net>
…#4076)

* [CLOV-907][BpkButton] Update BpkButton link and linkOnDark type style

* add implicit to BpkPaginationNudger and BpkFloatingNotification and ExpandAccessoryContent

* adjust linkOnDark hover color

* add Links example

* update link on dark hover style

* remove full props in README

* update BpkPaginationNudger to iconOnly

* remove bpk-buttob-link-disabled

* button link aligned

* support inline display svg

* add button-link-type README

* rename bpk-button--link-icon-only-aligned

* rename bpk-button--link-icon-only
…to BpkButtonV2 (#4078)

* remove BpkButton code and alias BpkButton to BpkButtonV2

* refine themeAttributes file structure

* update readme

* correct file format

* udpate readme

* update readme

---------

Co-authored-by: Ezreal Yang <supremeyh@126.com>
Bumps [lint-staged](https://github.com/lint-staged/lint-staged) from 16.1.5 to 16.2.7.
- [Release notes](https://github.com/lint-staged/lint-staged/releases)
- [Changelog](https://github.com/lint-staged/lint-staged/blob/main/CHANGELOG.md)
- [Commits](lint-staged/lint-staged@v16.1.5...v16.2.7)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-version: 16.2.7
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: IrinaWei <irina.wei@skyscanner.net>
Bumps [glob](https://github.com/isaacs/node-glob) from 11.1.0 to 13.0.0.
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](isaacs/node-glob@v11.1.0...v13.0.0)

---
updated-dependencies:
- dependency-name: glob
  dependency-version: 13.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: IrinaWei <irina.wei@skyscanner.net>
* Initial plan

* Initial exploration

Co-authored-by: gert-janvercauteren <728889+gert-janvercauteren@users.noreply.github.com>

* Migrate BpkLink component to TypeScript

Co-authored-by: gert-janvercauteren <728889+gert-janvercauteren@users.noreply.github.com>

* Add missing semicolon in examples.tsx

Co-authored-by: gert-janvercauteren <728889+gert-janvercauteren@users.noreply.github.com>

* Remove unused @ts-expect-error directives for bpk-component-link imports

Co-authored-by: gert-janvercauteren <728889+gert-janvercauteren@users.noreply.github.com>

* Remove duplicate JS files

Co-authored-by: gert-janvercauteren <728889+gert-janvercauteren@users.noreply.github.com>

* Update packages/bpk-component-link/src/BpkLink.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update examples/bpk-component-link/examples.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update packages/bpk-component-link/src/BpkLink.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix TypeScript errors: convert null to undefined for href and rel attributes

Co-authored-by: gert-janvercauteren <728889+gert-janvercauteren@users.noreply.github.com>

* Make href prop required in BpkLink to match original Flow type and ensure accessibility

Co-authored-by: gert-janvercauteren <728889+gert-janvercauteren@users.noreply.github.com>

* Extend AnchorHTMLAttributes instead of using index signature for better Storybook docgen support

Co-authored-by: gert-janvercauteren <728889+gert-janvercauteren@users.noreply.github.com>

* Extend ButtonHTMLAttributes for BpkButtonLink to match BpkLink pattern and improve Storybook docgen

Co-authored-by: gert-janvercauteren <728889+gert-janvercauteren@users.noreply.github.com>

* omit props

* address rel

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: gert-janvercauteren <728889+gert-janvercauteren@users.noreply.github.com>
Co-authored-by: Gert-Jan Vercauteren <gert-jan.vercauteren@skyscanner.net>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ezreal Yang <supremeyh@126.com>
Co-authored-by: Flora Cheng <flora.cheng@skyscanner.net>
* feat: added variant size medium to bpkPrice

* fix: fixed spacing issues picked up in PR

* chore: run tests

---------

Co-authored-by: Gert-Jan Vercauteren <gert-jan.vercauteren@skyscanner.net>
@skyscanner-backpack-bot
Copy link

Visit https://backpack.github.io/storybook-prs/4069 to see this build running in a browser.

@skyscanner-backpack-bot
Copy link

Fails
🚫 These new files do not include the license heading: examples/bpk-component-layout/flex.stories.tsx
Warnings
⚠️

Package source files (e.g. packages/package-name/src/Component.js) were updated, but snapshots weren't. Have you checked that the tests still pass?

Browser support

If this is a visual change, make sure you've tested it in multiple browsers.

Generated by 🚫 dangerJS against 7369958

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DON'T MERGE major Breaking change PoC Do not merge it to main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants