Skip to content

feat!: plain search words, and filters as chips in the search field - #1674

Merged
flipvh merged 2 commits into
mainfrom
feat/search-chips
Oct 31, 2026
Merged

flipvh merged 2 commits into
mainfrom
feat/search-chips

Conversation

@flipvh

@flipvh flipvh commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

The template half of the search rethink. raak already stopped using the removed helpers (cellajs/raak#242).

What changes

  • Search words: a search is plain words that must all match. parse-search-query.ts, containsWord, wordSearchFilter, MatchMode and the mode arguments go, and parseTerms also splits on commas.
  • SearchChipsField: every word and filter is its own chip with its own X. A space, comma, Enter or leaving the field turns the word into a chip. An empty input offers the filters and recent searches; an input with text suggests matches. Backspace brings a keyword back to edit.
  • Table bars: TableBarShell takes searchFilters where it took filters. Members, users, entity grids and docs operations use it, and SelectRole is gone. A list with no filters keeps the plain SearchField.
  • Count: the results count sits inside the field as "4 users". The default total shows beside the field only with nothing on and the field not focused. The field's X replaces the Clear button.
  • Phone: a close X replaces Cancel in the panel. Chips scroll in a row below the field, and a press on a filter lowers the keyboard while the options stay.
  • Stepping: useMatchSteps and the step buttons move to docs/find-steps.tsx, for the OpenAPI find.
  • Recent searches: navigationStore gains recentListSearches for lists with filters. No template list uses it yet: raak and projectcampus do next.

Ships alignment 20261031T1009-search-chips.

Verification

  • pnpm check, pnpm style and pnpm unused are clean, apart from an existing linter info note and pnpm unused's config hints.
  • Unit tests for text-match and recent-searches, the search-filter backend test (browser and database agree), and the table-bar-shell and match-highlight stories pass.
  • Drove the running app in Playwright:
    • Users: role chip, word chips by space and comma, suggestions, Escape, Backspace, chip X, field X, a link with q and role.
    • Other lists: a plain list, and the docs operations filter.
    • OpenAPI find: stepping with Enter.
    • Phone size: panel, chip, options staying open, tap outside, close X reset.
  • Not run: the full backend suite, and a real phone keyboard.

Size

Kind Files Added Removed Net
Source 24 +718 -384 +334
Docs 1 +37 0 +37
JSON 1 +1 -2 -1
Tests 3 +10 -73 -63
Stories 3 +5 -103 -98
Total 32 +771 -562 +209
  • Source: the growth is search-chips-field.tsx (about 410 lines, almost no comments), which replaces raak's and projectcampus's own search fields in the next steps, against the search grammar and role select removed here.
  • Docs: the alignment.

🤖 Generated with Claude Code

flipvh and others added 2 commits October 31, 2026 11:10
A search is now plain words that must all match. The search grammar goes:
parse-search-query.ts, containsWord, wordSearchFilter, MatchMode and the mode
arguments. parseTerms also splits on commas.

SearchChipsField shows every word and filter as a chip with its own X, offers
the filters from a popover, and suggests while typing. TableBarShell takes
searchFilters where it took filters, so members, users, entity grids and docs
operations use it; a list without filters keeps the plain SearchField. The
results count sits in the field, and the close X replaces Cancel on a phone.

useMatchSteps moves to the docs module with the one find that keeps stepping.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A board or feed searches as its main control: the field fills the row, and a
phone's closed row shows it as a field that opens the same panel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@flipvh
flipvh merged commit 210be2d into main Oct 31, 2026
14 checks passed
@flipvh
flipvh deleted the feat/search-chips branch October 31, 2026 10:17
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