refactor: consolidate SearchSvg icon component into centralized pattern - #2358
MamtaKumari2006 wants to merge 5 commits into
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Unresolved build, lint, snapshot, dependency, and consolidation issues remain.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (4)
What changed in this PR
This PR begins centralizing SVG icon rendering and updates site build/editor configuration.
Changes:
- Adds a shared search icon registry and renderer.
- Updates the legacy
SearchSvgwrapper. - Adjusts site scripts and VS Code JSON formatting.
| File | Summary |
|---|---|
site/package.json |
Updates site build and start scripts. |
packages/web/src/components/shared/SearchSvg.js |
Delegates search icon rendering. |
packages/web/src/components/shared/Icons.js |
Adds centralized icon rendering infrastructure. |
.vscode/settings.json |
Configures JSON formatting. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| SearchSvg.propTypes = { | ||
| style: types.style, | ||
| }; | ||
| import { SearchSvg } from './icons'; |
| export const ICONS_PATHS = { | ||
| search: `M6.02945,10.20327a4.17382,4.17382,0,1,1,4.17382-4.17382A4.15609,4.15609, | ||
| 0,0,1,6.02945,10.20327Zm9.69195,4.2199L10.8989,9.59979A5.88021,5.88021, | ||
| 0,0,0,12.058,6.02856,6.00467,6.00467,0,1,0,9.59979,10.8989l4.82338, | ||
| 4.82338a.89729.89729,0,0,0,1.29912,0,.89749.89749,0,0,0-.00087-1.29909Z`, |
| <svg | ||
| alt={name} | ||
| className={`${name}-icon`} | ||
| height="12" | ||
| width="12" | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| viewBox="0 0 15 15" |
|
Hi @siddharthlatest, I have resolved the casing issue, formatting violations, and successfully updated all snapshot tests locally (yarn test -u). Everything is passing now. Please review and approve the workflow run. Thanks! |
|
@MamtaKumari2006 Thanks for taking this on. The search re-export is the right shape, but #2324 is the whole set of near-duplicate SVG icons, and this branch only moves the search icon. A few unrelated files should come out, and the helper needs to cover the rest of the icons. Thanks for the snapshot update. ReactiveSearch Snapshot Tests / build (22.x) is green (about 3 minutes), and the branch merges cleanly with base. The earlier failure on The remaining red check is Labeler / label. It fails in about 6 seconds on fork PRs because that workflow cannot write labels ( 1. Drop everything that is not the icon change. Remove 2. Replace the search-only helper. 3. Move the duplicate modules in 4. Keep the current DOM shape for the voice icons. Mic, mute, and listen return a fragment with 5. Re-run snapshot tests after that wider move. The green run covers the current search-icon diff. Any further 6. Make the description match the diff. Say that this PR closes #2324 by consolidating those nine modules, and list the files. The current body still narrows the issue to the search icon. |
|
Hi @siddharthlatest, thank you for the detailed review! I'll clean up the unrelated files, consolidate all 9 icon modules into the shared registry, preserve the voice icon DOM structure, and re-run snapshot tests. Will push the updated changes soon. |
|
Hi @siddharthlatest, I have addressed all the feedback points:
The PR is ready for your review. Thanks! |



Proposed Changes
SearchSvgicon component into the centralizedIcons.jsfile using the reusableSvgIconspattern.Closes #2324
Checklist