Skip to content

Conversation

@siarheirazuvalau
Copy link
Contributor

@siarheirazuvalau siarheirazuvalau commented Oct 28, 2025

Changes

  • Added: New icons (Configuration, GroupBy, PinFilled, PinOutline)
  • Enhanced: Icons gallery in Storybook
    • Icons now displayed in organized grid layout
    • Added click-to-copy functionality for icon names
    • Automatic inclusion of new icons

Visuals

image

Summary by CodeRabbit

  • New Features

    • Interactive icon grid with responsive layout, hover/active feedback, and visible icon labels.
    • Click-to-copy icon-name with slide-in confirmation notification.
    • Four new icons: Configuration, GroupBy, Pin Filled, Pin Outline.
  • Accessibility

    • Keyboard support (Enter/Space) and ARIA attributes for interactive icon items.

@coderabbitai
Copy link

coderabbitai bot commented Oct 28, 2025

Walkthrough

Adds a new SCSS module for an interactive icon grid, refactors the icon stories to dynamically render all icons with click/keyboard-to-copy behavior and a brief copy notification, and exports four additional SVG icon components from the icons index.

Changes

Cohort / File(s) Summary
Icon Grid Styling
src/components/icons/icons.stories.module.scss
New SCSS module providing responsive grid layout (grid), item styles (icon-item), name label (icon-name), and a slide-in copy-notification.
Icon Stories Refactor
src/components/icons/icons.stories.tsx
Replaces static imports with wildcard icons import, renders icons via Object.entries(icons), adds click/keyboard handlers to copy icon name to clipboard, shows temporary notification, and renames exported story IconsIconsGrid.
Icon Exports Added
src/components/icons/index.ts
Adds exports for ConfigurationIcon, GroupByIcon, PinFilledIcon, and PinOutlineIcon from corresponding SVG files.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Grid as IconsGridComponent
    participant Clipboard as Clipboard API

    User->>Grid: Click or press Enter/Space on icon button
    activate Grid
    Grid->>Clipboard: navigator.clipboard.writeText(iconName)
    activate Clipboard
    Clipboard-->>Grid: Promise resolves (success)
    deactivate Clipboard
    Grid->>Grid: setCopiedName(iconName) & show copy-notification
    Grid-->>User: Visual feedback (notification + label)
    deactivate Grid
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Review focus areas:
    • Confirm the four referenced SVG files exist and export correctly.
    • Accessibility: role/button semantics, ARIA attributes, keyboard event handling.
    • Clipboard API error handling and timing of notification state reset.
    • SCSS class names for collisions and responsiveness across viewports.

Possibly related PRs

Suggested reviewers

  • AmsterGet
  • maria-hambardzumian
  • BlazarQSO

Poem

🐰 I stitched a grid of icons bright and small,
Tap a bunny-paw and names will fall,
A tiny slide, a sparkling beep,
Clipboard nibs the label to keep,
Hop, click, and share them one and all 🥕✨

Pre-merge checks and finishing touches

❌ 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%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "EPMRPP-108273 || Add new icons: Configuration, GroupBy, PinFilled, PinOutline" is clear, specific, and directly related to the changeset. It accurately describes the primary deliverable of the PR—the addition of four new icon exports to the index file. While the PR also includes significant enhancements to the icons gallery UI (new SCSS styling and interactive features in the stories file), these are supporting infrastructure for showcasing the new icons rather than the main objective. The title does not cover every detail, which aligns with the expectation that titles can focus on the key change without capturing all supporting work.
✨ 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 feature/EPMRPP-108273-add-new-icons

📜 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 00e79a1 and 934c6be.

📒 Files selected for processing (2)
  • src/components/icons/icons.stories.module.scss (1 hunks)
  • src/components/icons/icons.stories.tsx (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/components/icons/icons.stories.module.scss
  • src/components/icons/icons.stories.tsx

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

@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: 1

🧹 Nitpick comments (2)
src/components/icons/icons.stories.tsx (2)

22-24: Consider adding error handling and user feedback.

The clipboard operation can fail silently in some contexts. Consider adding a try-catch block and visual feedback (e.g., a toast notification) to inform users whether the copy succeeded.

Example implementation:

 const handleCopyName = (name: string) => {
-  navigator.clipboard.writeText(name);
+  navigator.clipboard.writeText(name)
+    .then(() => {
+      // Could add toast notification: "Copied!"
+    })
+    .catch((err) => {
+      console.error('Failed to copy:', err);
+    });
 };

28-28: Consider improving type safety for icon components.

The Object.entries(icons) approach types Icon as any, which loses type safety. Consider adding a type assertion or helper to ensure all values are valid React components.

Example with type assertion:

{Object.entries(icons).map(([name, Icon]) => {
  const IconComponent = Icon as React.ComponentType;
  return (
    <div
      key={name}
      className={styles['icon-item']}
      onClick={() => handleCopyName(name)}
      title={`Click to copy: ${name}`}
    >
      <BaseIconButton>
        <IconComponent />
      </BaseIconButton>
      <div className={styles['icon-name']}>{name}</div>
    </div>
  );
})}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3d427b8 and 00e79a1.

⛔ Files ignored due to path filters (4)
  • src/components/icons/svg/configuration.svg is excluded by !**/*.svg
  • src/components/icons/svg/groupBy.svg is excluded by !**/*.svg
  • src/components/icons/svg/pinFilled.svg is excluded by !**/*.svg
  • src/components/icons/svg/pinOutline.svg is excluded by !**/*.svg
📒 Files selected for processing (3)
  • src/components/icons/icons.stories.module.scss (1 hunks)
  • src/components/icons/icons.stories.tsx (2 hunks)
  • src/components/icons/index.ts (3 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
src/components/icons/icons.stories.tsx (1)
src/components/baseIconButton/baseIconButton.tsx (1)
  • BaseIconButton (15-31)
🔇 Additional comments (5)
src/components/icons/index.ts (1)

16-16: LGTM! New icon exports are properly integrated.

The four new icon exports (ConfigurationIcon, GroupByIcon, PinFilledIcon, PinOutlineIcon) follow the established pattern and maintain alphabetical ordering.

Also applies to: 33-33, 44-45

src/components/icons/icons.stories.module.scss (3)

17-23: LGTM! Grid layout is well-designed.

The responsive grid with auto-fill and minmax provides a flexible layout that adapts to the dynamic icon count.


25-45: LGTM! Interactive styling enhances UX.

The hover and active states with smooth transitions provide good visual feedback for the click-to-copy interaction.


47-57: LGTM! Text styling is appropriate.

The use of user-select: text allows manual copying of icon names, and the ellipsis handling prevents layout issues with longer names.

src/components/icons/icons.stories.tsx (1)

4-5: LGTM! Wildcard import enables automatic icon inclusion.

Using import * as icons automatically includes newly added icons in the gallery without requiring manual updates to the stories file.

@siarheirazuvalau siarheirazuvalau merged commit 1d9005a into develop Oct 28, 2025
2 checks passed
@siarheirazuvalau siarheirazuvalau deleted the feature/EPMRPP-108273-add-new-icons branch October 28, 2025 12:28
github-actions bot pushed a commit that referenced this pull request Oct 28, 2025
…nOutline (#152)

* EPMRPP-108273 || add new icons:: Configuration, GroupBy, PinFilled, PinOutline
* EPMRPP-108273 || improved accessibility: added visual confirmation for copying the icon name 1d9005a
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