feat: add Code Connect template mappings and publish workflow#832
feat: add Code Connect template mappings and publish workflow#832rohanchkrabrty wants to merge 8 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThis pull request migrates the Raystack Figma integration from a per-component Code Connect wiring model to a centralized template descriptor system. The migration replaces individual Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 6
🧹 Nitpick comments (4)
packages/raystack/figma/toggle.figma.ts (1)
13-17: 💤 Low valueInconsistent indentation in example.
The example uses 6-space indentation. Consider standardizing to 2 spaces for consistency.
📐 Proposed fix
- example: figma.code`<Toggle.Group> - <Toggle value='left'>Left</Toggle> - <Toggle value='center'>Center</Toggle> - <Toggle value='right'>Right</Toggle> - </Toggle.Group>`, + example: figma.code`<Toggle.Group> + <Toggle value='left'>Left</Toggle> + <Toggle value='center'>Center</Toggle> + <Toggle value='right'>Right</Toggle> +</Toggle.Group>`,🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/raystack/figma/toggle.figma.ts` around lines 13 - 17, The example string in toggle.figma.ts uses inconsistent 6-space indentation; update the example property (the template literal assigned to example, which contains the Toggle.Group/Toggle markup) to use 2-space indentation throughout so it matches project style—adjust the inner lines for <Toggle.Group> and each <Toggle> entry accordingly while preserving the same content and backtick template literal.packages/raystack/figma/toolbar.figma.ts (1)
13-20: 💤 Low valueInconsistent indentation in example.
The example uses 6-space indentation. Consider standardizing to 2 spaces for consistency.
📐 Proposed fix
- example: figma.code`<Toolbar> - <Toolbar.Group> - <Toolbar.Button>Bold</Toolbar.Button> - <Toolbar.Button>Italic</Toolbar.Button> - </Toolbar.Group> - <Toolbar.Separator /> - <Toolbar.Button>Link</Toolbar.Button> - </Toolbar>`, + example: figma.code`<Toolbar> + <Toolbar.Group> + <Toolbar.Button>Bold</Toolbar.Button> + <Toolbar.Button>Italic</Toolbar.Button> + </Toolbar.Group> + <Toolbar.Separator /> + <Toolbar.Button>Link</Toolbar.Button> +</Toolbar>`,🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/raystack/figma/toolbar.figma.ts` around lines 13 - 20, The example JSX template string for Toolbar uses 6-space indentation; update the indentation inside the figma.code`...` example to use 2-space indentation for consistency—locate the example string in toolbar.figma.ts (the figma.code template containing "<Toolbar>...</Toolbar>") and reformat each nested line (Toolbar.Group, Toolbar.Button, Toolbar.Separator) to have 2-space indents while preserving the exact content and backtick template formatting.packages/raystack/figma/number-field.figma.ts (1)
14-20: 💤 Low valueInconsistent indentation in example.
The example uses 6-space indentation inside the
figma.codetemplate literal, while most code uses 2-space indentation. Consider standardizing to 2 spaces for consistency.📐 Proposed fix
- example: figma.code`<NumberField defaultValue={10}> - <NumberField.Group> - <NumberField.Decrement /> - <NumberField.Input /> - <NumberField.Increment /> - </NumberField.Group> - </NumberField>`, + example: figma.code`<NumberField defaultValue={10}> + <NumberField.Group> + <NumberField.Decrement /> + <NumberField.Input /> + <NumberField.Increment /> + </NumberField.Group> +</NumberField>`,🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/raystack/figma/number-field.figma.ts` around lines 14 - 20, The example template literal for the NumberField (the figma.code string containing the NumberField with NumberField.Group/Decrement/Input/Increment) uses 6-space indentation; change it to use 2-space indentation to match project style—open the example string in number-field.figma.ts and reformat the inner JSX lines to 2-space indentation while preserving the exact content and line breaks.packages/raystack/figma/side-panel.figma.ts (1)
13-16: 💤 Low valueInconsistent indentation in example.
The example uses 6-space indentation, similar to
number-field.figma.ts. Consider standardizing to 2 spaces for consistency with other template files.📐 Proposed fix
- example: figma.code`<SidePanel> - <SidePanel.Header title='Panel title' /> - <SidePanel.Section>Section content</SidePanel.Section> - </SidePanel>`, + example: figma.code`<SidePanel> + <SidePanel.Header title='Panel title' /> + <SidePanel.Section>Section content</SidePanel.Section> +</SidePanel>`,🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/raystack/figma/side-panel.figma.ts` around lines 13 - 16, The example string passed to figma.code in side-panel.figma.ts uses 6-space indentation; update the template literal (the example value) to use 2-space indentation for the JSX snippet (<SidePanel> / <SidePanel.Header title='Panel title' /> / <SidePanel.Section>Section content</SidePanel.Section>) so it matches other templates like number-field.figma.ts and keeps consistent formatting across the repo.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/code-connect.yaml:
- Line 28: Replace loose action tags with full commit SHAs for supply-chain
security: locate the workflow "uses" entries such as "uses: actions/checkout@v4"
and the other "uses" steps referenced, and change them to pinned commit SHAs
(full-length commit hashes) for the corresponding repositories; update each
"uses" line to reference the exact commit SHA for that action release, and
commit the updated workflow so the secret-handling steps (e.g.,
FIGMA_ACCESS_TOKEN) run only with the verified pinned versions.
- Around line 27-28: The checkout step ("Checkout 🛎️" with uses:
actions/checkout@v4) is leaving the GitHub token persisted in git config; add
the option persist-credentials: false to that step to prevent credential
persistence and potential token leakage, ensuring the workflow still performs
reads but does not retain the GITHUB_TOKEN in the repo's git config.
- Around line 47-57: The masking loop that extracts the Figma key from
FIGMA_FILE_URL / FIGMA_ICONS_FILE_URL needs to be made robust: first strip any
URL fragment (drop everything after '#'), then extract the segment after the
first /file/ or /design/ even if query text appears earlier; replace the current
sed extraction in the loop with logic that (a) removes the fragment, and (b)
captures only the key up to the first '/', '?' or '#' (e.g., change the sed
regex to stop at '#' as well such as matching /(?:file|design)/([^/?#]+)) or
alternatively parse the URL path before running the capture so keys like
https://figma.com/file?foo=bar/{key}/... still match and fragments like
#{fragment} are excluded; update the extraction used inside the for loop that
sets key= so processLogger/add-mask receives the true key.
In `@packages/raystack/figma/button.figma.ts`:
- Around line 44-47: The code currently derives loading using
figma.selectedInstance.getEnum('Label Copy', ...) but Label Copy is already read
as text elsewhere with getString; change the loading check to use
figma.selectedInstance.getString('Label Copy') (or the existing variable that
holds that string) and compare it to both "Loading…" (unicode ellipsis) and
"Loading..." (three dots) to detect loading state; update any references to the
loading variable and remove the getEnum call (reference symbols: loading,
getEnum('Label Copy', ...), getString('Label Copy'), figma.selectedInstance).
In `@packages/raystack/figma/callout.figma.ts`:
- Around line 7-15: The enum mapping passed to figma.selectedInstance.getEnum
has a typo: the key "Attentio" should be "Attention", which prevents the
Attention variant from mapping; update the mapping used when calling getEnum
(the const named type) to use "Attention": 'Attention': 'attention' so the
Attention selection is correctly reported by the type variable.
In `@packages/raystack/figma/menu.figma.ts`:
- Around line 31-41: The EmptyState fallback is currently rendered even when
options are present; update the conditional around Menu.EmptyState in
menu.figma.ts so it only renders when empty is true AND options is falsy (guard
with !options), e.g., change the empty branch to check both empty and !options
so Menu.EmptyState is only output when there are no options to display.
---
Nitpick comments:
In `@packages/raystack/figma/number-field.figma.ts`:
- Around line 14-20: The example template literal for the NumberField (the
figma.code string containing the NumberField with
NumberField.Group/Decrement/Input/Increment) uses 6-space indentation; change it
to use 2-space indentation to match project style—open the example string in
number-field.figma.ts and reformat the inner JSX lines to 2-space indentation
while preserving the exact content and line breaks.
In `@packages/raystack/figma/side-panel.figma.ts`:
- Around line 13-16: The example string passed to figma.code in
side-panel.figma.ts uses 6-space indentation; update the template literal (the
example value) to use 2-space indentation for the JSX snippet (<SidePanel> /
<SidePanel.Header title='Panel title' /> / <SidePanel.Section>Section
content</SidePanel.Section>) so it matches other templates like
number-field.figma.ts and keeps consistent formatting across the repo.
In `@packages/raystack/figma/toggle.figma.ts`:
- Around line 13-17: The example string in toggle.figma.ts uses inconsistent
6-space indentation; update the example property (the template literal assigned
to example, which contains the Toggle.Group/Toggle markup) to use 2-space
indentation throughout so it matches project style—adjust the inner lines for
<Toggle.Group> and each <Toggle> entry accordingly while preserving the same
content and backtick template literal.
In `@packages/raystack/figma/toolbar.figma.ts`:
- Around line 13-20: The example JSX template string for Toolbar uses 6-space
indentation; update the indentation inside the figma.code`...` example to use
2-space indentation for consistency—locate the example string in
toolbar.figma.ts (the figma.code template containing "<Toolbar>...</Toolbar>")
and reformat each nested line (Toolbar.Group, Toolbar.Button, Toolbar.Separator)
to have 2-space indents while preserving the exact content and backtick template
formatting.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 895b85ed-2e83-47c6-ab11-1479e1db618f
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (80)
.github/workflows/code-connect.yaml.gitignorepackages/raystack/figma.config.jsonpackages/raystack/figma/accordion.figma.tspackages/raystack/figma/accordion.figma.tsxpackages/raystack/figma/alert-dialog.figma.tspackages/raystack/figma/announcement-bar.figma.tspackages/raystack/figma/announcement-bar.tsxpackages/raystack/figma/avatar.figma.tspackages/raystack/figma/avatar.figma.tsxpackages/raystack/figma/badge.figma.tspackages/raystack/figma/badge.figma.tsxpackages/raystack/figma/breadcrumb-item.figma.tspackages/raystack/figma/breadcrumb.figma.tspackages/raystack/figma/button.figma.tspackages/raystack/figma/button.figma.tsxpackages/raystack/figma/calendar.figma.tspackages/raystack/figma/callout.figma.tspackages/raystack/figma/callout.figma.tsxpackages/raystack/figma/checkbox.figma.tspackages/raystack/figma/checkbox.figma.tsxpackages/raystack/figma/chip.figma.tspackages/raystack/figma/chip.figma.tsxpackages/raystack/figma/code-block.figma.tspackages/raystack/figma/color-picker.figma.tspackages/raystack/figma/command.figma.tspackages/raystack/figma/dialog.figma.tspackages/raystack/figma/empty-state.figma.tspackages/raystack/figma/empty-state.figma.tsxpackages/raystack/figma/filter-chip.figma.tspackages/raystack/figma/floating-actions.figma.tspackages/raystack/figma/icon-button.figma.tspackages/raystack/figma/icon-button.figma.tsxpackages/raystack/figma/icons.figma.batch.tspackages/raystack/figma/indicator.figma.tspackages/raystack/figma/indicator.figma.tsxpackages/raystack/figma/input.figma.tspackages/raystack/figma/input.figma.tsxpackages/raystack/figma/list-item.figma.tspackages/raystack/figma/list.figma.tspackages/raystack/figma/menu-item.figma.tspackages/raystack/figma/menu.figma.tspackages/raystack/figma/menubar.figma.tspackages/raystack/figma/meter.figma.tspackages/raystack/figma/navbar.figma.tspackages/raystack/figma/number-field.figma.tspackages/raystack/figma/otp-field.figma.tspackages/raystack/figma/preview-card.figma.tspackages/raystack/figma/progress.figma.tspackages/raystack/figma/radio.figma.tspackages/raystack/figma/radio.figma.tsxpackages/raystack/figma/scroll-area.figma.tspackages/raystack/figma/search.figma.tspackages/raystack/figma/search.figma.tsxpackages/raystack/figma/select.figma.tspackages/raystack/figma/separator.figma.tspackages/raystack/figma/separator.figma.tsxpackages/raystack/figma/side-panel-header.figma.tspackages/raystack/figma/side-panel-section.figma.tspackages/raystack/figma/side-panel.figma.tspackages/raystack/figma/sidebar-group.figma.tspackages/raystack/figma/sidebar-item.figma.tspackages/raystack/figma/sidebar.figma.tspackages/raystack/figma/slider.figma.tspackages/raystack/figma/slider.figma.tsxpackages/raystack/figma/spinner.figma.tspackages/raystack/figma/spinner.figma.tsxpackages/raystack/figma/switch.figma.tspackages/raystack/figma/switch.figma.tsxpackages/raystack/figma/tabs.figma.tspackages/raystack/figma/textarea.figma.tspackages/raystack/figma/textarea.tsxpackages/raystack/figma/toast.figma.tspackages/raystack/figma/toggle.figma.tspackages/raystack/figma/toolbar.figma.tspackages/raystack/figma/tooltip.figma.tspackages/raystack/figma/tooltip.figma.tsxpackages/raystack/package.jsonpackages/raystack/scripts/generate-icons-code-connect.jspackages/raystack/tsconfig.json
💤 Files with no reviewable changes (20)
- packages/raystack/figma/checkbox.figma.tsx
- packages/raystack/figma/radio.figma.tsx
- packages/raystack/figma/avatar.figma.tsx
- packages/raystack/figma/spinner.figma.tsx
- packages/raystack/figma/indicator.figma.tsx
- packages/raystack/figma/separator.figma.tsx
- packages/raystack/figma/announcement-bar.tsx
- packages/raystack/figma/textarea.tsx
- packages/raystack/figma/tooltip.figma.tsx
- packages/raystack/figma/icon-button.figma.tsx
- packages/raystack/figma/callout.figma.tsx
- packages/raystack/figma/accordion.figma.tsx
- packages/raystack/figma/slider.figma.tsx
- packages/raystack/figma/search.figma.tsx
- packages/raystack/figma/empty-state.figma.tsx
- packages/raystack/figma/badge.figma.tsx
- packages/raystack/figma/switch.figma.tsx
- packages/raystack/figma/button.figma.tsx
- packages/raystack/figma/chip.figma.tsx
- packages/raystack/figma/input.figma.tsx
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/raystack/figma/slider.figma.ts (1)
7-28:⚠️ Potential issue | 🟠 MajorSlider Figma extraction drops supported
variant/thumbSizeenum values
packages/raystack/components/slider/slider.tsxdefinesSliderPropswithvariant?: 'single' | 'range'(defaulting to'single') andthumbSize?: 'small' | 'large'(defaulting to'large'). The currentpackages/raystack/figma/slider.figma.tsmapping only includesVariant: Range → 'range'andSize: Small → 'small', omittingSingleandLarge.Update the mappings (e.g., add
Single → 'single'andLarge → 'large') or explicitly confirm the Figma component/design intentionally never uses those options; otherwise the template can’t represent valid configurations (and may fail when those enum values are selected).🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/raystack/figma/slider.figma.ts` around lines 7 - 28, The figma extraction only maps Variant: Range → 'range' and Size: Small → 'small', which drops the supported enum values; update the mapping in packages/raystack/figma/slider.figma.ts (look at variant = figma.selectedInstance.getEnum(...) and the thumbSize returned from nestedLayer0.getEnum('Size', ...)) to include the missing enum branches (map Variant: Single → 'single' and Size: Large → 'large') so the output can produce SliderProps variant ('single'|'range') and thumbSize ('small'|'large'); alternatively, if the Figma component truly never uses those options, add an explicit comment/check that documents/guards that assumption.
♻️ Duplicate comments (2)
packages/raystack/figma/callout.figma.ts (1)
7-14:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winFix typo in Type enum key: "Attentio" should be "Attention".
Line 12 has a typo that prevents the Attention variant from mapping correctly. When users select the Attention type in Figma,
getEnumwill not match the key and will returnundefined, causing the generated code to omit thetypeprop entirely.This issue was previously flagged but remains unfixed.
🐛 Proposed fix
Gradient: 'gradient', - Attentio: 'attention', + Attention: 'attention', Normal: 'normal'🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/raystack/figma/callout.figma.ts` around lines 7 - 14, The Type enum key has a typo: inside the call to figma.selectedInstance.getEnum('Type', ...) the key "Attentio" should be "Attention", which causes getEnum to return undefined for the Attention selection; update the mapping key from "Attentio" to "Attention" and keep its value 'attention' so the Type enum mapping in getEnum correctly resolves and the generated code includes the type prop; verify the fix by selecting Attention in Figma and confirming figma.selectedInstance.getEnum('Type', ...) returns 'attention'.packages/raystack/figma/menu.figma.ts (1)
56-60:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winEmpty state still renders when options are present.
The content priority continues to show
emptyContentwheneveremptyis true, even whenoptionsis true and would provide placeholder items. This contradicts the intended fallback semantics where empty state should only appear when there are no options to display.🔄 Proposed fix
-const content = empty - ? emptyContent - : cells.length > 0 - ? cells - : optionsPlaceholder; +const content = cells.length > 0 + ? cells + : options + ? optionsPlaceholder + : empty + ? emptyContent + : [];This makes the priority: real cells → placeholder options → empty state.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/raystack/figma/menu.figma.ts` around lines 56 - 60, The current ternary that builds the content variable gives emptyContent priority whenever empty is true, causing the empty state to render even when placeholder options exist; update the logic in the content assignment (the expression that references empty, emptyContent, cells, optionsPlaceholder) so the priority is: if cells.length > 0 use cells, else if options/optionsPlaceholder exist use optionsPlaceholder, else use emptyContent — ensure you check the actual options flag or presence of optionsPlaceholder rather than short-circuiting on empty.
🧹 Nitpick comments (2)
packages/raystack/figma/select.figma.ts (1)
9-16: ⚡ Quick winUpdate comments to reflect current enum mappings.
The comments reference removed enum values:
- Line 9: mentions "Outline/Text" but only
Textis mapped- Line 13: mentions "Normal/Small" but only
Smallis mappedConsider updating the comments to accurately describe the current behavior, or remove them if they're no longer informative.
📝 Suggested comment updates
-// Variant Outline/Text → Select.Trigger `variant`. +// Variant Text → Select.Trigger `variant`. const variant = instance.getEnum('Variant', { Text: 'text' }); -// Size Normal/Small → Select.Trigger `size`. Code sizes are medium/small; +// Size Small → Select.Trigger `size`. const size = instance.getEnum('Size', { Small: 'small' });🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/raystack/figma/select.figma.ts` around lines 9 - 16, Update the outdated comments above the instance.getEnum calls so they match the actual enum mappings: change the comment referencing "Variant Outline/Text → Select.Trigger `variant`" to reflect that only `Text` is mapped (e.g., "Variant Text → Select.Trigger `variant`"), and change the comment referencing "Size Normal/Small → Select.Trigger `size`" to reflect that only `Small` is mapped (e.g., "Size Small → Select.Trigger `size`"), or remove these comments entirely if they add no value; locate the comments adjacent to the variant and size variables created by instance.getEnum in select.figma.ts to apply the edits.packages/raystack/figma/toolbar.figma.ts (1)
63-63: ⚡ Quick winConsider adding a fallback for the button label.
While
isPlainguaranteeschild.getBoolean('Label')is true,getString('Label Copy')could still returnundefinedor an empty string, which would interpolate as the literal text"undefined"or produce an empty button. The pattern elsewhere in the codebase (e.g.,menu-item.figma.tsline 57) uses explicit fallbacks.🛡️ Defensive fallback
- <Toolbar.Button>${child.getString('Label Copy')}</Toolbar.Button>` + <Toolbar.Button>${child.getString('Label Copy') || 'Button'}</Toolbar.Button>`🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/raystack/figma/toolbar.figma.ts` at line 63, The Toolbar.Button interpolation uses child.getString('Label Copy') without a fallback; update the code around Toolbar.Button and the child.getString('Label Copy') call to provide a safe fallback (e.g., default to child.getString('Label') or a literal like 'Button') when getString returns undefined or empty, mirroring the defensive pattern used in menu-item.figma.ts; ensure the fallback logic runs where isPlain is true so the button never renders "undefined" or an empty label.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@packages/raystack/figma/slider.figma.ts`:
- Around line 7-28: The figma extraction only maps Variant: Range → 'range' and
Size: Small → 'small', which drops the supported enum values; update the mapping
in packages/raystack/figma/slider.figma.ts (look at variant =
figma.selectedInstance.getEnum(...) and the thumbSize returned from
nestedLayer0.getEnum('Size', ...)) to include the missing enum branches (map
Variant: Single → 'single' and Size: Large → 'large') so the output can produce
SliderProps variant ('single'|'range') and thumbSize ('small'|'large');
alternatively, if the Figma component truly never uses those options, add an
explicit comment/check that documents/guards that assumption.
---
Duplicate comments:
In `@packages/raystack/figma/callout.figma.ts`:
- Around line 7-14: The Type enum key has a typo: inside the call to
figma.selectedInstance.getEnum('Type', ...) the key "Attentio" should be
"Attention", which causes getEnum to return undefined for the Attention
selection; update the mapping key from "Attentio" to "Attention" and keep its
value 'attention' so the Type enum mapping in getEnum correctly resolves and the
generated code includes the type prop; verify the fix by selecting Attention in
Figma and confirming figma.selectedInstance.getEnum('Type', ...) returns
'attention'.
In `@packages/raystack/figma/menu.figma.ts`:
- Around line 56-60: The current ternary that builds the content variable gives
emptyContent priority whenever empty is true, causing the empty state to render
even when placeholder options exist; update the logic in the content assignment
(the expression that references empty, emptyContent, cells, optionsPlaceholder)
so the priority is: if cells.length > 0 use cells, else if
options/optionsPlaceholder exist use optionsPlaceholder, else use emptyContent —
ensure you check the actual options flag or presence of optionsPlaceholder
rather than short-circuiting on empty.
---
Nitpick comments:
In `@packages/raystack/figma/select.figma.ts`:
- Around line 9-16: Update the outdated comments above the instance.getEnum
calls so they match the actual enum mappings: change the comment referencing
"Variant Outline/Text → Select.Trigger `variant`" to reflect that only `Text` is
mapped (e.g., "Variant Text → Select.Trigger `variant`"), and change the comment
referencing "Size Normal/Small → Select.Trigger `size`" to reflect that only
`Small` is mapped (e.g., "Size Small → Select.Trigger `size`"), or remove these
comments entirely if they add no value; locate the comments adjacent to the
variant and size variables created by instance.getEnum in select.figma.ts to
apply the edits.
In `@packages/raystack/figma/toolbar.figma.ts`:
- Line 63: The Toolbar.Button interpolation uses child.getString('Label Copy')
without a fallback; update the code around Toolbar.Button and the
child.getString('Label Copy') call to provide a safe fallback (e.g., default to
child.getString('Label') or a literal like 'Button') when getString returns
undefined or empty, mirroring the defensive pattern used in menu-item.figma.ts;
ensure the fallback logic runs where isPlain is true so the button never renders
"undefined" or an empty label.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 11edb332-1079-4ecd-97a7-360cca6ae583
📒 Files selected for processing (25)
packages/raystack/figma/announcement-bar.figma.tspackages/raystack/figma/avatar.figma.tspackages/raystack/figma/badge.figma.tspackages/raystack/figma/breadcrumb.figma.tspackages/raystack/figma/button.figma.tspackages/raystack/figma/callout.figma.tspackages/raystack/figma/chip.figma.tspackages/raystack/figma/empty-state.figma.tspackages/raystack/figma/icon-button.figma.tspackages/raystack/figma/indicator.figma.tspackages/raystack/figma/input.figma.tspackages/raystack/figma/menu-item.figma.tspackages/raystack/figma/menu.figma.tspackages/raystack/figma/menubar.figma.tspackages/raystack/figma/meter.figma.tspackages/raystack/figma/progress.figma.tspackages/raystack/figma/search.figma.tspackages/raystack/figma/select.figma.tspackages/raystack/figma/sidebar.figma.tspackages/raystack/figma/slider.figma.tspackages/raystack/figma/spinner.figma.tspackages/raystack/figma/switch.figma.tspackages/raystack/figma/tabs.figma.tspackages/raystack/figma/toolbar.figma.tspackages/raystack/figma/tooltip.figma.ts
💤 Files with no reviewable changes (8)
- packages/raystack/figma/tooltip.figma.ts
- packages/raystack/figma/icon-button.figma.ts
- packages/raystack/figma/indicator.figma.ts
- packages/raystack/figma/badge.figma.ts
- packages/raystack/figma/tabs.figma.ts
- packages/raystack/figma/announcement-bar.figma.ts
- packages/raystack/figma/sidebar.figma.ts
- packages/raystack/figma/search.figma.ts
🚧 Files skipped from review as they are similar to previous changes (6)
- packages/raystack/figma/chip.figma.ts
- packages/raystack/figma/breadcrumb.figma.ts
- packages/raystack/figma/empty-state.figma.ts
- packages/raystack/figma/button.figma.ts
- packages/raystack/figma/switch.figma.ts
- packages/raystack/figma/input.figma.ts
Summary
.figma.ts), replacing the legacy parser-basedfigma.connect()files, and add new mappings for previously-unconnected components.icons.figma.batch.ts+ generated JSON) covering all icon components.code-connect.yamlGitHub Actions workflow that publishes mappings on push tomainwhen figma files change, plus manualworkflow_dispatch.sedon publish output +::add-mask::backstop) so published node URLs don't expose the file.figma:publish(publish only) andfigma:sync(build + publish), and add@figma/code-connect/figma-typesto tsconfig.