Skip to content

feat(search): one home search bar (go-to, text search, authors, books) - #626

Merged
kdroidFilter merged 14 commits into
devfrom
feat/search-unified-bar
Oct 9, 2026
Merged

kdroidFilter merged 14 commits into
devfrom
feat/search-unified-bar

Conversation

@kdroidFilter

Copy link
Copy Markdown
Owner

What

The home search bar no longer switches between book and text modes. It suggests what the input may be, in this order:

  • go-to rows for typed references (חולין יב, שו״ע יו״ד בשר וחלב), from feat(search): open typed references (חולין יב, בראשית נח, שו״ע יו״ד בשר בחלב) #625;
  • חיפוש במאגר: …, the full-text search (typed text in bold). With no reference it comes first, so Enter searches the text as before; with one, Enter opens it. Ctrl+Enter always searches the text;
  • authors from the lookup index (name + aliases: רעק"א, ראב"ע, חפץ חיים), most books first. Picking one puts a chip and lists their books, filtered by what is typed next; Backspace on the empty field or ✕ drops it;
  • books, as before (Tab/Enter picks one, then its TOC; the last row there is חיפוש בתוך <book>: …, replacing the second "search in" bar).

Rows lead with an icon: bookmark (place), open book, magnifier (text search), writing hand (author, Emoji One monotone, CC BY 4.0, credited in the icon file and on the About page), folder.

Author names are shown with an honorific (AuthorNames.display): acronyms (quote in the first word) and names already titled stay, others get הרב; catalog-order names are put back in order; nikud and bidi marks dropped. The database keeps the upstream names.

Keyboard: arrows move the selection on key press (repeating while held) and no longer move the caret.

Removed

SearchFilter and its switch (IntegratedSwitch, FilterButton, the Alt shortcut), the second scope bar (ReferenceByCategorySection), the text-mode field and their strings.

Notes

Verification

./gradlew :SeforimApp:ktlintCheck :icons:ktlintCheck :SeforimApp:jvmTest --tests '*search*' --tests '*Search*'; author lookup and author books probed on a locally generated DB; tried in the running app by the maintainer.

The home bar no longer switches between book and text modes: it always
suggests what the input may be, and a "חיפוש «…» בטקסט" row (after the
go-to rows, before the books) runs the full-text search. With no
reference typed that row comes first, so Enter searches the text as
before; with one, Enter opens it. Ctrl+Enter always searches the text.
Once a book is picked, the row searches inside it ("חיפוש «…» בתוך
<book>"), after the TOC entries. The "all books" chip stays on the bar.
An alternative-TOC entry scopes a text search to its whole book.

Signed-off-by: Elie Gambache <elyahou.hadass@gmail.com>
With the text search offered as a row of the one bar, the mode is dead:
remove SearchFilter and its switch (IntegratedSwitch, FilterButton, the
Alt shortcut that toggled it), the second "search in" bar
(ReferenceByCategorySection) that the book chip now covers, the text-mode
field and focus plumbing, and the strings they used. The placeholder
now alternates reference and text examples, and the search icon runs the
text search.

Signed-off-by: Elie Gambache <elyahou.hadass@gmail.com>
Signed-off-by: Elie Gambache <elyahou.hadass@gmail.com>
Each row of the home search suggestions now leads with what it opens: a
bookmark for a place (go-to rows and TOC entries), an open book for a
book, the magnifier for the text search, a folder for a category.

Signed-off-by: Elie Gambache <elyahou.hadass@gmail.com>
Signed-off-by: Elie Gambache <elyahou.hadass@gmail.com>
Signed-off-by: Elie Gambache <elyahou.hadass@gmail.com>
The list moved on the arrows' KeyUp while their KeyDown reached the
single-line field, which sent the caret to the start (up) or the end
(down). Consume the KeyDown while the list is open.

Signed-off-by: Elie Gambache <elyahou.hadass@gmail.com>
The selection moved when the arrow was released, so holding it did
nothing and each step lagged the key. Like Chrome's omnibox, move on
KeyDown (key repeat included) and swallow both events while the list is
open.

Signed-off-by: Elie Gambache <elyahou.hadass@gmail.com>
The lookup index's author docs (name + aliases, by number of books) are
offered after the text-search row: רעק, רעק"א, ראב"ע, חפץ חיים... Picking
an author puts their name in a chip and lists their books, filtered by
what is typed next (quotes and nikud ignored); a book picked from there
goes on to its TOC as usual, Backspace on the empty field or the chip's
✕ drops the author. With an index built before authors were indexed,
no author is offered.

Signed-off-by: Elie Gambache <elyahou.hadass@gmail.com>
AuthorNames.display, used by the author rows and chip: acronyms (a quote
in the first word: רמב"ם, מהר"ם פדובה) and names already carrying a title
(רבי, רב, חכם...) stay as they are, every other name gets הרב. Catalog
names (ליבשיץ, יחזקאל) are put back in reading order; nikud, bidi marks
and extra spaces are dropped. The database keeps the upstream names
untouched: the honorific is display only.

Signed-off-by: Elie Gambache <elyahou.hadass@gmail.com>
Signed-off-by: Elie Gambache <elyahou.hadass@gmail.com>
Add Material Symbols' history_edu (a quill on a scroll, Apache 2.0) to
the icons and use it instead of the fountain pen.

Signed-off-by: Elie Gambache <elyahou.hadass@gmail.com>
Emoji One's monotone writing hand (CC BY 4.0, credited in the icon file)
replaces the history_edu quill, removed.

Signed-off-by: Elie Gambache <elyahou.hadass@gmail.com>
Signed-off-by: Elie Gambache <elyahou.hadass@gmail.com>
@kdroidFilter
kdroidFilter merged commit ca2309e into dev Oct 9, 2026
2 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 9, 2026
@kdroidFilter
kdroidFilter deleted the feat/search-unified-bar branch October 9, 2026 07:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant