feat(topbar): GlobalSearch component wired to /api/v1/search (MAPPS-298) #319

Merged
YousifShkara merged 1 commit from feat/MAPPS-298-global-search-client into main 2026-06-23 07:31:58 +02:00
Owner

A new GlobalSearch component lands in the TopBar between the page title and the action chips on lg+ viewports (hidden below, where the title takes the row). Each keystroke (two-char minimum to keep the dropdown out of single-letter noise) fetches GET /search?q=... and renders a grouped dropdown of the top matches across tickets / contacts / companies / assets / projects. Selecting a row clears the input, closes the dropdown, and navigates to the entity's detail page via the router.

Result rendering:

  • Each section heading shows the entity name + a 5/47 count hint when the per-section cap (5 server-side) clipped the result set, so the user knows there are more matches to refine for.
  • Empty sections collapse silently; only sections with hits render their heading + rows.
  • A row's primary line is the server's label (ticket number + title, company name, etc.); the small grey secondary line is the server's secondary field (company name on a ticket / contact / asset row, industry on a company row).
  • Click-outside backdrop closes the dropdown; the same pattern CompanyPicker / ContactPicker use.

Server-side companion PR on mokosh-server (feat/MAPPS-298-global-search-endpoint) provides the /api/v1/search endpoint this component consumes. Both must merge for the feature to land.

#MAPPS-298

A new `GlobalSearch` component lands in the TopBar between the page title and the action chips on lg+ viewports (hidden below, where the title takes the row). Each keystroke (two-char minimum to keep the dropdown out of single-letter noise) fetches `GET /search?q=...` and renders a grouped dropdown of the top matches across tickets / contacts / companies / assets / projects. Selecting a row clears the input, closes the dropdown, and navigates to the entity's detail page via the router. Result rendering: - Each section heading shows the entity name + a `5/47` count hint when the per-section cap (5 server-side) clipped the result set, so the user knows there are more matches to refine for. - Empty sections collapse silently; only sections with hits render their heading + rows. - A row's primary line is the server's `label` (ticket number + title, company name, etc.); the small grey secondary line is the server's `secondary` field (company name on a ticket / contact / asset row, industry on a company row). - Click-outside backdrop closes the dropdown; the same pattern CompanyPicker / ContactPicker use. Server-side companion PR on mokosh-server (`feat/MAPPS-298-global-search-endpoint`) provides the `/api/v1/search` endpoint this component consumes. Both must merge for the feature to land. #MAPPS-298
feat(topbar): GlobalSearch component wired to /api/v1/search (MAPPS-298)
All checks were successful
Check / fmt + clippy + tests (pull_request) Successful in 1m25s
Create release / Create release from merged PR (pull_request) Has been skipped
c49701f76d
A new `GlobalSearch` component lands in the TopBar between the page title and the action chips on lg+ viewports (hidden below, where the title takes the row). Each keystroke (two-char minimum to keep the dropdown out of single-letter noise) fetches `GET /search?q=...` and renders a grouped dropdown of the top matches across tickets / contacts / companies / assets / projects. Selecting a row clears the input, closes the dropdown, and navigates to the entity's detail page via the router.

Result rendering:
- Each section heading shows the entity name + a `5/47` count hint when the per-section cap (5 server-side) clipped the result set, so the user knows there are more matches to refine for.
- Empty sections collapse silently; only sections with hits render their heading + rows.
- A row's primary line is the server's `label` (ticket number + title, company name, etc.); the small grey secondary line is the server's `secondary` field (company name on a ticket / contact / asset row, industry on a company row).
- Click-outside backdrop closes the dropdown; the same pattern CompanyPicker / ContactPicker use.

Server-side companion PR on mokosh-server (`feat/MAPPS-298-global-search-endpoint`) provides the `/api/v1/search` endpoint this component consumes. Both must merge for the feature to land.

#MAPPS-298
YousifShkara deleted branch feat/MAPPS-298-global-search-client 2026-06-23 07:31:58 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-apps!319
No description provided.