chore: Add Code Connect for HeaderBase - #1484
Closed
andrewjcohen wants to merge 3 commits into
Closed
andrewjcohen wants to merge 3 commits into
andrewjcohen wants to merge 3 commits into
Conversation
Contributor
📖 Storybook LinksCompare the preview for this pull request with the latest Storybooks from the 🔀 Pull Request Preview
🌳 Main Branch (Latest)
|
Contributor
📖 Storybook LinksCompare the preview for this pull request with the latest Storybooks from the 🔀 Pull Request Preview
🌳 Main Branch (Latest)
|
andrewjcohen
marked this pull request as ready for review
September 3, 2026 20:08
Contributor
📖 Storybook LinksCompare the preview for this pull request with the latest Storybooks from the 🔀 Pull Request Preview
🌳 Main Branch (Latest)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds Figma Code Connect mappings for HeaderBase on both platforms, pointing at the
refactor -- HeaderFigma component (node19284-754).HeaderBase.figma.tsx
New
HeaderBase.figma.tsxfor React andHeaderBase.figma.tsxfor React Native.Matched props
title(TEXT) →childrensubtitle(TEXT) → composed intochildren(HeaderBase has nosubtitleprop)startAccessory(SLOT) →startAccessory(viafigma.slot('startAccessory').connectedInstances)endAccessory(SLOT) →endAccessory(viafigma.slot('endAccessory').connectedInstances)Two
figma.connectvariants switch the snippet whenhasSubtitle (Figma only)is toggled, so the examples stay pure JSX with no conditionals. Off matches Storybook Default (title only). On composes title asTextVariant.HeadingSmand subtitle asTextVariant.BodySm/TextColor.TextAlternative. Nested ButtonIcon instances in the accessory slots surface when those nested components are published.Intentionally omits Figma-only properties:
hasSubtitle (Figma only)(used only as avariantselector)Intentionally omits code-only props:
className,twClassName,style,childrenWrapperProps,startAccessoryWrapperProps,endAccessoryWrapperProps, and(React Native only)
startButtonIconProps,endButtonIconProps,includesTopInset,textProps. Figma models the accessories as slots rather than an icon-props shorthand, andthe wrapper props are implementation hooks with no design equivalent.
Related issues
Manual testing steps
titletext property and verify the snippet's title updateshasSubtitle (Figma only)on and confirm the snippet adds aBodySm/TextAlternativesubtitle under the titlestartAccessory/endAccessoryand verify the snippet picks up the instancesScreenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Adds design-time Code Connect files only; no changes to
HeaderBaseruntime behavior or app logic.Overview
Adds Figma Code Connect for
HeaderBasein bothdesign-system-reactanddesign-system-react-native, wired to the refactor Header component (node19284-754).Each package gets a new
HeaderBase.figma.tsxwith twofigma.connectvariants keyed onhasSubtitle (Figma only)so Dev Mode snippets stay unconditional JSX. Title maps tochildren; start/end accessory slots useconnectedInstances. When the subtitle toggle is on, the example composes heading + bodyTextchildren because the component has nosubtitleprop. The React Native title-only variant passes the title as a string child (Storybook default); the web title-only variant still wraps the title inTextVariant.HeadingSm. Code-only props (styling, wrappers, RN icon/inset helpers) are intentionally omitted from the mappings.Reviewed by Cursor Bugbot for commit a2332a1. Bugbot is set up for automated code reviews on this repo. Configure here.