Skip to content

feat(giveback): gift entry point with live activity + invite prompt#6281

Open
tsahimatsliah wants to merge 3 commits into
mainfrom
claude/goofy-ishizaka-979a95
Open

feat(giveback): gift entry point with live activity + invite prompt#6281
tsahimatsliah wants to merge 3 commits into
mainfrom
claude/goofy-ishizaka-979a95

Conversation

@tsahimatsliah

@tsahimatsliah tsahimatsliah commented Jul 2, 2026

Copy link
Copy Markdown
Member

Changes

Adds the giveback header + new-layout rail gift entry point — an acquisition hook whose job is to pull people into /giveback. Ported from design mock-up #6278 into a clean, review-ready state (QA/debug scaffolding dropped).

  • GivebackGiftButton — a calm gift icon at rest (header + rail variants, press feedback). No progress meter, no notification badge. Header variant matches NotificationsBell (Float, w-10, centered).
  • GivebackGiftDock — composition point with an imperative API (pulseActivity, showPrompt, reset) the entry drives; renders the +$ dollar jumps and celebration glow.
  • Polymarket-style dollar jumps — bare green +$ figures pop beside the gift as community money lands (social proof), offset per-pop to stay legible.
  • GivebackInvitePrompt — a wide, mascot-fronted invite card (daily.dev Giveback charm) with rotating community-framed messaging, confetti on celebratory moments, and an auto-dismiss countdown ring on the close button (driven by useTimedAnimation, pauses on hover).
  • GivebackConfettiBurst + new motion classes in base.css — all bounce:0 (no overshoot) and reduced-motion safe.
  • GivebackGiftEntry — container gated on the existing featureGiveback flag + logged-in + desktop; wired into HeaderButtons (between quests and notifications) and the SidebarDesktopV2 rail gift (which falls back to the Invite friends shortcut when the flag is off). Navigates to /giveback.
  • StorybookFeatures/Giveback/Entry points/*: resting gift-button states, header states, and an interactive live playground.

Note

The money pulses and invite-prompt cadence are currently driven by a local timer as a clearly-marked placeholder. Before this graduates past the experiment, replace them with live backend community-activity signals and drop the hardcoded figures in givebackInvitePrompts.

Experiment

No new flag — reuses the existing giveback feature flag that already gates the page. When off (production default), HeaderButtons is unchanged and the rail gift keeps its Invite friends behavior.

Events

Type event_name extra
New click giveback gift entry
New view giveback prompt { prompt }

Notes for reviewers

Ported from mock-up #6278. Relative to that branch, the review-only QA scaffolding was intentionally removed for merge: the GivebackDevPanel, the givebackQa window event bus, the ?giveback_debug force-show overrides, and the global MainLayout mount.

Manual Testing

  • node ./scripts/typecheck-strict-changed.js passes
  • HeaderButtons / MainLayoutHeader specs pass (entry renders null when flag off — no regression)
  • Full giveback feature suite passes (63 tests)

🤖 Generated with Claude Code

Preview domain

https://claude-goofy-ishizaka-979a95.preview.app.daily.dev

Adds the giveback header + new-layout rail gift entry point — an
acquisition hook that pulls people into /giveback. Gated entirely behind
the existing `featureGiveback` flag (off in production until turned on
per cohort), so main behavior is unchanged when the flag is off.

- GivebackGiftButton: calm resting gift (header/rail variants), press feedback
- GivebackGiftDock: composition point + imperative API (pulseActivity,
  showPrompt, reset), bare "+$" community dollar jumps, glow bloom
- GivebackInvitePrompt: mascot-fronted invite card with a hover-pausing
  auto-dismiss countdown ring (driven by useTimedAnimation)
- GivebackConfettiBurst + motion classes in base.css (bounce:0, reduced-motion safe)
- GivebackGiftEntry: flag- + desktop-gated container, wired into HeaderButtons
  and the SidebarDesktopV2 rail gift (falls back to Invite friends when off)
- Storybook: resting states, header states, and an interactive live playground

The money pulses + invite-prompt cadence are driven by a local timer as a
clearly-marked PLACEHOLDER — to be replaced by live backend community-activity
signals (and the hardcoded figures dropped) before the experiment graduates.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
daily-webapp Ready Ready Preview Jul 2, 2026 1:53pm
storybook Building Building Preview Jul 2, 2026 1:53pm

Request Review

Two fixes from self-review of the entry point:

- The sidebar rail gift navigates via its anchor href, so it never went
  through the dock's open handler and ClickGivebackGiftEntry was never
  logged for rail clicks (header logged, rail didn't). Route the rail
  anchor's capture-phase click through handleOpen so the event fires; the
  entry only calls router.push for the built-in header button to avoid
  double-navigating the rail anchor.
- GivebackConfettiBurst had a private copy of a prefers-reduced-motion
  check that read the media query once and never reacted to changes. Reuse
  the existing (now exported) usePrefersReducedMotion from useGivebackMotion,
  which subscribes to changes — dropping the duplicated helper.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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