Skip to content

feat(events): Submit report button on past events the community shows - #467

Merged
elliotBraem merged 1 commit into
mainfrom
feat/past-event-submit-report
Oct 28, 2026
Merged

elliotBraem merged 1 commit into
mainfrom
feat/past-event-submit-report

Conversation

@MisbahAnsar

Copy link
Copy Markdown
Collaborator

What

Adds a Submit report button to past events on a community's Events tab. It opens the shared post-event report form (https://docs.google.com/forms/d/e/1FAIpQLSdGTdQ9znOJbObaeef7NHAzXc04OygTLIOu6Qv1dKRx8Fwxxw/viewform) in a new tab. Per the team discussion, one shared Google Form link is hardcoded for now; moving reports into the dashboard will be scoped separately.

Which events get it

Only events the community has published or shown and that have ended: what the "Ended" badge already uses (eventVisibility() === "ended"). Hidden or removed Luma imports, drafts and cancelled events don't get the button. It sits next to the other actions on the event card, so everyone who can manage the Events tab sees it.

Changes

  • activity-editor.tsx: Submit report button on ended, visible events (target=_blank, rel=noopener noreferrer)
  • discovery.ts: events.submitReport in en/es/fr/zh
  • owner-event-visibility.spec.ts: the ended event has the form link in a new tab; a past hidden import has no button
  • Changeset (ui patch)

Testing

  • pnpm lint, pnpm typecheck, pnpm test, pnpm test:regression:unit pass
  • owner-event-visibility browser spec (dev:ssr) passes 2/2
  • Checked manually with mock past events: shown past events have Submit report, which opens the form in a new tab; drafts, cancelled events and hidden imports don't

Past events a community shows on its calendar get a Submit report button
on the Events tab that opens the post-event report form in a new tab.
Hidden or removed imports, drafts and cancelled events don't get it.
@multi-review

multi-review Bot commented Oct 28, 2026

Copy link
Copy Markdown

Multi Review · a336ce1

This PR adds an outbound Submit report link to activity rows that eventVisibility classifies as ended, using the same new-tab <a> render pattern as the existing Edit on Luma link. It also adds an i18n key and extends the regression spec. Risk is low: the condition reuses the existing Ended-badge logic. That logic already leaves out socials, drafts, cancelled events and hidden or removed Luma imports. The shared seed change doesn't affect the second spec's counts.

No new issues found

What was checked (8 areas)
  • rowActions in activity-editor.tsx and both places it's called (EventTimeline actions for the upcoming/past tabs, and the posts ItemGroup)
  • eventVisibility/hasEnded in lib/event-visibility.ts: only events (not socials) can be 'ended'; hidden, removed, draft and cancelled checks come first
  • reviewImports path: waiting imports are never ended, so the button never shows there
  • ActivityEditor caller in events-editor.tsx (canPost/canOnboard props); the button doesn't depend on canPost, which the PR says is intentional
  • useVisibilityContext: the ended check doesn't depend on communityPublic loading
  • regression spec: endedImport seed resolves to hiddenImport; seedEventStates is shared with the Overview test, and the new ended hidden import doesn't change the live count or the 1 waiting-import count (dashboard/node/index.tsx)
  • activity-editor.test.tsx: no assertions on how many links or buttons a row has
  • i18n key added for all 4 locales

Comment @multi-review to re-review new commits, or @multi-review full for a full review.

@elliotBraem
elliotBraem merged commit 66117ad into main Oct 28, 2026
7 checks passed
@elliotBraem
elliotBraem deleted the feat/past-event-submit-report branch October 28, 2026 20:56
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.

2 participants