Skip to content

feat(background): shooting stars + animated beam refresh#487

Merged
sudhashrestha merged 2 commits into
mainfrom
feat/shooting-stars-animated-beam
Jun 4, 2026
Merged

feat(background): shooting stars + animated beam refresh#487
sudhashrestha merged 2 commits into
mainfrom
feat/shooting-stars-animated-beam

Conversation

@hari
Copy link
Copy Markdown
Contributor

@hari hari commented Jun 4, 2026

What

  • background/shooting-stars — new component. A dark sky where SVG light streaks shoot across at varied lengths, speeds and angles over a twinkling starfield. React spawns/recycles the streaks; CSS keyframes do the motion (no animation lib, no WebGL). Streaks spawn off the top/left edge and travel in. Ships with a story, docs, and a June site-changelog entry. Credited to Sudha Shrestha, based on Jeremboo's Animated Mesh Lines.
  • background/animated-beam — refresh. Each beam's length, speed, width and brightness now come from a deterministic per-index hash (SSR-safe, no two alike), with ~30% running as fast bright zips. Removed getBoundingClientRect and the resize listener in favor of CSS-clipped fixed-width lanes, and centered the field so it crops evenly on both edges instead of cutting off on the right. Beams no longer peek at their resting spot before their delay. Docs rewritten with a per-component changelog.
  • card/collab-card — snug leading on the live label (small style fix).
  • docs/contributing — documented a new per-component ## Changelog section convention (dated entries for notable changes to existing components).

Notes

  • Both background components honor prefers-reduced-motion.
  • animated-beam is now a pure component (no runtime JS); shooting-stars needs React for spawning but the motion is CSS.
  • Not included here: parallax-slider and neon-cursor (still in progress on the working branch) — left for a separate PR, and their changelog entries were kept out so this one is self-consistent.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added Shooting Stars animated background and Storybook demo.
  • Improvements

    • Redesigned Animated Beam for deterministic, CSS-driven lanes and improved reduced-motion handling.
    • Minor UI text/layout tweaks for CollabCard.
  • Documentation

    • Added Shooting Stars docs and demo entry; updated Animated Beam docs and changelog guidance; expanded contributing guide with component changelog standards.

- shooting-stars: new SVG meteor-shower component with story and docs.
  Credited to Sudha Shrestha, based on Jeremboo's Animated Mesh Lines.
  Added to the June site changelog.
- animated-beam: per-beam length/speed/width/brightness via CSS variables
  (deterministic, SSR-safe), with some fast bright zips. Dropped
  getBoundingClientRect and the resize listener for CSS-clipped lanes
  (fixed count, even crop on both edges); beams no longer peek before
  their delay. Doc rewritten with a per-component changelog.
- collab-card: snug leading on the live label.
- docs: document the per-component Changelog convention in contributing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 4, 2026

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7495121b-2948-48ee-8a5d-8898183ad061

📥 Commits

Reviewing files that changed from the base of the PR and between 35d1e91 and af910a4.

📒 Files selected for processing (1)
  • animata/background/shooting-stars.tsx

📝 Walkthrough

Walkthrough

Deterministic animated-beam refactor to fixed 64 lanes, new ShootingStars client component seeded by ResizeObserver with CSS-driven animations and star recycling, small CollabCard styling tweaks, and documentation/changelog updates including per-component changelog guidance.

Changes

Background Animations & Styling

Layer / File(s) Summary
Animated Beam Deterministic Refactor
animata/background/animated-beam.tsx, content/docs/background/animated-beam.mdx
Fixed 64-lane layout replaces responsive measurement; PRNG-derived per-beam parameters (duration, delay, length, width, opacity) emitted as CSS variables. @keyframes meteor now uses var(--opacity) and animation fill/backwards to avoid peeking. prefers-reduced-motion disables animations. Docs updated to note inline keyframes and no runtime resize listeners.
Shooting Stars Background Component
animata/background/shooting-stars.tsx, animata/background/shooting-stars.stories.tsx, content/docs/background/shooting-stars.mdx
New client component rendering twinkling dots and shooting streaks via SVG and CSS keyframes. Uses ResizeObserver to seed dot/star counts from container dimensions, per-star CSS vars (--dx, --dy, etc.) drive motion, and onAnimationEnd recycles stars. Respects prefers-reduced-motion. Includes Storybook story and docs.
CollabCard Styling Updates
animata/card/collab-card.tsx, animata/card/collab-card.stories.tsx
Story wrapper adds text-pretty; liveLabel span class updated to include leading-snug.
Documentation Infrastructure & Registry
content/docs/contributing/components.mdx, content/docs/changelog/2026-06.mdx
Adds "Changelog" section to contributing guide with per-component dated entries and registers Shooting Stars in the June 2026 changelog.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • codse/animata#481: Related earlier work introducing CollabCard and its Storybook/docs (styling tweaks overlap).

Suggested reviewers

  • sudhashrestha

Poem

🐰 I seeded stars with careful artful hops,
Lanes now march in rows—no measuring stops.
CSS guides their dance, I nibble a carrot bright,
Recycled comets blink and streak the night.
✨🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the two main additions: a new shooting stars background component and a refresh to the animated beam component, matching the PR's primary objectives.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/shooting-stars-animated-beam

Warning

Review ran into problems

🔥 Problems

Stopped waiting for pipeline failures after 30000ms. One of your pipelines takes longer than our 30000ms fetch window to run, so review may not consider pipeline-failure results for inline comments if any failures occurred after the fetch window. Increase the timeout if you want to wait longer or run a @coderabbit review after the pipeline has finished.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 35d1e9185a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +119 to +122
const ro = new ResizeObserver(() => {
const r = el.getBoundingClientRect();
dims.current = { w: r.width, h: r.height };
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reseed after zero-size mounts

If this component mounts while its container has 0 width or height (for example inside a hidden tab, collapsed section, or a lazily revealed panel), seed() returns before creating any dots or shooting stars. The ResizeObserver then only updates dims.current, so when the container later becomes visible the sky remains empty until a remount; the observer needs to invoke the seeding path once a non-zero size is observed.

Useful? React with 👍 / 👎.

Comment thread animata/background/animated-beam.tsx
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Jun 4, 2026

Deploying animata with  Cloudflare Pages  Cloudflare Pages

Latest commit: af910a4
Status:⚡️  Build in progress...

View logs

If the container mounts at 0x0 (hidden tab, collapsed or lazy panel),
seed() bailed early and the ResizeObserver only updated dims, so the sky
stayed empty until a remount. Now it seeds once a non-zero size is first
observed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sudhashrestha sudhashrestha merged commit d1c7ffc into main Jun 4, 2026
3 of 5 checks passed
@sudhashrestha sudhashrestha deleted the feat/shooting-stars-animated-beam branch June 4, 2026 16:17
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