Skip to content

fix(home): refine search pill — smaller, single view icon, distinct icons, sort text fix#78

Merged
p4gs merged 1 commit into
mainfrom
fix/pill-icons-refine
Jun 2, 2026
Merged

fix(home): refine search pill — smaller, single view icon, distinct icons, sort text fix#78
p4gs merged 1 commit into
mainfrom
fix/pill-icons-refine

Conversation

@p4gs

@p4gs p4gs commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Four refinements to the Google-style header search pill (#77):

  1. Smaller — pill height 40px → 36px (input 32px), and a little narrower (reserve margins 185/284 → 215/314).
  2. View toggle shows one icon at a time — hide the active .view-btn on desktop so only the target-view icon shows; clicking it switches the view and the icon swaps (grid ⇄ list). CSS-only; mobile keeps its segmented toggle.
  3. Distinct System Type icon — was the 2×2 grid (identical to the grid-view icon); now a layers icon.
  4. Sort no longer shows stretched 'A-Z' text when selected — the toggle JS wrote 'A-Z'/'Z-A' into childNodes[last], which (after the label was wrapped in a span) is the trailing whitespace text node → it rendered a visible bare "A-Z" and stretched the button. Now it writes into the .filter-label span (hidden on desktop, correct on mobile). The icon stays the default arrows glyph.

Verification (Interceptor, real built site, both themes)

  • Pill 36px tall, 623px wide; header height still 64px.
  • One view icon visible; clicking swaps icon and switches view (icon_swapped: true, view_changed: true).
  • System Type icon = layers (polygon+polyline+polyline), no longer grid rects.
  • Sort click → zero injected bare text nodes; direction stored in hidden .filter-label.
  • System Type dropdown still opens (308px).

Build verified (exit 0). Files: style.css + index.html.

- Shorter pill: height 40px->36px, input 32px; narrower (margins 215/314).
- View toggle shows ONE icon at a time: hide the active .view-btn on desktop
  so only the target-view icon shows; clicking it switches the view and the
  icon swaps to the other (grid <-> list).
- System Type icon changed from the 2x2 grid (clashed with grid-view icon)
  to a distinct 'layers' icon.
- Sort icon no longer injects an 'A-Z'/'Z-A' bare text node when toggled:
  the JS now writes the direction into the .filter-label span (hidden on
  desktop, shown on mobile) instead of childNodes[last] (a whitespace node
  after the span), which had been rendering visible text and stretching the
  button. Icon stays the default arrows glyph (flips for direction).

Verified via Interceptor (real built site, both themes): pill 36x623; one
view icon visible; toggle swaps icon + view; System Type icon = layers;
sort click injects no bare text; dropdowns still open; header height 64px.
@p4gs p4gs merged commit c3d0be5 into main Jun 2, 2026
5 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

Development

Successfully merging this pull request may close these issues.

1 participant