## Background
Variant C's key differentiator is a heart burst animation triggered by tapping the badgeBefore committing to the full animation implementation, we need a spike to settle three open design questions and inform a few engineering questions:
# randomness model (fully random vs. This task covers building and tuning the animationconstrained spread),
# color treatment (flat red, and making an explicit decision on whether hearts scatter with randomized colors.two-tone, That decision affects whether the animation stays surprising on repeat taps – central to the re-engagement loop hypothesis.
white outline), including randomness model
The designs feature multiple red heart SVGs of varying sizes radiat# burst timing outward from the badge icon across the full viewport,(current 0/150/300ms vs. with hearts fading out as they traveltighter or single burst).
These can only be resolved by evaluating an in-progress animation (possibly on a real device).
Output is a self-contained HTML prototype – no MediaWiki dependencies, no build step – shared for design review. Closeness, but not production code.
### Goal
An animation that feels celebratory on first tap and still feels worth triggering on return visitsDocumented decisions on all questions we can implement directly, built without degrading article page performance design sign-off.
### Requirements
- Tapping the badge triggers the heart burst animation (variant C only)HTML file (or CodePen), very limited external dependencies. Animation via `requestAnimationFrame` matching the production approach.
- Hearts vary in color (tbd) scatter in different directions- Configurations switchable.
- Animation replays on every tap, including in return sessions.
- Page stays interactive during playback.
- Evaluate whether randomized colors produce a meaningfully better experience than fixed ones, and document the decision.
#### Technical
- CSS keyframes + JS orchestration only. No animation librariesRe-tap during animation fades current hearts out over 150ms and restarts immediately.
- Heart elements created dynamically in JS, appended to `<body>`, removed from DOM after animation finishes. No leftover nodes.
- Target duration: 800–1200ms. Hearts start fading around 600ms.
- Animated hearts must be `position: absolute` relative to viewport. No layout shift.
- Use `requestAnimationFrame` for orchestration. No synchronous style reads inside the loop.
- Randomness evaluation: evaluate random approach and then test at minimum two approaches and assess which feels more delightful on repeat interaction. Document outcome in task comments before closing.
- After animation, the variant C "Hide badge" pill button must appear automatically.Check frame rate on a mid-range Android during burst peak.
### Acceptance Criteria for Done
[] Tapping badge fires heart burst animation: hearts of varied sizes radiate outward from the badge and fade within ~1000ms.
[] Animation replays on every tap across all sessions.
[] Heart elements removed from DOM after animation completes (no leftover nodes)Prototype shared and reviewable on mobile without a build step.
[] @Sneha tbd "Hide badge" pill button appears bottom-center after animation endsRandomness, color, and burst timing changeable.
[] CLS delta < 0.01 with animation playing (Lighthouse or equivalent)Tested on iOS Safari and Android Chrome.
[] No long tasks on the main thread during animation (verified via Performance panel)Frame rate checked on mid-range Android; anything below 50fps ruled out.
[] Randomness evaluation completed and decision documented in task commentsDesign sign-off.
[] Renders correctly on Chrome Android (mid-range device) and Safari iOSTask comment with one decision per variable and rationale before closing.
[] Design sign-off on animation feelImplementation updated with any scope changes before this task closes.