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

Migrate CodeConnect to parserless - #4990

Merged
Gert-Jan Vercauteren (gert-janvercauteren) merged 10 commits into
mainfrom
gert-janvercauteren/bpkicon-figma-batch-connect
Jul 31, 2026
Merged

Gert-Jan Vercauteren (gert-janvercauteren) merged 10 commits into
mainfrom
gert-janvercauteren/bpkicon-figma-batch-connect

Conversation

@gert-janvercauteren

@gert-janvercauteren Gert-Jan Vercauteren (gert-janvercauteren) commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Migrates all Backpack Figma Code Connect files from the parser-based .figma.tsx format to the parserless .figma.ts format across all components (~80 files). The BpkIcon mapping is additionally migrated from a single auto-generated 5400-line .figma.tsx file to the batch file format (BpkIcon.figma.batch.ts + BpkIcon.figma.batch.json), with the generator script updated to emit the batch JSON. Also adds a new BpkModalV3.figma.ts Code Connect template, removes the superseded BpkModalFullScreen.figma.tsx and BpkBottomSheet.figma.tsx files, and updates build configs (babel.config.js, tsconfig.declaration.json, tsconfig.lib.json) and .eslintignore to exclude .figma.ts and .figma.batch.ts files from transpilation, type checking, and linting.

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

… BpkModalV3 template

Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings July 30, 2026 02:53
@skyscanner-backpack-bot

Copy link
Copy Markdown
Contributor

…less .figma.ts format

Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
@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 Backpack’s Figma Code Connect mappings from per-component .figma.tsx connect files to the newer template-based .figma.ts approach (and introduces icon batch JSON generation), while adding a new Code Connect template for BpkModalV3.

Changes:

  • Replaced many @figma/code-connect .figma.tsx mapping files with .figma.ts templates using the figma template API.
  • Updated the icon Code Connect generator to emit a batch JSON file instead of a single large TSX mapping file.
  • Added a new BpkModalV3.figma.ts template.

Reviewed changes

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

Show a summary per file
File Description
packages/backpack-web/src/bpk-component-tooltip/src/BpkTooltip.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-tooltip/src/BpkTooltip.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-textarea/src/BpkTextarea.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-textarea/src/BpkTextarea.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-table/src/BpkTable.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-table/src/BpkTable.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-switch/src/BpkSwitch.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-switch/src/BpkSwitch.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-swap-button/src/BpkSwapButton.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-swap-button/src/BpkSwapButton.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-star-rating/src/BpkStarRating.figma.tsx Removed legacy TSX Code Connect mapping (multi-connect)
packages/backpack-web/src/bpk-component-star-rating/src/BpkStarRating.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-star-rating/src/BpkStarRating_1.figma.ts Added additional template for second star-rating node
packages/backpack-web/src/bpk-component-star-rating/src/BpkInteractiveStarRating.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-star-rating/src/BpkInteractiveStarRating.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-split-input/src/BpkSplitInput.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-split-input/src/BpkSplitInput.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-spinner/src/BpkSpinner.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-spinner/src/BpkSpinner.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-snippet/src/BpkSnippetVertical.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-snippet/src/BpkSnippetVertical.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-snippet/src/BpkSnippetHorizontal.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-snippet/src/BpkSnippetHorizontal.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-slider/src/BpkSlider.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-slider/src/BpkSlider.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-skip-link/src/BpkSkipLink.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-skip-link/src/BpkSkipLink.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-skeleton/src/BpkSkeletonImage.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-skeleton/src/BpkSkeletonImage.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-skeleton/src/BpkSkeletonHeadline.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-skeleton/src/BpkSkeletonHeadline.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-skeleton/src/BpkSkeletonCircle.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-skeleton/src/BpkSkeletonCircle.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-skeleton/src/BpkSkeletonBodyText.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-skeleton/src/BpkSkeletonBodyText.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-select/src/BpkSelect.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-select/src/BpkSelect.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-segmented-control/src/BpkSegmentedControlV2/BpkSegmentedControlV2.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-segmented-control/src/BpkSegmentedControlV2/BpkSegmentedControlV2.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-section-header/src/BpkSectionHeader.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-section-header/src/BpkSectionHeader.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-rating/src/BpkRating.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-rating/src/BpkRating.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-radio/src/BpkRadio.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-radio/src/BpkRadio.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-progress/src/BpkProgress.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-progress/src/BpkProgress.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-price/src/BpkPrice.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-price/src/BpkPrice.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-price-range/src/BpkPriceRange.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-price-range/src/BpkPriceRange.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-popover/src/BpkPopover.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-popover/src/BpkPopover.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-phone-input/src/BpkPhoneInput.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-phone-input/src/BpkPhoneInput.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-pagination/src/BpkPagination.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-pagination/src/BpkPagination.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-page-indicator/src/BpkPageIndicator.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-page-indicator/src/BpkPageIndicator.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-overlay/src/BpkOverlay.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-overlay/src/BpkOverlay.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-nudger/src/BpkNudger.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-nudger/src/BpkNudger.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-navigation-tab-group/src/BpkNavigationTabGroup.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-navigation-tab-group/src/BpkNavigationTabGroup.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-navigation-bar/src/BpkNavigationBar.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-navigation-bar/src/BpkNavigationBar.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-modal/src/BpkModalV3/BpkModalV3.figma.ts Added new Code Connect template for BpkModalV3
packages/backpack-web/src/bpk-component-modal/src/BpkModalOverlay.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-modal/src/BpkModalOverlay.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-modal/src/BpkModalFullScreen.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-map/src/BpkPriceMarker.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-map/src/BpkPriceMarker.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-list/src/BpkList.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-list/src/BpkList.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-link/src/BpkLink.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-link/src/BpkLink.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-label/src/BpkLabel.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-label/src/BpkLabel.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-journey-arrow/src/BpkJourneyArrow.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-journey-arrow/src/BpkJourneyArrow.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-inset-banner/src/BpkInsetBanner.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-inset-banner/src/BpkInsetBanner.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-input/src/BpkInput.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-input/src/BpkInput.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-info-banner/src/BpkInfoBanner.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-info-banner/src/BpkInfoBanner.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-image/src/BpkImage.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-image/src/BpkImage.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-icon/scripts/generate-figma-connect.js Emit icon Code Connect mappings as batch JSON
packages/backpack-web/src/bpk-component-icon/BpkIcon.figma.ts Added batch template stub for icons (needs alignment)
packages/backpack-web/src/bpk-component-horizontal-nav/src/BpkHorizontalNavItem.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-horizontal-nav/src/BpkHorizontalNavItem.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-horizontal-nav/src/BpkHorizontalNav.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-horizontal-nav/src/BpkHorizontalNav.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-graphic-promotion/src/BpkGraphicPromoPortrait.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-graphic-promotion/src/BpkGraphicPromoPortrait.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-graphic-promotion/src/BpkGraphicPromoLandscape.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-graphic-promotion/src/BpkGraphicPromoLandscape.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-form-validation/src/BpkFormValidation.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-form-validation/src/BpkFormValidation.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-floating-notification/src/BpkFloatingNotification.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-floating-notification/src/BpkFloatingNotification.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-flare/src/BpkFlare.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-flare/src/BpkFlare.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-fieldset/src/BpkFieldset.figma.tsx Removed legacy TSX Code Connect mapping (multi-variant)
packages/backpack-web/src/bpk-component-fieldset/src/BpkFieldset.figma.ts Added template-based multi-variant mapping (needs fixes)
packages/backpack-web/src/bpk-component-drawer/src/BpkDrawer.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-drawer/src/BpkDrawer.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-divider/src/BpkDivider.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-divider/src/BpkDivider.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-dialog/src/BpkDialog.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-dialog/src/BpkDialog.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-datatable/src/BpkDataTable.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-datatable/src/BpkDataTable.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-content-cards/src/BpkContentCards.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-content-cards/src/BpkContentCards.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-chip/src/BpkSelectableChip.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-chip/src/BpkSelectableChip.figma.ts Added template-based multi-variant mapping (needs fixes)
packages/backpack-web/src/bpk-component-chip/src/BpkDropdownChip.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-chip/src/BpkDismissibleChip.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-chip-group/src/BpkChipGroupWrap.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-chip-group/src/BpkChipGroupWrap.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-chip-group/src/BpkChipGroupRail.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-chip-group/src/BpkChipGroupRail.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-checkbox/src/BpkCheckbox.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-checkbox/src/BpkCheckbox.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-checkbox-card/src/BpkCheckboxCard.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-checkbox-card/src/BpkCheckboxCard.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-chatbot-input/src/BpkChatbotInput.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-chatbot-input/src/BpkChatbotInput.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-chat-thought-bubble/src/BpkChatThoughtBubble.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-chat-thought-bubble/src/BpkChatThoughtBubble.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-chat-bubble/src/BpkChatBubble.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-chat-bubble/src/BpkChatBubble.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-carousel/src/BpkCarousel.figma.tsx Removed legacy TSX Code Connect mapping (included image list)
packages/backpack-web/src/bpk-component-carousel/src/BpkCarousel.figma.ts Added template-based Code Connect mapping (missing image list)
packages/backpack-web/src/bpk-component-card/src/BpkCardWrapper.figma.tsx Removed legacy TSX Code Connect mapping (included token import)
packages/backpack-web/src/bpk-component-card/src/BpkCardWrapper.figma.ts Added template-based Code Connect mapping (missing token import)
packages/backpack-web/src/bpk-component-card/src/BpkCard.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-card/src/BpkCard.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-card-list/src/BpkCardList.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-card-list/src/BpkCardList.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-card-button/src/BpkShareButton.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-card-button/src/BpkShareButton.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-card-button/src/BpkSaveButton.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-card-button/src/BpkSaveButton.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-calendar/src/BpkCalendar.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-calendar/src/BpkCalendar.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-button/src/BpkButton.figma.tsx Removed legacy TSX Code Connect mapping (multi-variant, included icon imports)
packages/backpack-web/src/bpk-component-button/src/BpkButton.figma.ts Added template-based multi-variant mapping (needs fixes)
packages/backpack-web/src/bpk-component-bubble/src/BpkBubble.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-bubble/src/BpkBubble.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-breadcrumb/src/BpkBreadcrumb.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-breadcrumb/src/BpkBreadcrumb.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-bottom-sheet/src/BpkBottomSheet.figma.tsx Converted file to batch-style template (PR description mismatch)
packages/backpack-web/src/bpk-component-blockquote/src/BpkBlockquote.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-blockquote/src/BpkBlockquote.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-barchart/src/BpkBarchart.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-barchart/src/BpkBarchart.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-badge/src/BpkBadge.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-badge/src/BpkBadge.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-autosuggest/src/BpkAutosuggest.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-autosuggest/src/BpkAutosuggest.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-ai-blurb/src/BpkAiBlurb.figma.tsx Removed legacy TSX Code Connect mapping (multi-variant)
packages/backpack-web/src/bpk-component-ai-blurb/src/BpkAiBlurb.figma.ts Added template-based multi-variant mapping
packages/backpack-web/src/bpk-component-accordion/src/BpkAccordionItem.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-accordion/src/BpkAccordionItem.figma.ts Added template-based Code Connect mapping
packages/backpack-web/src/bpk-component-accordion/src/BpkAccordion.figma.tsx Removed legacy TSX Code Connect mapping
packages/backpack-web/src/bpk-component-accordion/src/BpkAccordion.figma.ts Added template-based Code Connect mapping
package.json Bumped @figma/code-connect dependency
figma.config.json Limited Code Connect include patterns to .figma.ts and batch JSON
.eslintignore Ignored generated .figma.ts and .figma.batch.ts files
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file
Comments suppressed due to low confidence (11)

packages/backpack-web/src/bpk-component-carousel/src/BpkCarousel.figma.ts:1

  • imageList is referenced in the generated example but is not defined in this template (it existed in the removed .figma.tsx). Define imageList within this template (or inline an array literal in the example) so the generated Code Connect snippet is self-contained.
    packages/backpack-web/src/bpk-component-card/src/BpkCardWrapper.figma.ts:1
  • coreAccentDay is used in the example but is not imported (it was imported in the removed .figma.tsx). Add the token import to the imports list or replace coreAccentDay with a literal value so the generated snippet compiles.
    packages/backpack-web/src/bpk-component-fieldset/src/BpkFieldset.figma.ts:1
  • error is used in valid={!error} but is never defined in any branch. In the removed .figma.tsx, this came from figma.boolean('Error'). Add a boolean read (e.g., from the selected instance) and use that variable here, or render valid via figma.helpers.react.renderProp so the template is consistent and self-contained.
    packages/backpack-web/src/bpk-component-fieldset/src/BpkFieldset.figma.ts:1
  • The emitted imports include a relative path (../../bpk-component-input) instead of package imports (used across most other templates). For Code Connect snippets to work reliably outside the repo, prefer @skyscanner/backpack-web/... import paths consistently (including INPUT_TYPES) so consumers don’t need the monorepo file structure.
    packages/backpack-web/src/bpk-component-chip/src/BpkSelectableChip.figma.ts:1
  • This template emits identifiers/components (CHIP_TYPES and DealsIconSm) but does not include them in imports. Add the appropriate named import for CHIP_TYPES (or inline string literals if that’s the intended API) and import DealsIconSm, otherwise the generated snippet will reference undefined symbols.
    packages/backpack-web/src/bpk-component-chip/src/BpkSelectableChip.figma.ts:1
  • This template emits identifiers/components (CHIP_TYPES and DealsIconSm) but does not include them in imports. Add the appropriate named import for CHIP_TYPES (or inline string literals if that’s the intended API) and import DealsIconSm, otherwise the generated snippet will reference undefined symbols.
    packages/backpack-web/src/bpk-component-star-rating/src/BpkInteractiveStarRating.figma.ts:1
  • The example string includes raw // eslint-disable-next-line ... inside the JSX snippet (mid-tag). This will produce invalid JSX in the generated code. Remove the eslint comment from the snippet and/or change the example to avoid console.log entirely (e.g., onRatingSelect={() => {}}).
    packages/backpack-web/src/bpk-component-price/src/BpkPrice.figma.ts:1
  • The template emits identifiers SIZES, ALIGNS, and VARIANTS in the generated code, but does not import them. Add the corresponding named imports (e.g., from the component’s common-types or package exports), otherwise the generated snippet will not compile.
    packages/backpack-web/src/bpk-component-segmented-control/src/BpkSegmentedControlV2/BpkSegmentedControlV2.figma.ts:1
  • This template emits SEGMENT_TYPES_V2.* identifiers but the imports do not include SEGMENT_TYPES_V2. Add the named import (or adjust to emit literal values instead) so the generated snippet doesn’t reference an undefined identifier.
    packages/backpack-web/src/bpk-component-icon/BpkIcon.figma.ts:1
  • The exported object contains duplicate id keys (id: 'TODO' and id: figma.batch.id). Remove the placeholder and keep a single id assignment; duplicate keys are error-prone and can be flagged by tooling.
    packages/backpack-web/src/bpk-component-icon/scripts/generate-figma-connect.js:1
  • The generator emits JSON that references ./BpkIcon.figma.batch.ts, but this PR adds BpkIcon.figma.ts (not a .figma.batch.ts template). Either add/rename the template file to BpkIcon.figma.batch.ts or update the generator to reference the actual template path; otherwise the batch JSON + template pairing won’t work.

💡 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) changed the title [BpkIcon][BpkModal] Migrate icon Code Connect to batch format and add BpkModalV3 template Migrate CodeConnect to parserless Jul 30, 2026
@skyscanner-backpack-bot

skyscanner-backpack-bot Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor
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 08f8deb

…ve CLI-generated batch expansion files

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

Copy link
Copy Markdown
Contributor

Comment on lines +22 to +23
// eslint-disable-next-line import/no-unresolved
import figma from 'figma'

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.

every other .figma.ts file has the same import figma from "figma" without this
comment — because the file type is already excluded from ESLint via .eslintignore.
The comment is redundant and inconsistent.

Comment on lines -116 to -122
/**
* Normalize a name by collapsing double-hyphens to single and applying
* spelling aliases, so we can fuzzy-match Figma names to code file names.
*
* @param {string} name - The icon name to normalize.
* @returns {string} The normalized name.
*/

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.

The normalize() and findCodeMatch() helpers implement non-obvious fuzzy-matching
logic with spelling aliases. Removing their JSDoc makes the intent harder to recover.
Unless the project policy is zero comments, these are worth keeping — especially for
a script that's run manually with a FIGMA_ACCESS_TOKEN.

@Supremeyh

Copy link
Copy Markdown
Contributor

The .github/workflows/sync-figma-code-connect.yml: path filter still only watches .figma.tsx

File: .github/workflows/sync-figma-code-connect.yml:4–9

The PR migrates Code Connect sources from .figma.tsx to .figma.ts and adds icon
batch data in .figma.batch.json, but both workflow path filters still only include:

paths:
  - packages/backpack-web/**/*.figma.tsx

As a result, changes to the new parserless files and the icon batch JSON will not
trigger pull-request dry-run validation or publishing on main. Please update both
filters to include **/*.figma.ts and **/*.figma.batch.json (or equivalent patterns)
so CI validation and automatic publishing continue to work.

- Remove redundant eslint-disable comment from BpkModalV3.figma.ts (.figma.ts files are already excluded via .eslintignore)
- Add inline comment explaining the deliberate 🚧 Drawer → Overlay Modal fallback
- Remove duplicate else block and contradicting comment from BpkSelectableChip.figma.ts (unknown variants now produce no output instead of silently rendering BpkDismissibleChip)
- Restore JSDoc on normalize() and findCodeMatch() in generate-figma-connect.js to document non-obvious fuzzy-matching logic
- Add *.figma.ts and *.figma.batch.json to sync-figma-code-connect.yml path filters so CI triggers on parserless files and icon batch JSON

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

Copy link
Copy Markdown
Contributor

Resolved conflict in package.json (kept ^1.5.0 from this branch over
^1.4.9 from main) and regenerated pnpm-lock.yaml accordingly.

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

Copy link
Copy Markdown
Contributor

@gert-janvercauteren
Gert-Jan Vercauteren (gert-janvercauteren) merged commit 0873a9b into main Jul 31, 2026
17 of 18 checks passed
@gert-janvercauteren
Gert-Jan Vercauteren (gert-janvercauteren) deleted the gert-janvercauteren/bpkicon-figma-batch-connect branch July 31, 2026 03:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

minor Non breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants