Skip to content

feat(events): add shareable per-event links - #534

Merged
mohanadft merged 1 commit into
mainfrom
feat/events-share-link
Aug 31, 2026
Merged

feat(events): add shareable per-event links#534
mohanadft merged 1 commit into
mainfrom
feat/events-share-link

Conversation

@mohanadft

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a "copy link" (share icon) button to the event detail modal on both /events and /events-new, next to the close button.
  • Clicking it encodes the event's id (ICS UID) as ?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.
  • On page load, if ?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).
  • Adds isEventPast() to src/utils/eventSections.ts so a single deep-linked event can be classified as past/upcoming without going through groupIntoSections/getUpcomingEvents.

Test plan

  • On /events, open an event, click the share icon, confirm "Copied!" shows and the clipboard contains a URL like .../events?event=<id>.
  • Paste that URL in a new tab and confirm the same event's modal opens automatically once events load.
  • Repeat both steps on /events-new.
  • Confirm an invalid/stale ?event= id (e.g. an old event no longer in the feed) doesn't error and just loads the page normally.
  • pnpm check passes.

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.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying website with  Cloudflare Pages  Cloudflare Pages

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

View logs

@mohanadft
mohanadft merged commit e0cca35 into main Aug 31, 2026
5 checks passed
@mohanadft
mohanadft deleted the feat/events-share-link branch August 31, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant