Issue 1072/routing urls linked#1074
Open
onewheelskyward wants to merge 4 commits into
Open
Conversation
The legacy /calendar/ page rendered the event description as escaped plain text, so route links were just unclickable text. Auto-link any ridewithgps.com mentions (with or without scheme/www) while HTML-escaping the rest of the description, keeping a domain allow-list so this doesn't become an open door for spam links. Fixes #1072
Keeps the ridewithgps.com allow-list alongside the other calendar JS constants (AREA, AUDIENCE, etc.) instead of buried in helpers.js, so it's the obvious place to add another trusted domain later.
When an organizer includes a ridewithgps.com route link in their event description, fetch the oEmbed embed HTML from ridewithgps and inject an interactive map card directly below the description. Requests are lazy: the IntersectionObserver only fires when the event is expanded and the link is actually visible, so collapsed events never trigger a fetch. One card per event (first ridewithgps URL wins); fails silently if the request errors or CORS blocks it.
Ports the linkify + inline oEmbed card behavior from the legacy /calendar/ page to the Vue SPA's event details (shareable link) view, so the permalink page renders ridewithgps.com route links as clickable links and shows the interactive map card instead of plain text. getLinkedDetails/getUnfurlUrl mirror the legacy helpers.js (same LINKABLE_DOMAINS allow-list and trailing-punctuation handling). Since this is a dedicated, always-visible page rather than a collapsible list, it fetches the oEmbed card directly on load (no IntersectionObserver) and gates the fetch on the ridewithgps.com host. Refs #1072
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.
No description provided.