Skip to content

Conversation

@benlife5
Copy link
Contributor

Sets the event names for the primary and secondary cta buttons

Removes fieldsToHide since styles.displayType is no longer a prop

@github-actions
Copy link
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
Contributor

coderabbitai bot commented Nov 11, 2025

Walkthrough

This PR removes the fieldsToHide property from the CTAWrapper component interface and replaces its usage throughout the codebase with an eventName property. The changes affect header slot configurations and migration files, shifting from a UI field-hiding approach to an event naming approach for CTA components. Primary CTAs receive the event name "primaryCta", while secondary CTAs receive "secondaryCta". The updates span component definitions, default layout data, and migration files.

Possibly related PRs

  • chore: remove types from migrations #875: Modifies CTA/CTASlot definitions and migrations, removing type assertions around CTAWrapper/slot props while this PR replaces fieldsToHide with eventName in the same areas.

Suggested reviewers

  • asanehisa
  • briantstephan
  • mkilpatrick

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: header event names' directly describes the main change: updating event names for header CTA buttons, which is the primary focus across all modified files.
Description check ✅ Passed The description accurately relates to the changeset, explaining that event names are set for primary and secondary CTA buttons while fieldsToHide is removed because styles.displayType is no longer a prop.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch header-event-names

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c23a244 and de0aa4f.

📒 Files selected for processing (4)
  • packages/visual-editor/src/components/contentBlocks/CtaWrapper.tsx (0 hunks)
  • packages/visual-editor/src/components/header/PrimaryHeaderSlot.tsx (2 hunks)
  • packages/visual-editor/src/components/migrations/0040_expanded_header_slots.ts (2 hunks)
  • packages/visual-editor/src/vite-plugin/defaultLayoutData.ts (2 hunks)
💤 Files with no reviewable changes (1)
  • packages/visual-editor/src/components/contentBlocks/CtaWrapper.tsx
🔇 Additional comments (1)
packages/visual-editor/src/components/header/PrimaryHeaderSlot.tsx (1)

282-282: LGTM! Event names properly configured.

The addition of eventName properties to both CTA slots in the default props is correct and consistent with the PR objective. The event names "primaryCta" and "secondaryCta" are descriptive and align with the changes in other files.

Also applies to: 307-307


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

@benlife5 benlife5 merged commit 239368b into fall-2025-slot-ify-components Nov 11, 2025
14 checks passed
@benlife5 benlife5 deleted the header-event-names branch November 11, 2025 16:39
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