Skip to content

Conversation

@kerrie-wu
Copy link
Contributor

  • As roll out BpkAutosuggestV2, we need to make auto sugggestV2 as default

  • Add migration BpkAutosuggest V1 to V2 doc

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

Copilot AI review requested due to automatic review settings December 31, 2025 08:55
@kerrie-wu kerrie-wu added the major Breaking change label Dec 31, 2025
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 transitions BpkAutosuggest to use V2 as the default implementation, making the previous version available as BpkAutosuggestLegacy. The change includes a comprehensive migration guide and updates to examples and documentation.

  • Makes BpkAutosuggestV2 the default export
  • Renames the legacy implementation to BpkAutosuggestLegacy
  • Adds a detailed migration guide from V1 to V2

Reviewed changes

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

Show a summary per file
File Description
packages/bpk-component-autosuggest/index.js Updates exports to make V2 the default and legacy a named export
packages/bpk-component-autosuggest/docs/migrating-from-v1-to-v2.md Adds comprehensive migration guide with API mapping and code examples
packages/bpk-component-autosuggest/README.md Updates README to document the new default export and legacy version
examples/bpk-component-fieldset/examples.tsx Updates example to use V2 API patterns
examples/bpk-component-autosuggestV2/stories.tsx Updates story imports to use new default export
examples/bpk-component-autosuggestV2/examples.tsx Updates example imports to use new default export
examples/bpk-component-autosuggest/stories.js Updates legacy story to use BpkAutosuggestLegacy
examples/bpk-component-autosuggest/examples.js Updates legacy example to use BpkAutosuggestLegacy

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

Comment on lines 123 to 125
BpkAutosuggestV2,
BpkAutosuggestSuggestion,
} from '@skyscanner/backpack-web/bpk-component-autosuggest';
Copy link

Copilot AI Dec 31, 2025

Choose a reason for hiding this comment

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

The migration guide incorrectly imports BpkAutosuggestV2 as a named export. Based on the changes in index.js, BpkAutosuggestV2 is now the default export and should be imported as import BpkAutosuggest from '@skyscanner/backpack-web/bpk-component-autosuggest' to align with the new API.

Copilot uses AI. Check for mistakes.
return (
<div>
<BpkLabel htmlFor="my-autosuggest">Office</BpkLabel>
<BpkAutosuggestV2<Office>
Copy link

Copilot AI Dec 31, 2025

Choose a reason for hiding this comment

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

The component name in the migration guide should be BpkAutosuggest instead of BpkAutosuggestV2 to match the new default export and avoid confusion for users following the guide.

Suggested change
<BpkAutosuggestV2<Office>
<BpkAutosuggest<Office>

Copilot uses AI. Check for mistakes.
**After (v2)**

```ts
<BpkAutosuggestV2
Copy link

Copilot AI Dec 31, 2025

Choose a reason for hiding this comment

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

The component name should be BpkAutosuggest instead of BpkAutosuggestV2 to match the new default export.

Suggested change
<BpkAutosuggestV2
<BpkAutosuggest

Copilot uses AI. Check for mistakes.
Comment on lines 330 to 335
import {
BpkAutosuggestV2,
defaultTheme,
} from '@skyscanner/backpack-web/bpk-component-autosuggest';

<BpkAutosuggestV2
Copy link

Copilot AI Dec 31, 2025

Choose a reason for hiding this comment

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

The theme migration example incorrectly imports and uses BpkAutosuggestV2 as a named export. It should use the default export BpkAutosuggest.

Copilot uses AI. Check for mistakes.
@skyscanner-backpack-bot
Copy link

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

@skyscanner-backpack-bot
Copy link

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

@skyscanner-backpack-bot
Copy link

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

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

Labels

major Breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants