Skip to content

fix(skeleton): restore category glyph hover animations#500

Merged
sudhashrestha merged 2 commits into
mainfrom
fix/category-glyph-animations
Jun 11, 2026
Merged

fix(skeleton): restore category glyph hover animations#500
sudhashrestha merged 2 commits into
mainfrom
fix/category-glyph-animations

Conversation

@sudhashrestha

@sudhashrestha sudhashrestha commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Move cg keyframes to globals.css so animate-cg-* utilities compile. Keep group-hover/cg in TSX for most glyphs; CSS transform rules only for SVG scale-x/y edge cases (text, list, graphs, widget).

Summary by CodeRabbit

  • New Features

    • Added global animation utilities for skeleton elements (ping, bounce, shimmer, twinkle).
    • Added Storybook stories for List, Icon, Graphs, and Skeleton variants.
  • Refactor

    • Centralized animation keyframes/utilities and switched glyphs to semantic motion classes.
    • Introduced CSS hover exception rules and improved reduced-motion handling.
  • Documentation

    • Clarified contributor guidance and hover/motion patterns for category glyphs.

Move cg keyframes to globals.css so animate-cg-* utilities compile.
Keep group-hover/cg in TSX for most glyphs; CSS transform rules only
for SVG scale-x/y edge cases (text, list, graphs, widget).

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 513f1b8b-1be1-45e7-b4ef-b30e0b9c59dd

📥 Commits

Reviewing files that changed from the base of the PR and between ee27bd2 and 32e7ec5.

📒 Files selected for processing (7)
  • CLAUDE.md
  • animata/skeleton/category-glyphs.css
  • animata/skeleton/category-glyphs.tsx
  • animata/skeleton/category-skeleton.stories.tsx
  • content/docs/contributing/category-glyphs-spec.md
  • content/docs/contributing/category-glyphs.mdx
  • styles/globals.css
✅ Files skipped from review due to trivial changes (1)
  • CLAUDE.md
🚧 Files skipped from review as they are similar to previous changes (3)
  • styles/globals.css
  • animata/skeleton/category-glyphs.tsx
  • animata/skeleton/category-glyphs.css

📝 Walkthrough

Walkthrough

Category glyph animations are refactored to use global utilities. Keyframes and theme animation tokens move to styles/globals.css; animata/skeleton/category-glyphs.css provides semantic motion hooks and CSS exception hover rules; components and stories are updated to use those hooks and docs are revised.

Changes

Centralize Category Glyph Animations

Layer / File(s) Summary
Global animation utilities definition
styles/globals.css
Adds --animate-cg-* theme variables and @keyframes cg-ping, cg-bounce, cg-shimmer, cg-twinkle.
CSS class hook infrastructure
animata/skeleton/category-glyphs.css, CLAUDE.md
Removes inline component keyframes; .cg-motion transition list gains scale-x/scale-y; new prefers-reduced-motion: no-preference rules add group/cg:hover selectors, transform-origin overrides, and staggered transition delays for text, list, graphs, and widget parts. CLAUDE.md doc pointer updated.
Glyph component refactor and stories
animata/skeleton/category-glyphs.tsx, animata/skeleton/category-skeleton.stories.tsx
TSX glyph variants updated to use semantic hooks (cg-text-line-*, cg-list-bar, cg-list-grow, cg-list-shrink, cg-graph-bar-*, cg-widget-hour, cg-widget-minute) and separate animation class entries; Storybook stories List, Icon, Graphs, Skeleton added.
Docs and contributor guidance updates
content/docs/contributing/*
Spec and contributing docs rewritten to describe three hover patterns (Tailwind group-hover, keyframe-loop via global --animate-cg-*, and CSS scale/rotate exceptions), and checklist tightened for hover behavior.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • hari

Poem

🐇✨ I braided keyframes into global tune,
Hooks on glyphs now hum beneath the moon,
Shimmers, pings, and twinkles neatly dressed,
Components wear their motion like a crest,
Hooray — the rabbits clap, the icons move in tune!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(skeleton): restore category glyph hover animations' clearly and specifically summarizes the main change: restoring hover animations for category glyphs by moving keyframe definitions to globals.css and restructuring CSS/Tailwind class usage across multiple glyph variants.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 fix/category-glyph-animations

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.

@cloudflare-workers-and-pages

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

Copy link
Copy Markdown

Deploying animata with  Cloudflare Pages  Cloudflare Pages

Latest commit: 32e7ec5
Status: ✅  Deploy successful!
Preview URL: https://e474c661.animata.pages.dev
Branch Preview URL: https://fix-category-glyph-animation.animata.pages.dev

View logs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@animata/skeleton/category-glyphs.css`:
- Around line 73-127: Update the contributor spec (category-glyphs-spec.md) to
reflect that the CSS block now owns hover transform rules for the category
glyphs rather than TSX: explicitly list the selectors (.group/cg:hover and the
affected classes .cg-text-line-1/.cg-text-line-2/.cg-text-line-3,
.cg-list-grow/.cg-list-shrink,
.cg-graph-bar/.cg-graph-bar-2/.cg-graph-bar-3/.cg-graph-bar-4, and
.cg-widget-hour/.cg-widget-minute) and state that hover transform/transition
timing behavior is implemented in CSS under the prefers-reduced-motion media
query; remove or update any line that claims hover transforms live only in TSX
and add a short note to contributors to check this CSS block when changing glyph
hover behavior.

In `@styles/globals.css`:
- Around line 113-116: The cg-* animation tokens (--animate-cg-ping,
--animate-cg-bounce, --animate-cg-shimmer, --animate-cg-twinkle) were added to
styles/globals.css but are specific to the category-glyph component; move these
CSS variables and their corresponding keyframes into the co-located stylesheet
animata/skeleton/category-glyphs.css (and the other cg-related blocks referenced
around lines 411-449) so component-specific keyframes live with CategoryGlyph
styles, and remove them from styles/globals.css, leaving only truly
shared/global animation tokens in globals.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2c11c31a-e0ba-4e90-82a2-9d2f1c967d4a

📥 Commits

Reviewing files that changed from the base of the PR and between df72b77 and ee27bd2.

📒 Files selected for processing (3)
  • animata/skeleton/category-glyphs.css
  • animata/skeleton/category-glyphs.tsx
  • styles/globals.css

Comment thread animata/skeleton/category-glyphs.css
Comment thread styles/globals.css
Document the three hover patterns (Tailwind, keyframe loops, CSS scale
exceptions), why cg keyframes live in globals.css, and add Storybook
stories for glyphs with non-default hover behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
@sudhashrestha sudhashrestha requested a review from hari June 11, 2026 12:56
@sudhashrestha sudhashrestha merged commit f6836c1 into main Jun 11, 2026
6 checks passed
@sudhashrestha sudhashrestha deleted the fix/category-glyph-animations branch June 11, 2026 12:58
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