-
Notifications
You must be signed in to change notification settings - Fork 0
fix: cta text transform #979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
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. |
WalkthroughThis change moves text-transform styling between two atomic components: it removes inline CSS-variable-driven Sequence Diagram(s)(omitted) Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: Repository UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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.
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
📒 Files selected for processing (2)
packages/visual-editor/src/components/atoms/button.tsxpackages/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
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