Skip to content

fix(search): use lucide-react icons in SearchBar instead of unicode glyphs - #656

Merged
nonsobethel0-dev merged 2 commits into
Parashield-Protocol:mainfrom
laurastephaniee:fix/651-searchbar-lucide-icon
Sep 24, 2026
Merged

nonsobethel0-dev merged 2 commits into
Parashield-Protocol:mainfrom
laurastephaniee:fix/651-searchbar-lucide-icon

Conversation

@laurastephaniee

@laurastephaniee laurastephaniee commented Sep 24, 2026 •

Copy link
Copy Markdown

Problem

SearchBar drew its search icon with a unicode 🔍 emoji inside a <span>. Everywhere else, the app uses lucide-react icons (NavBar: Menu/X, Breadcrumb: ChevronRight, Toast: X). The emoji:

  • looks different on each OS and font (colourful on Apple, flat on Android/Windows) and ignores the text-gray-400 colour;
  • doesn't match the rest of the UI's stroke icons;
  • was announced by some screen readers as "magnifying glass tilted left".

The clear button had the same problem with a unicode ✕.

Changes

Commit 1: search icon (src/components/SearchBar.tsx)

  • Imports Search from lucide-react and replaces the emoji <span>.
  • size={16}, with the same positioning classes as before (absolute left-3 top-1/2 -translate-y-1/2, pointer-events-none), so it sits in the same place inside the existing pl-9 input padding.
  • aria-hidden="true": it's decorative, and the input's placeholder describes the field.

Commit 2: clear icon + tests

  • The clear button's ✕ is replaced with lucide X (size={14}, same as Toast), and aria-label="Clear search" is kept. The now-unused text-xs class is removed from the button.
  • src/__tests__/SearchBar.test.tsx:
    • new test: the markup contains the lucide Search SVG (lucide-search), marked aria-hidden, and no 🔍;
    • the existing clear-button test also checks that the button renders a lucide X SVG and no ✕ glyph.

No new dependency: lucide-react is already in package.json.

Verification

Replace the unicode magnifying-glass emoji with lucide-react's Search
icon, matching the icon set used by NavBar, Breadcrumb and Toast. The
icon is aria-hidden since the input's placeholder already labels it.
Swap the unicode ✕ clear glyph for lucide-react's X (same as Toast),
keeping the aria-label. Add tests asserting the Search and X icons
render as lucide SVGs and the emoji/glyph are gone.
@drips-wave

drips-wave Bot commented Sep 24, 2026

Copy link
Copy Markdown

@laurastephaniee Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@netlify

netlify Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for boisterous-sunshine-dd4c4c failed.

Name Link
🔨 Latest commit 90cc507
🔍 Latest deploy log https://app.netlify.com/projects/boisterous-sunshine-dd4c4c/deploys/6ab513d7e9f5f80008da0ff0

@nonsobethel0-dev
nonsobethel0-dev merged commit 07479d8 into Parashield-Protocol:main Sep 24, 2026
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants