Skip to content

feat: add-new-icons#79

Open
Priyank-Lal wants to merge 8 commits intoitshover:masterfrom
Priyank-Lal:feat/add-new-icons
Open

feat: add-new-icons#79
Priyank-Lal wants to merge 8 commits intoitshover:masterfrom
Priyank-Lal:feat/add-new-icons

Conversation

@Priyank-Lal
Copy link
Copy Markdown

@Priyank-Lal Priyank-Lal commented Jan 14, 2026

Description

This PR adds 6 new animated icons to the library, each with unique hover animations following the project's established patterns.

New Icons:

  1. avatar-icon - User profile icon with head bounce animation
  2. upload-icon - Upload arrow with smooth repositioning effect
  3. grid-loader-icon - 4-dot grid with sequential pulse animation
  4. document-scan-icon - Document with scanning line and corner brackets
  5. tag-icon - Price tag with smooth swing rotation around the hole
  6. hammer-icon - Tool/build icon with hammer swing animation

Implementation Details

All icons:

  • Follow the standard component pattern with forwardRef and AnimatedIconHandle
  • Use motion/react for animations with useAnimate hook
  • Implement both startAnimation and stopAnimation methods via useImperativeHandle
  • Are properly registered in icons/index.ts and lib/icons.ts
  • Include comprehensive keywords for searchability
  • Support all standard props: size, color, strokeWidth, className

Type of Change

  • Bug fix
  • New feature
  • New icon(s)
  • Documentation update

Checklist

  • Code follows project style guidelines
  • npm run check passes (lint, format, typecheck)
  • npm run registry:build passes
  • npm run build passes (production build verified)
  • Icons work on all screen sizes
  • Self-review completed
  • All icons properly exported and registered
  • Keywords added for search functionality
  • Registry JSON files generated for shadcn CLI

Testing

Tested locally by:

  1. Running npm run dev and verifying icons appear in /icons gallery
  2. Hovering over each icon to verify animations work correctly
  3. Running all checks (npm run check) - all passed
  4. Building production bundle (npm run build) - successful

Preview

Avatar Icon

Screen.Recording.2026-01-15.at.06.59.50.mov

Upload Icon

Screen.Recording.2026-01-15.at.07.01.45.mov

Grid-Loader Icon

Screen.Recording.2026-01-15.at.07.02.11.mov

Document-Scan Icon

Screen.Recording.2026-01-15.at.07.02.46.mov

Tag Icon

Screen.Recording.2026-01-15.at.07.03.40.mov

Hammer Icon

Screen.Recording.2026-01-15.at.07.04.14.mov

Summary by CodeRabbit

Release Notes

  • New Features
    • Added 6 new animated icons to the library: avatar, document scan, grid loader, hammer, tag, and upload. Each icon includes interactive hover animations for enhanced visual feedback.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Jan 14, 2026

@Priyank-Lal is attempting to deploy a commit to the itshover's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jan 14, 2026

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

This PR introduces six new animated React icon components (AvatarIcon, DocumentScanIcon, GridLoaderIcon, HammerIcon, TagIcon, UploadIcon) using motion/react. Each component uses forwardRef to expose imperative animation controls, animates on hover and via ref methods, and is registered in the icon registry alongside shared type definitions.

Changes

Cohort / File(s) Summary
New Animated Icon Components
icons/avatar-icon.tsx, icons/document-scan-icon.tsx, icons/grid-loader-icon.tsx, icons/hammer-icon.tsx, icons/tag-icon.tsx, icons/upload-icon.tsx
Six new forwardRef components with motion-driven animations triggered on hover and via imperative ref methods (startAnimation/stopAnimation). Each renders a unique SVG icon with customizable size, color, and strokeWidth props.
Shared Type Definitions
icons/types.ts
Exports AnimatedIconProps and AnimatedIconHandle interfaces defining the standard props and imperative API surface for all animated icons.
Icon Registry and Exports
icons/index.ts, lib/icons.ts
Updated to import and export the six new icons in ICON_LIST and ICONS array respectively, with associated keyword metadata for searchability.
Registry Manifests
registry.json, public/r/registry.json, public/r/avatar-icon.json, public/r/document-scan-icon.json, public/r/grid-loader-icon.json, public/r/hammer-icon.json, public/r/tag-icon.json, public/r/upload-icon.json
Registry entries and manifest files declaring the six new UI components with motion dependency and associated file paths.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant Icon as Animated Icon<br/>(forwardRef)
    participant Motion as motion/react<br/>(useAnimate)
    
    User->>Icon: Hover over icon
    Icon->>Icon: onHoverStart triggered
    Icon->>Motion: startAnimation()
    Motion->>Motion: Execute animation sequence<br/>(e.g., scale, rotate, translate)
    User->>Icon: Hover away
    Icon->>Icon: onHoverEnd triggered
    Icon->>Motion: stopAnimation()
    Motion->>Motion: Reset to initial state
    
    alt Imperative Control
        User->>Icon: ref.startAnimation()
        Icon->>Motion: startAnimation()
        Motion->>Motion: Execute animation
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 Six new icons dance and sway,
With motion smooth in every way,
Avatar bobs and hammers swing,
While scanners scan and uploads ping,
Loaders grid and tags spin true—
Animation magic, fresh and new! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'feat: add-new-icons' is vague and generic, using a non-descriptive phrase that doesn't convey the specific nature or scope of the six new animated icons being added. Consider a more descriptive title like 'feat: add six animated icons (avatar, upload, grid-loader, document-scan, tag, hammer)' to better communicate the specific icons and key pattern being introduced.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
  • 📝 Generate docstrings

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.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Jan 14, 2026

Greptile Summary

This PR adds 6 new animated icons following the project's established patterns. All icons implement forwardRef with AnimatedIconHandle, use motion/react for animations, and are properly registered in both icon lists and registry files for shadcn CLI integration.

Key changes:

  • avatar-icon: user profile with head bounce
  • upload-icon: arrow with repositioning effect
  • grid-loader-icon: 4-dot grid with sequential pulse (critical bug: infinite animation won't stop)
  • document-scan-icon: scanning line with corner brackets
  • tag-icon: swing rotation around hole
  • hammer-icon: hammer swing with repeat

Critical issue: grid-loader-icon uses repeat: Infinity but doesn't track animation controls with useRef, meaning the animation will continue running even after stopAnimation() is called. This breaks the stop functionality and differs from the pattern used in other icons with infinite animations (accessibility-icon, globe-icon, etc.).

Confidence Score: 2/5

  • PR has critical animation bug in grid-loader that breaks stop functionality
  • 5 of 6 icons are correctly implemented, but grid-loader-icon has a logical error where infinite animation won't stop properly. This will cause the animation to continue running indefinitely after hover ends, degrading UX and potentially impacting performance. The bug is straightforward to fix by adding useRef tracking like other infinite-animation icons.
  • icons/grid-loader-icon.tsx and public/r/grid-loader-icon.json require fixes for animation control tracking

Important Files Changed

Filename Overview
icons/avatar-icon.tsx added new avatar icon with head bounce animation - implementation is clean
icons/upload-icon.tsx added upload icon with arrow repositioning effect - animation works correctly
icons/grid-loader-icon.tsx added grid loader with pulse animation - infinite animation won't stop properly without useRef tracking
icons/document-scan-icon.tsx added document scan icon with scanning line animation - implementation follows patterns
icons/tag-icon.tsx added price tag icon with swing rotation - animation origin correctly set to tag hole
icons/hammer-icon.tsx added hammer icon with swing animation - implementation is correct with proper repeat count
public/r/grid-loader-icon.json registry file reflects buggy implementation with missing useRef

Sequence Diagram

sequenceDiagram
    participant User
    participant IconGallery
    participant GridLoaderIcon
    participant MotionAnimate
    
    User->>IconGallery: hover over grid-loader-icon
    IconGallery->>GridLoaderIcon: onHoverStart()
    GridLoaderIcon->>GridLoaderIcon: start()
    GridLoaderIcon->>MotionAnimate: animate(".grid-dot", {...}, {repeat: Infinity})
    Note over MotionAnimate: Animation continues infinitely
    MotionAnimate-->>GridLoaderIcon: returns AnimationControls (not stored!)
    
    User->>IconGallery: hover ends
    IconGallery->>GridLoaderIcon: onHoverEnd()
    GridLoaderIcon->>GridLoaderIcon: stop()
    GridLoaderIcon->>MotionAnimate: animate(".grid-dot", {r: 3, opacity: 1})
    Note over MotionAnimate: New animation starts but infinite animation still running
    Note over GridLoaderIcon,MotionAnimate: BUG: Infinite animation never stopped!
    
    rect rgb(220, 240, 220)
        Note over GridLoaderIcon: FIXED VERSION with useRef
        GridLoaderIcon->>GridLoaderIcon: animationControls.current.forEach(c => c.stop())
        GridLoaderIcon->>MotionAnimate: stop infinite animation
        Note over MotionAnimate: Infinite animation properly cancelled
    end
Loading

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

18 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

Comment on lines +12 to +26
const start = async () => {
animate(
".grid-dot",
{
r: [3, 0, 3],
opacity: [1, 0, 1],
},
{
duration: 1.5,
repeat: Infinity,
ease: "easeInOut",
delay: (i) => i * 0.2,
},
);
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

logic: infinite animation won't stop properly - needs useRef to track controls

Suggested change
const start = async () => {
animate(
".grid-dot",
{
r: [3, 0, 3],
opacity: [1, 0, 1],
},
{
duration: 1.5,
repeat: Infinity,
ease: "easeInOut",
delay: (i) => i * 0.2,
},
);
};
const [scope, animate] = useAnimate();
const animationControls = useRef<Array<ReturnType<typeof animate>>>([]);
const start = async () => {
animationControls.current.forEach((control) => control.stop());
animationControls.current = [];
animationControls.current.push(
animate(
".grid-dot",
{
r: [3, 0, 3],
opacity: [1, 0, 1],
},
{
duration: 1.5,
repeat: Infinity,
ease: "easeInOut",
delay: (i) => i * 0.2,
},
),
);
Prompt To Fix With AI
This is a comment left during a code review.
Path: icons/grid-loader-icon.tsx
Line: 12:26

Comment:
**logic:** infinite animation won't stop properly - needs `useRef` to track controls

```suggestion
    const [scope, animate] = useAnimate();
    const animationControls = useRef<Array<ReturnType<typeof animate>>>([]);

    const start = async () => {
      animationControls.current.forEach((control) => control.stop());
      animationControls.current = [];

      animationControls.current.push(
        animate(
          ".grid-dot",
          {
            r: [3, 0, 3],
            opacity: [1, 0, 1],
          },
          {
            duration: 1.5,
            repeat: Infinity,
            ease: "easeInOut",
            delay: (i) => i * 0.2,
          },
        ),
      );
```

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines +28 to +33
const stop = () => {
animate(
".grid-dot",
{ r: 3, opacity: 1 },
{ duration: 0.3, ease: "easeOut" },
);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

logic: stop won't cancel infinite animation - need to stop tracked controls first

Suggested change
const stop = () => {
animate(
".grid-dot",
{ r: 3, opacity: 1 },
{ duration: 0.3, ease: "easeOut" },
);
const stop = () => {
animationControls.current.forEach((control) => control.stop());
animationControls.current = [];
animate(
".grid-dot",
{ r: 3, opacity: 1 },
{ duration: 0.3, ease: "easeOut" },
);
Prompt To Fix With AI
This is a comment left during a code review.
Path: icons/grid-loader-icon.tsx
Line: 28:33

Comment:
**logic:** stop won't cancel infinite animation - need to stop tracked controls first

```suggestion
    const stop = () => {
      animationControls.current.forEach((control) => control.stop());
      animationControls.current = [];

      animate(
        ".grid-dot",
        { r: 3, opacity: 1 },
        { duration: 0.3, ease: "easeOut" },
      );
```

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines +1 to +2
import { forwardRef, useImperativeHandle } from "react";
import type { AnimatedIconHandle, AnimatedIconProps } from "./types";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

syntax: missing useRef import needed for animation control tracking

Suggested change
import { forwardRef, useImperativeHandle } from "react";
import type { AnimatedIconHandle, AnimatedIconProps } from "./types";
import { forwardRef, useImperativeHandle, useRef } from "react";
import type { AnimatedIconHandle, AnimatedIconProps } from "./types";
Prompt To Fix With AI
This is a comment left during a code review.
Path: icons/grid-loader-icon.tsx
Line: 1:2

Comment:
**syntax:** missing `useRef` import needed for animation control tracking

```suggestion
import { forwardRef, useImperativeHandle, useRef } from "react";
import type { AnimatedIconHandle, AnimatedIconProps } from "./types";
```

How can I resolve this? If you propose a fix, please make it concise.

@Priyank-Lal Priyank-Lal changed the title Feature/Add-new-icons feat: Add-new-icons Jan 14, 2026
@Priyank-Lal Priyank-Lal changed the title feat: Add-new-icons feat: add-new-icons Jan 14, 2026
@Abhijit-Jha
Copy link
Copy Markdown
Member

please add videos.

@Priyank-Lal
Copy link
Copy Markdown
Author

please add videos.

okay so i have added videos in the PR description, you can review it

@Abhijit-Jha
Copy link
Copy Markdown
Member

LGTM. Please resolve the merge conflicts.

@Priyank-Lal
Copy link
Copy Markdown
Author

LGTM. Please resolve the merge conflicts.

Okay it seems to be fixed now, no merge conflicts

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