Skip to content

[Web] Open user search as a navbar popover so the map stays visible (refactor /search/users) #633

Description

@mustafa-5493

📝 Description

The navbar search icon at Navbar.jsx:153 is a <Link to="/search/users"> that navigates to the full-page UserSearchPage. The map unmounts, the new page paints bg-background.

The notification button right next to it already uses the popover-from-navbar pattern (NotificationDropdown). User search should follow the same pattern on desktop so the map stays visible and the two icons feel consistent.

Scope:

  • Extract UserSearchPage's body (input + results list + pagination + states) into a reusable <UserSearchPanel> component.
  • New UserSearchDropdown mirrors NotificationDropdown: absolute popover anchored under the navbar icon, outside-click + Escape to close.
  • Desktop (sm: and up): navbar icon toggles the dropdown.
  • Mobile: keep the existing <Link to="/search/users"> so the panel takes the full screen , a popover would be cramped. (NotificationDropdown does the same fallback.)
  • Keep the /search/users route mounted with <UserSearchPanel> inside so direct URLs / shares still work.

Out of scope:

  • Search algorithm / endpoint changes.
  • i18n additions beyond what the existing UserSearchPage already covers.

📊 Type

Refactor / UX polish

✅ Acceptance Criteria

  • Desktop: clicking the navbar search icon opens a popover under the icon; map stays visible behind
  • Popover closes on outside click, Escape, and on selecting a result
  • Clicking a result still navigates to /profile/<id>
  • Mobile: clicking the icon still routes to /search/users (full-page fallback)
  • /search/users URL keeps working for deep-links and renders the same panel
  • No regression , existing UserSearchPage tests still pass

🧪 Test

  • Desktop: click search → popover opens, map visible behind, type a query, click a result → lands on the profile
  • Desktop: click outside / press Escape → popover closes
  • Mobile (< sm): click search → routes to /search/users as before
  • Visit /search/users directly → renders the same panel

⏱️ Review Time

~5 min

Metadata

Metadata

Assignees

Labels

Type

Fields

No fields configured for Task.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions