Repository navigation
Migrate CodeConnect to parserless - #4990
Gert-Jan Vercauteren (gert-janvercauteren) merged 10 commits into
Conversation
… BpkModalV3 template Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
|
Visit https://backpack.github.io/storybook-prs/4990 to see this build running in a browser. |
…less .figma.ts format Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
|
Visit https://backpack.github.io/storybook-prs/4990 to see this build running in a browser. |
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 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.tsxmapping files with.figma.tstemplates using thefigmatemplate 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.tstemplate.
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
imageListis referenced in the generated example but is not defined in this template (it existed in the removed.figma.tsx). DefineimageListwithin 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:1coreAccentDayis used in the example but is not imported (it was imported in the removed.figma.tsx). Add the token import to theimportslist or replacecoreAccentDaywith a literal value so the generated snippet compiles.
packages/backpack-web/src/bpk-component-fieldset/src/BpkFieldset.figma.ts:1erroris used invalid={!error}but is never defined in any branch. In the removed.figma.tsx, this came fromfigma.boolean('Error'). Add a boolean read (e.g., from the selected instance) and use that variable here, or rendervalidviafigma.helpers.react.renderPropso the template is consistent and self-contained.
packages/backpack-web/src/bpk-component-fieldset/src/BpkFieldset.figma.ts:1- The emitted
importsinclude 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 (includingINPUT_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_TYPESandDealsIconSm) but does not include them inimports. Add the appropriate named import forCHIP_TYPES(or inline string literals if that’s the intended API) and importDealsIconSm, 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_TYPESandDealsIconSm) but does not include them inimports. Add the appropriate named import forCHIP_TYPES(or inline string literals if that’s the intended API) and importDealsIconSm, otherwise the generated snippet will reference undefined symbols.
packages/backpack-web/src/bpk-component-star-rating/src/BpkInteractiveStarRating.figma.ts:1 - The
examplestring 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 avoidconsole.logentirely (e.g.,onRatingSelect={() => {}}).
packages/backpack-web/src/bpk-component-price/src/BpkPrice.figma.ts:1 - The template emits identifiers
SIZES,ALIGNS, andVARIANTSin the generated code, but does not import them. Add the corresponding named imports (e.g., from the component’scommon-typesor 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 includeSEGMENT_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
idkeys (id: 'TODO'andid: figma.batch.id). Remove the placeholder and keep a singleidassignment; 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 addsBpkIcon.figma.ts(not a.figma.batch.tstemplate). Either add/rename the template file toBpkIcon.figma.batch.tsor 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.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
…ranspilation Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
…e .figma.ts Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
|
Visit https://backpack.github.io/storybook-prs/4990 to see this build running in a browser. |
…ve CLI-generated batch expansion files Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
…iles Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
|
Visit https://backpack.github.io/storybook-prs/4990 to see this build running in a browser. |
| // eslint-disable-next-line import/no-unresolved | ||
| import figma from 'figma' |
There was a problem hiding this comment.
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.
| /** | ||
| * 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. | ||
| */ |
There was a problem hiding this comment.
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.
|
The File: The PR migrates Code Connect sources from paths:
- packages/backpack-web/**/*.figma.tsxAs a result, changes to the new parserless files and the icon batch JSON will not |
- 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]>
|
Visit https://backpack.github.io/storybook-prs/4990 to see this build running in a browser. |
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]>
|
Visit https://backpack.github.io/storybook-prs/4990 to see this build running in a browser. |
0873a9b
into
main
Migrates all Backpack Figma Code Connect files from the parser-based
.figma.tsxformat to the parserless.figma.tsformat across all components (~80 files). The BpkIcon mapping is additionally migrated from a single auto-generated 5400-line.figma.tsxfile 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 newBpkModalV3.figma.tsCode Connect template, removes the supersededBpkModalFullScreen.figma.tsxandBpkBottomSheet.figma.tsxfiles, and updates build configs (babel.config.js,tsconfig.declaration.json,tsconfig.lib.json) and.eslintignoreto exclude.figma.tsand.figma.batch.tsfiles from transpilation, type checking, and linting.Remember to include the following changes:
[Clover-123][BpkButton] Updating the colourREADME.md(If you have created a new component)README.md