Skip to content

refactor: remove radio from YextField#1179

Merged
mkilpatrick merged 5 commits intomainfrom
radio
Apr 24, 2026
Merged

refactor: remove radio from YextField#1179
mkilpatrick merged 5 commits intomainfrom
radio

Conversation

@mkilpatrick
Copy link
Copy Markdown
Collaborator

Removes radio as a YextField option and replaces all callers to use the Puck radio fieldType directly.

@github-actions
Copy link
Copy Markdown
Contributor

Warning: Component files have been updated but no migrations have been added. See https://github.com/yext/visual-editor/blob/main/packages/visual-editor/src/components/migrations/README.md for more information.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 24, 2026

Warning

Rate limit exceeded

@yext-bot has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 15 minutes and 16 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 15 minutes and 16 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 9f68e91b-6cf8-4295-87eb-9f34f4ef0af2

📥 Commits

Reviewing files that changed from the base of the PR and between 5dc0cc8 and a2a24c3.

⛔ Files ignored due to path filters (2)
  • packages/visual-editor/src/components/testing/screenshots/Locator/[tablet] latest version default props.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/PhotoGallerySection/[desktop] version 59 with showSectionHeading false.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
📒 Files selected for processing (5)
  • packages/visual-editor/src/components/Locator.tsx
  • packages/visual-editor/src/components/contentBlocks/GetDirections.tsx
  • packages/visual-editor/src/components/header/SecondaryHeaderSlot.tsx
  • packages/visual-editor/src/components/layoutBlocks/Flex.tsx
  • packages/visual-editor/src/components/pageSections/SectionContainer.tsx

Walkthrough

This pull request removes theme-backed radio field support from the YextField helper function and migrates 50+ radio field configurations across the component library from YextField wrappers to inline field objects. The refactor converts pattern YextField(msg(...), { type: "radio", options: "STRING_KEY" }) to { label: msg(...), type: "radio", options: ThemeOptions.STRING_KEY }, updating imports to include ThemeOptions constants where needed. No runtime behavior or component logic is altered; only field schema declarations in the visual editor are restructured.

Possibly related PRs

  • yext/visual-editor#1166: Performs the same large-scale editor schema refactor replacing YextField wrappers with inline field descriptors and updating option sources to ThemeOptions across many shared files.
  • yext/visual-editor#1158: Removes support for another field type (dynamicSingleSelect) from YextField, representing a similar pattern of narrowing the helper's scope.
  • yext/visual-editor#903: Modifies the Grid component's editor field schema with ThemeOptions usage for alignment options, demonstrating direct code-level overlap in field configuration changes.

Suggested labels

create-dev-release

Suggested reviewers

  • mkilpatrick
  • benlife5
  • jwartofsky-yext
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'refactor: remove radio from YextField' clearly and concisely summarizes the main change—removing radio field support from the YextField helper.
Description check ✅ Passed The description directly relates to the changeset by explaining that radio is removed from YextField and callers are updated to use Puck's radio fieldType directly.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch radio

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/visual-editor/src/components/pageSections/SectionContainer.tsx`:
- Around line 67-74: The radio option labels for the liveVisibility field are
hard-coded English; update them to use the same localization helper as the field
label (e.g., call msg for each option) so the "Show" and "Hide" strings are
localized; locate the liveVisibility field in SectionContainer.tsx and replace
the inline "Show"/"Hide" labels with localized messages (use distinct keys like
"fields.liveVisibility.show" and "fields.liveVisibility.hide" to match the
existing msg usage).

In `@packages/visual-editor/src/editor/README.md`:
- Around line 248-255: The markdown README uses invalid fragment links
`##YextEntityFieldSelector` and `##TranslatableStringField`; update those link
targets to match the actual heading anchors: replace `##YextEntityFieldSelector`
with the correct anchor for the YextEntityFieldSelector heading (e.g.
`#yext-entity-field-selector`) and replace `##TranslatableStringField` with the
anchor that matches the actual heading text "Translatable String Field" (e.g.
`#translatable-string-field`) so the YextField doc links navigate correctly.
🪄 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: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 65299b3f-3e8b-4caf-a907-8c3806539ff7

📥 Commits

Reviewing files that changed from the base of the PR and between cba3515 and 5dc0cc8.

📒 Files selected for processing (59)
  • packages/visual-editor/src/components/Locator.tsx
  • packages/visual-editor/src/components/LocatorResultCard.tsx
  • packages/visual-editor/src/components/contentBlocks/Address.tsx
  • packages/visual-editor/src/components/contentBlocks/BodyText.tsx
  • packages/visual-editor/src/components/contentBlocks/CTAGroup.tsx
  • packages/visual-editor/src/components/contentBlocks/CtaWrapper.tsx
  • packages/visual-editor/src/components/contentBlocks/Emails.tsx
  • packages/visual-editor/src/components/contentBlocks/GetDirections.tsx
  • packages/visual-editor/src/components/contentBlocks/HeadingText.tsx
  • packages/visual-editor/src/components/contentBlocks/HoursStatus.tsx
  • packages/visual-editor/src/components/contentBlocks/HoursTable.tsx
  • packages/visual-editor/src/components/contentBlocks/Phone.tsx
  • packages/visual-editor/src/components/contentBlocks/Text.tsx
  • packages/visual-editor/src/components/contentBlocks/TextList.tsx
  • packages/visual-editor/src/components/contentBlocks/image/Image.tsx
  • packages/visual-editor/src/components/contentBlocks/image/styling.ts
  • packages/visual-editor/src/components/customCode/CustomCodeSection.tsx
  • packages/visual-editor/src/components/footer/ExpandedFooter.tsx
  • packages/visual-editor/src/components/footer/FooterExpandedLinkSectionSlot.tsx
  • packages/visual-editor/src/components/footer/FooterExpandedLinksWrapper.tsx
  • packages/visual-editor/src/components/footer/FooterLinksSlot.tsx
  • packages/visual-editor/src/components/footer/SecondaryFooterSlot.tsx
  • packages/visual-editor/src/components/header/ExpandedHeader.tsx
  • packages/visual-editor/src/components/header/Header.tsx
  • packages/visual-editor/src/components/header/HeaderLinks.tsx
  • packages/visual-editor/src/components/header/SecondaryHeaderSlot.tsx
  • packages/visual-editor/src/components/layoutBlocks/Flex.tsx
  • packages/visual-editor/src/components/layoutBlocks/Grid.tsx
  • packages/visual-editor/src/components/pageSections/AboutSection/AboutSection.tsx
  • packages/visual-editor/src/components/pageSections/Banner.tsx
  • packages/visual-editor/src/components/pageSections/Breadcrumbs.tsx
  • packages/visual-editor/src/components/pageSections/CoreInfoSection.tsx
  • packages/visual-editor/src/components/pageSections/EventSection/EventCard.tsx
  • packages/visual-editor/src/components/pageSections/EventSection/EventCardsWrapper.tsx
  • packages/visual-editor/src/components/pageSections/EventSection/EventSection.tsx
  • packages/visual-editor/src/components/pageSections/FAQsSection/FAQCard.tsx
  • packages/visual-editor/src/components/pageSections/FAQsSection/FAQsSection.tsx
  • packages/visual-editor/src/components/pageSections/HeroSection.tsx
  • packages/visual-editor/src/components/pageSections/InsightSection/InsightCardsWrapper.tsx
  • packages/visual-editor/src/components/pageSections/InsightSection/InsightSection.tsx
  • packages/visual-editor/src/components/pageSections/NearbyLocations/NearbyLocations.tsx
  • packages/visual-editor/src/components/pageSections/NearbyLocations/NearbyLocationsCardsWrapper.tsx
  • packages/visual-editor/src/components/pageSections/PhotoGallerySection/PhotoGallerySection.tsx
  • packages/visual-editor/src/components/pageSections/PhotoGallerySection/PhotoGalleryWrapper.tsx
  • packages/visual-editor/src/components/pageSections/ProductSection/ProductCardsWrapper.tsx
  • packages/visual-editor/src/components/pageSections/ProductSection/ProductSection.tsx
  • packages/visual-editor/src/components/pageSections/ProfessionalHeroSection.tsx
  • packages/visual-editor/src/components/pageSections/PromoSection/PromoSection.tsx
  • packages/visual-editor/src/components/pageSections/ReviewsSection/ReviewsSection.tsx
  • packages/visual-editor/src/components/pageSections/SectionContainer.tsx
  • packages/visual-editor/src/components/pageSections/StaticMapSection.tsx
  • packages/visual-editor/src/components/pageSections/TeamSection/TeamCardsWrapper.tsx
  • packages/visual-editor/src/components/pageSections/TeamSection/TeamSection.tsx
  • packages/visual-editor/src/components/pageSections/TestimonialSection/TestimonialCardsWrapper.tsx
  • packages/visual-editor/src/components/pageSections/TestimonialSection/TestimonialSection.tsx
  • packages/visual-editor/src/components/pageSections/VideoSection.tsx
  • packages/visual-editor/src/editor/README.md
  • packages/visual-editor/src/editor/YextField.test.tsx
  • packages/visual-editor/src/editor/YextField.tsx
💤 Files with no reviewable changes (1)
  • packages/visual-editor/src/editor/YextField.tsx

Comment thread packages/visual-editor/src/editor/README.md
@mkilpatrick mkilpatrick merged commit cd397a2 into main Apr 24, 2026
17 checks passed
@mkilpatrick mkilpatrick deleted the radio branch April 24, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants