Repository navigation
feat(search): one home search bar (go-to, text search, authors, books) - #626
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The home search bar no longer switches between book and text modes. It suggests what the input may be, in this order:
חולין יב,שו״ע יו״ד בשר וחלב), 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;רעק"א,ראב"ע,חפץ חיים), 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;חיפוש בתוך <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
SearchFilterand 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.