Skip to content

fix: comprehensive cta qa#1241

Merged
benlife5 merged 1 commit into
2026-custom-components-templatesfrom
cta-fixes
Jun 18, 2026
Merged

fix: comprehensive cta qa#1241
benlife5 merged 1 commit into
2026-custom-components-templatesfrom
cta-fixes

Conversation

@benlife5

Copy link
Copy Markdown
Contributor
  1. Don't show the "open in new tab" icon when using a presetImage
  2. Don't use the link from the Puck fields when using getDirections

@benlife5 benlife5 changed the title comprehensive cta fixes fix: comprehensive cta qa Jun 18, 2026
@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

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 46f97e7c-7e2a-4ec7-805c-90fd03ba8e92

📥 Commits

Reviewing files that changed from the base of the PR and between 67c7baa and 8fb7dbd.

📒 Files selected for processing (2)
  • packages/visual-editor/src/components/atoms/cta.tsx
  • packages/visual-editor/src/components/contentBlocks/ComprehensiveCTA.tsx

Walkthrough

Two small conditional guards are added to CTA rendering logic. In cta.tsx, the external-link icon inside the Link component now requires both openInNewTab === true and ctaType !== "presetImage" before rendering. In ComprehensiveCTA.tsx, the link prop passed to the CTA component is set to undefined when ctaType === "getDirections", previously it forwarded resolvedCta unconditionally for all "link" action types.

Possibly related PRs

  • yext/visual-editor#920: Also addresses ComprehensiveCTA behavior for getDirections CTAs by omitting or overriding link props for that type.

Suggested reviewers

  • briantstephan
  • mkilpatrick
  • asanehisa
🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is vague and generic, using only 'comprehensive cta qa' without clearly describing the specific fixes being made. Use a more descriptive title that specifies the fixes, such as 'fix: hide external link icon for presetImage CTAs and exclude getDirections from link field'
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly lists the two specific issues being fixed and directly relates to the changeset modifications.
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 cta-fixes

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.

@benlife5 benlife5 merged commit cf32b6b into 2026-custom-components-templates Jun 18, 2026
17 checks passed
@benlife5 benlife5 deleted the cta-fixes branch June 18, 2026 20: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