Nuxt: Add CtaCustom - #5715
Open
Yndira-E wants to merge 8 commits into
Open
Conversation
✅ Deploy Preview for flowforge-website ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Follow-up to #5517's "Next steps" section, which called out a
CtaCustomcomponent as pending work, a sanctioned way to build a one-off CTA that isn't one of the five fixed destinations, without inventing new copy, styles, or tracking from scratch.CtaCustomreusesCtaButton's full style/tracking system. The PostHog event and (for a fixed URL) the href both come from a requireddestinationKeylooked up innuxt/lib/custom-cta-destinations.ts, instead of free-form props, so a destination can't drift onto two different events across call sites, and the registry self-checks on load against both itself and the five reserved destinations. Those five destinations' own event/href/label now live innuxt/lib/cta-destinations.ts, read by both the fixed components andCtaCustom's guard, since the guard needs to compare against them somehow. Also adds atargetprop for off-site links.Migrates the five existing hand-written CTA-style buttons in Nuxt that weren't one of the five reserved destinations, each keeping its prior PostHog event for tracking continuity.
Related Issue(s)
Checklist