feat(events): add shareable per-event links - #534
Merged
Conversation
Adds a "copy link" button to the event modal on both /events and /events-new that encodes the event's id as ?event=<id>, and reopens that event's modal on load when the param is present, so a specific event can be shared directly instead of only the whole page or category.
Deploying website with
|
| Latest commit: |
0b1947d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c452d2f2.website-aun.pages.dev |
| Branch Preview URL: | https://feat-events-share-link.website-aun.pages.dev |
4 tasks
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.
Summary
/eventsand/events-new, next to the close button.?event=<id>in the URL, copies the full link to the clipboard, and shows a "Copied!" tooltip — same pattern as the existing category permalink (#) button.?event=<id>is present and matches a known event, that event's modal auto-opens (mirrors the existing hash-scroll-on-load effect for category links).isEventPast()tosrc/utils/eventSections.tsso a single deep-linked event can be classified as past/upcoming without going throughgroupIntoSections/getUpcomingEvents.Test plan
/events, open an event, click the share icon, confirm "Copied!" shows and the clipboard contains a URL like.../events?event=<id>./events-new.?event=id (e.g. an old event no longer in the feed) doesn't error and just loads the page normally.pnpm checkpasses.