Skip to content

new icons#25

Closed
benhalverson wants to merge 1 commit intomainfrom
icons
Closed

new icons#25
benhalverson wants to merge 1 commit intomainfrom
icons

Conversation

@benhalverson
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings October 28, 2025 09:24
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 migrates the icon system from inline SVGs and @heroicons/react to the new magicons icon library. The migration affects icon rendering across search and product pages, consolidating all icon usage through a single Icon component.

Key Changes:

  • Replaced inline SVG implementations with Icon component from @magicons/react
  • Updated icon imports from @heroicons/react to @magicons/react
  • Added magicons packages and vite plugin configuration

Reviewed Changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
vite.config.ts Added magicons vite plugin configuration
package.json Added @magicons dependencies (react, hero-icons, and vite plugin)
src/components/SearchBar.tsx Replaced inline search SVG with Icon component
src/pages/SearchResults.tsx Replaced inline magnifying glass SVG with Icon component
src/pages/Product.tsx Replaced @heroicons/react imports with Icon component for User and ShoppingBag icons
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

import viteReact from '@vitejs/plugin-react';
import { defineConfig } from 'vite';
import { visualizer } from "rollup-plugin-visualizer";
import { magicons } from 'magicons'
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

Missing semicolon at the end of the import statement. Add a semicolon for consistency with other import statements in the file.

Suggested change
import { magicons } from 'magicons'
import { magicons } from 'magicons';

Copilot uses AI. Check for mistakes.
d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
/>
</svg>
<Icon src="@hero-MagnifyingGlass" />
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

The Icon component is missing styling classes that were present in the original SVG (w-16 h-16 mx-auto). This will cause the icon to render at a different size and position than intended.

Suggested change
<Icon src="@hero-MagnifyingGlass" />
<Icon src="@hero-MagnifyingGlass" className="w-16 h-16 mx-auto" />

Copilot uses AI. Check for mistakes.
d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
/>
</svg>
<Icon src="@hero-MagnifyingGlass" />
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

The Icon component is missing the sizing classes (w-5 h-5) that were present on the original SVG element. This will cause the icon to render at an incorrect size.

Suggested change
<Icon src="@hero-MagnifyingGlass" />
<Icon src="@hero-MagnifyingGlass" className="w-5 h-5" />

Copilot uses AI. Check for mistakes.
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.

1 participant

Comments