feat(giveback): gift entry point with live activity + invite prompt#6281
Open
tsahimatsliah wants to merge 3 commits into
Open
feat(giveback): gift entry point with live activity + invite prompt#6281tsahimatsliah wants to merge 3 commits into
tsahimatsliah wants to merge 3 commits into
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
1 task
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>
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.
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 matchesNotificationsBell(Float,w-10, centered).GivebackGiftDock— composition point with an imperative API (pulseActivity,showPrompt,reset) the entry drives; renders the+$dollar jumps and celebration glow.+$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 byuseTimedAnimation, pauses on hover).GivebackConfettiBurst+ new motion classes inbase.css— allbounce:0(no overshoot) and reduced-motion safe.GivebackGiftEntry— container gated on the existingfeatureGivebackflag + logged-in + desktop; wired intoHeaderButtons(between quests and notifications) and theSidebarDesktopV2rail gift (which falls back to the Invite friends shortcut when the flag is off). Navigates to/giveback.Features/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
givebackfeature flag that already gates the page. When off (production default),HeaderButtonsis unchanged and the rail gift keeps its Invite friends behavior.Events
{ 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, thegivebackQawindow event bus, the?giveback_debugforce-show overrides, and the globalMainLayoutmount.Manual Testing
node ./scripts/typecheck-strict-changed.jspassesHeaderButtons/MainLayoutHeaderspecs pass (entry renders null when flag off — no regression)🤖 Generated with Claude Code
Preview domain
https://claude-goofy-ishizaka-979a95.preview.app.daily.dev