Skip to content

explorer: slim in-map search overlay — single-line, top-right (Figma 222:456)#224

Open
rdhyee wants to merge 1 commit into
isamplesorg:mainfrom
rdhyee:slim-search-overlay
Open

explorer: slim in-map search overlay — single-line, top-right (Figma 222:456)#224
rdhyee wants to merge 1 commit into
isamplesorg:mainfrom
rdhyee:slim-search-overlay

Conversation

@rdhyee
Copy link
Copy Markdown
Contributor

@rdhyee rdhyee commented May 14, 2026

Summary

Replaces the M-1A multi-row search overlay (~480 px × ~100 px on the upper-left of the map) with a slim single-line treatment in the upper-right, matching Hana's Figma reference at node 222:456 (file Nqkuqh3Z4aqVh0nmwUAgKg).

The earlier overlay was obscuring too much of the map. The new one is ~340 px × ~32 px, a plain input + magnifier-icon button.

What changed

  • .map-search-overlay: flex-direction: row, top: 8px; right: 8px (was left: 50px + column), explicit height: 32px + box-sizing: border-box.
  • New #searchSubmitBtn (inline-SVG magnifier) → calls doSearch(_searchScope), same as Enter.
  • Scope buttons (#searchAreaBtn / #searchWorldBtn) and help paragraph preserved in DOM, hidden via overlay-scoped CSS so handlers still bind; ?search_scope=area URL hydration unaffected (it reads _searchScope directly).
  • 10–15 s first-search warning + Explorer FTS Track 2: search_index_v1 contract doc #169 link → title= tooltip on the input.
  • #searchResults aria-live line lifted out of the overlay as .map-search-results-line, hidden when empty.
  • Sidebar #sampleSearchSidebar (M-1B mirror) untouched.

Responsive: 260 / 160 / 120 px at 600 / 400 px breakpoints so the overlay never overlaps the right-edge Cesium credits column.

Out of scope (separate follow-up PRs)

  • Companion icons (house / globe / help) shown in Figma 222:456 next to the search box.
  • In-map sample-detail card on click — also visible in Figma; today still routes to sidebar #sampleCard only.
  • Sidebar search input removal (Figma shows no sidebar search; mirror still works either way).
  • Cleaning up dead .search-bar CSS rules (orphan after this PR; harmless).

Test plan

  • Overlay sits at top-right of the map; doesn't overlap Cesium toolbar (top-left), zoom controls (bottom-right), or credits.
  • Typing + Enter triggers doSearch(_searchScope).
  • Clicking magnifier triggers the same.
  • Sidebar input still mirrors #sampleSearch (two-way).
  • ?search_scope=area URL still hydrates and routes area-scoped queries.
  • Responsive: at 400 px width, input shrinks but overlay still fits.

Codex review round-0 with one fix applied (overlay height stack-correction).

🤖 Generated with Claude Code

…ght (Figma 222:456)

Replaces the multi-row ~480 px overlay on the upper-left with a slim
single-line treatment in the upper-right of the map, matching Hana's
Figma reference at node 222:456 (file Nqkuqh3Z4aqVh0nmwUAgKg).

Changes:
- `.map-search-overlay` now ~340 px × 32 px, `flex-direction: row`,
  positioned `top: 8px; right: 8px;` (was `left: 50px` and column).
- New `#searchSubmitBtn` (SVG magnifier) calls `doSearch(_searchScope)`,
  same as Enter on `#sampleSearch`.
- Scope buttons (`#searchAreaBtn` / `#searchWorldBtn`) and the help
  paragraph are preserved in the DOM but hidden via overlay-scoped
  CSS (`aria-hidden`, `tabindex=-1`). Existing handlers in
  zoomWatcher still bind. Area-scoped search remains reachable via
  the `?search_scope=area` URL hydration path — that path reads
  `_searchScope` directly and doesn't depend on the hidden buttons.
- The 10-15 s first-search warning + isamplesorg#169 link are moved from a
  visible paragraph to a `title=` tooltip on the input.
- `#searchResults` (aria-live results-count line) becomes a separate
  small floating element under the overlay (`.map-search-results-line`)
  with `:empty { display: none }` so it doesn't add a blank strip.
- Sidebar `#sampleSearchSidebar` (M-1B mirror input) is untouched —
  the two-way mirror still works.

Responsive: input width 260 → 160 → 120 at 600 px / 400 px breakpoints
so the overlay never overlaps the right-edge Cesium credits column.

Codex round-0 sign-off; one fix applied (real overlay height was
~36 px because of padding stack — tightened with `box-sizing:
border-box; height: 32px` and matching child sizes).

Verified locally: `quarto render` produces docs/explorer.html with
the new layout; visual check in Chrome confirms top-right placement.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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