Skip to content

Conversation

@anmolsinghbhatia
Copy link
Collaborator

@anmolsinghbhatia anmolsinghbhatia commented Oct 24, 2025

Description

This PR includes attachment icon revamp.

Type of Change

  • Improvement

Summary by CodeRabbit

  • New Features
    • Added five new attachment file icons: audio, code, document, image, and video for clearer file-type visualization.
    • Icons support customizable colors and SVG styling for flexible design integration.
    • Introduced a standardized icon wrapper to ensure consistent sizing, viewBox, and optional clipping across icons.
    • All attachment icons are consolidated in a dedicated module for easier access.

@anmolsinghbhatia anmolsinghbhatia self-assigned this Oct 24, 2025
@makeplane
Copy link

makeplane bot commented Oct 24, 2025

Linked to Plane Work Item(s)

This comment was auto-generated by Plane

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 24, 2025

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

Adds five new file-attachment SVG icon components (audio, code, document, image, video) and an IconWrapper SVG container; introduces an attachments index exporting the icons and re-exports attachments from the icons index.

Changes

Cohort / File(s) Summary
Attachment File Icon Components
packages/propel/src/icons/attachments/audio-file-icon.tsx, packages/propel/src/icons/attachments/code-file-icon.tsx, packages/propel/src/icons/attachments/document-file-icon.tsx, packages/propel/src/icons/attachments/image-file-icon.tsx, packages/propel/src/icons/attachments/video-file-icon.tsx
New React.FC icon components. Each accepts color (default "currentColor"), forwards ...rest to IconWrapper, and renders an SVG path using the provided color.
Icon Infrastructure
packages/propel/src/icons/icon-wrapper.tsx
New IconWrapper component rendering an <svg> with defaults (width, height, viewBox, className), supports children, optional clipPathId, and forwards other SVG attributes.
Public Export Consolidation
packages/propel/src/icons/attachments/index.ts, packages/propel/src/icons/index.ts
New attachments index re-exports the five icon modules; icons/index.ts now re-exports the attachments module to include these icons in the public API.

Sequence Diagram

sequenceDiagram
    autonumber
    participant Consumer
    participant AttachmentIcon
    participant IconWrapper
    participant SVG as "SVG DOM"

    Consumer->>AttachmentIcon: Render (props: color?, clipPathId?, ...rest)
    AttachmentIcon->>IconWrapper: Provide props + <path/> children
    IconWrapper->>IconWrapper: Apply defaults (width,height,viewBox,className)
    alt clipPathId provided
        IconWrapper->>SVG: Render <defs><clipPath id=.../></defs> and <g clip-path="url(#...)">children</g>
    else no clipPathId
        IconWrapper->>SVG: Render children directly
    end
    SVG-->>Consumer: Painted icon with applied color
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Potential focus areas:

  • Verify each icon's SVG path correctness and intended viewBox/scale.
  • Confirm consistent prop forwarding and default color behavior.
  • Check clipPathId usage and uniqueness requirements when icons are used multiple times.

Poem

🐰 Five little icons prance in a row,
Paths and colors set to glow.
Wrapped in SVG, tidy and bright,
Clip or not — they render right.
Hop on, little assets, take flight! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description Check ❓ Inconclusive The pull request description is vague and lacks sufficient detail to clearly communicate the scope of changes. While it provides the basic template structure with the Description and Type of Change sections filled, the Description section merely states "This PR includes attachment icon revamp" without explaining which specific icons were added, what the revamp entails, or why the change was made. Critical sections like Test Scenarios and References are completely missing, and the description does not provide enough information to help reviewers understand the full scope of the additions (five icon components, IconWrapper, and index restructuring).
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "[WEB-5236] chore: attachment icon revamp" directly and clearly summarizes the main change in the changeset. The raw summary confirms that the PR introduces multiple new attachment icon components (AudioFileIcon, CodeFileIcon, DocumentFileIcon, ImageFileIcon, VideoFileIcon) along with supporting infrastructure like IconWrapper and an index file for re-exports. The title is concise, specific enough to convey the primary change, follows naming conventions with a ticket reference and type prefix, and would allow a teammate scanning history to understand this changeset is focused on attachment icon improvements.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore-attachment-icon-revamp

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9dbff6b and f8fa14c.

📒 Files selected for processing (1)
  • packages/propel/src/icons/attachments/index.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/propel/src/icons/attachments/index.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Build and lint web apps
  • GitHub Check: Analyze (python)

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.

pushya22
pushya22 previously approved these changes Oct 24, 2025
@anmolsinghbhatia anmolsinghbhatia marked this pull request as ready for review October 24, 2025 14:22
Copilot AI review requested due to automatic review settings October 24, 2025 14:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces new attachment icons for different file types, consolidating icon implementation through a reusable wrapper component.

Key Changes

  • Created a new IconWrapper component to standardize SVG icon rendering with consistent props and optional clipping path support
  • Added five new attachment file icons: audio, code, document, image, and video
  • Exported the new attachments module from the main icons index

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/propel/src/icons/index.ts Exports the new attachments module
packages/propel/src/icons/icon-wrapper.tsx New wrapper component providing consistent SVG structure for icons
packages/propel/src/icons/attachments/index.ts Barrel export for all attachment icon components
packages/propel/src/icons/attachments/audio-file-icon.tsx Audio file icon component
packages/propel/src/icons/attachments/code-file-icon.tsx Code file icon component
packages/propel/src/icons/attachments/document-file-icon.tsx Document file icon component
packages/propel/src/icons/attachments/image-file-icon.tsx Image file icon component
packages/propel/src/icons/attachments/video-file-icon.tsx Video file icon component

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/propel/src/icons/icon-wrapper.tsx (1)

33-34: Consider making clipPath dimensions dynamic.

The clipPath rectangle is hardcoded to 16×16, which works for the default viewBox but could cause clipping issues if consumers pass custom width, height, or viewBox props.

If the 16×16 constraint is intentional for your design system, consider documenting it. Otherwise, you could make it dynamic:

 <clipPath id={clipPathId}>
-  <rect width="16" height="16" fill="white" />
+  <rect width={width} height={height} fill="white" />
 </clipPath>
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 68fd246 and 9dbff6b.

📒 Files selected for processing (8)
  • packages/propel/src/icons/attachments/audio-file-icon.tsx (1 hunks)
  • packages/propel/src/icons/attachments/code-file-icon.tsx (1 hunks)
  • packages/propel/src/icons/attachments/document-file-icon.tsx (1 hunks)
  • packages/propel/src/icons/attachments/image-file-icon.tsx (1 hunks)
  • packages/propel/src/icons/attachments/index.ts (1 hunks)
  • packages/propel/src/icons/attachments/video-file-icon.tsx (1 hunks)
  • packages/propel/src/icons/icon-wrapper.tsx (1 hunks)
  • packages/propel/src/icons/index.ts (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (5)
packages/propel/src/icons/attachments/video-file-icon.tsx (1)
packages/propel/src/icons/icon-wrapper.tsx (1)
  • IconWrapper (11-42)
packages/propel/src/icons/attachments/code-file-icon.tsx (1)
packages/propel/src/icons/icon-wrapper.tsx (1)
  • IconWrapper (11-42)
packages/propel/src/icons/attachments/document-file-icon.tsx (1)
packages/propel/src/icons/icon-wrapper.tsx (1)
  • IconWrapper (11-42)
packages/propel/src/icons/attachments/audio-file-icon.tsx (1)
packages/propel/src/icons/icon-wrapper.tsx (1)
  • IconWrapper (11-42)
packages/propel/src/icons/attachments/image-file-icon.tsx (1)
packages/propel/src/icons/icon-wrapper.tsx (1)
  • IconWrapper (11-42)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build and lint web apps
🔇 Additional comments (8)
packages/propel/src/icons/icon-wrapper.tsx (1)

11-42: LGTM! Clean SVG wrapper implementation.

The IconWrapper provides a flexible foundation for all attachment icons with sensible defaults and optional clipPath support.

packages/propel/src/icons/attachments/audio-file-icon.tsx (1)

6-13: LGTM! Consistent icon implementation.

The component follows a clean pattern: accepts optional color prop, forwards props to IconWrapper, and renders the SVG path. The implementation is straightforward and maintainable.

packages/propel/src/icons/attachments/code-file-icon.tsx (1)

6-13: LGTM! Consistent icon implementation.

Follows the same clean pattern as the other attachment icons.

packages/propel/src/icons/attachments/document-file-icon.tsx (1)

6-13: LGTM! Consistent icon implementation.

Follows the established pattern for attachment icons.

packages/propel/src/icons/attachments/image-file-icon.tsx (1)

6-13: LGTM! Consistent icon implementation.

Follows the established pattern for attachment icons.

packages/propel/src/icons/attachments/video-file-icon.tsx (1)

6-13: LGTM! Consistent icon implementation.

Follows the established pattern for attachment icons. The consistent structure across all five attachment icons makes the codebase maintainable and predictable.

packages/propel/src/icons/attachments/index.ts (1)

1-5: LGTM! Clean barrel export.

Consolidates all attachment icons for easy importing. The export structure is clean and follows common patterns.

packages/propel/src/icons/index.ts (1)

8-8: LGTM! Public API extended correctly.

The attachments module is now properly exported and alphabetically positioned in the index.

@pushya22 pushya22 self-requested a review October 27, 2025 14:36
@pushya22 pushya22 merged commit 685e3fa into preview Oct 28, 2025
6 checks passed
@pushya22 pushya22 deleted the chore-attachment-icon-revamp branch October 28, 2025 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants