Skip to content

Conversation

@rkeerthient
Copy link
Contributor

Ticket - SUMO-8134

Move textTransform from Button to CTA as the text is rendered by CTA Instead of the Button

Screen.Recording.2026-01-09.at.1.55.14.AM.mov

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

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 Jan 8, 2026

Walkthrough

This change moves text-transform styling between two atomic components: it removes inline CSS-variable-driven textTransform from the Button component and adds an inline CSS-variable textTransform to the Link inside the CTA component, based on whether the variant name contains "link". No control flow, error handling, or component functionality changes were introduced.

Sequence Diagram(s)

(omitted)

Possibly related PRs

Suggested reviewers

  • asanehisa
  • benlife5
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: moving textTransform styling from Button to CTA component, which aligns with the changeset.
Description check ✅ Passed The description is directly related to the changeset, explaining the rationale for moving textTransform from Button to CTA and referencing the associated ticket.

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

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fe2b2ae and 9b5a512.

📒 Files selected for processing (1)
  • packages/visual-editor/src/components/atoms/cta.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/visual-editor/src/components/atoms/cta.tsx

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
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: 1

🤖 Fix all issues with AI agents
In @packages/visual-editor/src/components/atoms/cta.tsx:
- Around line 306-312: The style check currently calls
variant?.toLowerCase().includes("link") which can throw when variant is
undefined and also uses the wrong prop; change it to use buttonVariant and guard
the includes call by lowercasing safely, e.g., replace the expression with
buttonVariant ? buttonVariant.toLowerCase().includes("link") : false (or use
buttonVariant?.toLowerCase().includes("link")), so the textTransform logic
references buttonVariant (computed from ctaType and variant) and avoids a
runtime TypeError in the textTransform style block of the Button rendering.
📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d97a13c and fe2b2ae.

📒 Files selected for processing (2)
  • packages/visual-editor/src/components/atoms/button.tsx
  • packages/visual-editor/src/components/atoms/cta.tsx
💤 Files with no reviewable changes (1)
  • packages/visual-editor/src/components/atoms/button.tsx
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-12-15T20:59:25.571Z
Learnt from: benlife5
Repo: yext/visual-editor PR: 943
File: packages/visual-editor/src/components/contentBlocks/image/Image.tsx:175-191
Timestamp: 2025-12-15T20:59:25.571Z
Learning: In the ImageWrapper component at packages/visual-editor/src/components/contentBlocks/image/Image.tsx, when an Image is wrapped in a MaybeLink, the aria-label should be omitted because the image's alt text serves as the accessible name for the link. Adding an aria-label would override the image's alt text.

Applied to files:

  • packages/visual-editor/src/components/atoms/cta.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: call_unit_test / unit_tests (22.x)
  • GitHub Check: call_unit_test / unit_tests (24.x)
  • GitHub Check: call_unit_test / unit_tests (20.x)
  • GitHub Check: semgrep/ci

@benlife5 benlife5 merged commit 4e10bc9 into main Jan 8, 2026
17 checks passed
@benlife5 benlife5 deleted the SUMO-8134 branch January 8, 2026 21: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