Conversation
Every markdown link renders through a ProseA wrapper that fires the destination's cta-* event with position inline-link when its href is one of the five CTA destinations. Link text stays free-form.
ProseA renders CtaLink for markdown links to a CTA destination, so both share one component. Migrates the inline links on the homepage, OPC UA and ROI calculator pages.
Image CTAs now take their href from CTA_DESTINATIONS and fire the destination's cta-* event (variant image) alongside blog-cta.
CtaCustom and the custom destination registry now match reserved destinations with ctaDestinationKey, so a query string, hash or absolute URL no longer slips past. A new test loads the registry and fails npm test when a .vue file hard-codes a link to one of the five destinations, since a render-time throw doesn't fail the build.
A hash points at a section of the page, so /pricing/#comparison is no longer treated as the reserved pricing destination. Query strings still are.
The five buttons and CtaLink take a query prop (e.g. subject or utm parameters) appended to the fixed href, so a link that needs one no longer has to be hand-written. The path, label and event stay fixed. cta:<key> in markdown accepts a query string too.
✅ Deploy Preview for flowfuse-website ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
ctaQuery collapsed a repeated parameter (?tag=one&tag=two) to its last value. A query value can now be an array, which withCtaQuery writes back as the repeated parameter.
A destination link written with http:// was treated as an ordinary link. The comparison now upgrades the protocol but keeps the host, so another site's /pricing/ still doesn't match.
HTTPS://... links now match their destination, and a query parameter named toString, constructor or __proto__ no longer picks up an inherited value.
This branch has not been deployed
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 #5857: inline links to one of the five CTA destinations now fire that destination's PostHog event (
cta-sign-up,cta-book-demo, etc.), while the link text stays free to fit the sentence.CtaLinkis the one component for inline CTA links. The href and event come fromCTA_DESTINATIONS, the text goes in the slot, and it sends{ position, variant: 'text' }.ProseArendersCtaLinkwhenever a link points at a destination, however it was written (cta:signUp,site:appURLor a typed URL). That covers around 280 existing links in posts, changelog entries and webinars. Links tosite:appURL("FlowFuse Cloud is already running 0.6") count ascta-sign-in.CtaLink. The homepage one had a hand-writtencapture().CtaImagerenders throughCtaLink, so its href comes fromCTA_DESTINATIONSand it fires the destination event (variant: 'image') alongsideblog-cta.CtaLinktake aqueryprop (e.g.{ subject: 'Certified Nodes' }or utm parameters) appended to the fixed URL, so a link that needs one no longer has to be hand-written.cta:contactUs?subject=...works in markdown too.flowfuse.comform don't matter, while a hash (/pricing/#comparison) counts as its own destination. TheCtaCustomguards now use the same rule. A new test failsnpm testwhen a custom destination duplicates another or points at a reserved one, or when a.vuefile hard-codes a link to a reserved one. Until now these checks only threw at render time, which doesn't fail the build.Follow-up:
Related Issue(s)
Checklist
Note
Add
CtaLinkand markdowncta:tracking for CTA destinationsCtaLinkcomponent and markdowncta:syntax to render and track inline links to registered CTA destinations.ctaDestinationKey,withCtaQuery, andctaQueryhelpers in cta-destinations.ts to resolve URLs and manage query parameters.ProseAandCtaImageto render matching links viaCtaLink, and adds aqueryprop to fixed CTA components.CtaLink.ctaDestinationKeytreats URLs with hashes as separate links and ignores query strings for destination matching. Custom CTA registry validation now uses this resolver, which may reject absolute URLs or query strings that collide with reserved destinations.npm testnow fails on hard-coded reserved CTA links.📊 Macroscope summarized 4cf4d89. 18 files reviewed, 3 issues evaluated, 0 issues filtered, 3 comments posted
🗂️ Filtered Issues