Skip to content

Add participant assignment confetti celebration on details open#57

Open
dsanchezcr with Copilot wants to merge 4 commits into
mainfrom
copilot/add-confeti-visual-effect
Open

Add participant assignment confetti celebration on details open#57
dsanchezcr with Copilot wants to merge 4 commits into
mainfrom
copilot/add-confeti-visual-effect

Conversation

Copilot AI commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Participants now get a short celebratory confetti effect when their assignment details page is shown, on both mobile and desktop layouts. The change is scoped to the participant assignment view and does not alter API or game logic.

  • Assignment reveal celebration

    • Added a confetti overlay in AssignmentView rendered only when assignment details are available (currentReceiver present).
    • The animation auto-dismisses after the computed max animation window.
  • Trigger semantics

    • Confetti is triggered when a receiver is shown, and guarded by receiver id to avoid duplicate replays for the same receiver while still allowing replay if receiver changes.
  • Deterministic animation config

    • Implemented fixed confetti piece definitions (colors, spread, delay, duration, drift) to keep rendering predictable and lint-safe.
    • Introduced named constants for spacing and display duration for easier tuning.
useEffect(() => {
  if (!currentReceiver || lastConfettiReceiverId.current === currentReceiver.id) return

  lastConfettiReceiverId.current = currentReceiver.id
  setShowConfetti(true)
  const timer = setTimeout(() => setShowConfetti(false), CONFETTI_DISPLAY_DURATION_MS)
  return () => clearTimeout(timer)
}, [currentReceiver])

Copilot AI changed the title [WIP] Add confeti visual effect for gift exchange assignment Add participant assignment confetti celebration on details open Jun 10, 2026
Copilot AI requested a review from dsanchezcr June 10, 2026 22:52
@github-actions

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-rock-0a7c3890f-57.eastus2.7.azurestaticapps.net

@dsanchezcr dsanchezcr added the enhancement New feature or request label Jul 23, 2026

@dsanchezcr dsanchezcr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copilot AI review requested due to automatic review settings July 23, 2026 16:56
@dsanchezcr
dsanchezcr marked this pull request as ready for review July 23, 2026 16:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a lightweight, deterministic confetti celebration to the participant assignment details experience in AssignmentView, triggered when a receiver becomes available and auto-dismissed after the animation window.

Changes:

  • Introduces deterministic confetti piece definitions and a computed display duration constant.
  • Triggers a confetti overlay via useEffect when currentReceiver changes (guarded by receiver id).
  • Renders a fixed, pointer-events-none Framer Motion overlay while showConfetti is true.
Show a summary per file
File Description
src/components/AssignmentView.tsx Adds confetti configuration, trigger effect, and overlay rendering in the participant assignment view.

Review details

  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Low

Comment on lines +162 to +169
useEffect(() => {
if (!currentReceiver || lastConfettiReceiverId.current === currentReceiver.id) return

lastConfettiReceiverId.current = currentReceiver.id
setShowConfetti(true)
const timer = setTimeout(() => setShowConfetti(false), CONFETTI_DISPLAY_DURATION_MS)
return () => clearTimeout(timer)
}, [currentReceiver])
@github-actions

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-rock-0a7c3890f-57.eastus2.7.azurestaticapps.net

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add confeti visual effect when a Participant opens their exchange gift assignment

3 participants