VedaWebProject / Tekst

A collaborative research platform for aligning, enriching and exploring resources on natural language texts
https://vedawebproject.github.io/Tekst/
GNU Affero General Public License v3.0
7 stars 0 forks source link

A new concept for the Quick Search #298

Closed bkis closed 1 month ago

bkis commented 1 month ago

New requirements:

  1. Quick search should preferably be accessible without any extra click action right in the page header (just like in VedaWeb 1.0)
  2. Quick search should have the extra functionality of jumping to a certain location when the user enters the respective location label/identifier (just like in VedaWeb 1.0)

The plan to achieve that currently looks as follows:

  1. The Location model gets an additional field aliases: list[str] | None (indexed!) that can contain a list of arbitrary strings tagging the location with certain subject-specific identifiers.
  2. The "text structure" UI must offer a way to manage these.
  3. The Quick Search, when used with a query q, behaves as follows:
    • query a new endpoint /search/location (or similar) to get a list of location objects (within the current text!) where q matches one of their aliases (return at most 10 results!)
    • if there's only one match, jump right to this location
    • if there are multiple matches, show a modal asking "Do you want to jump to one of these locations?" – the user clicks on one location (jump!) or clicks a "No, this was meant to be a search request!" button (quick search is performed)
    • if there is no match, the usual quick search is performed outright
  4. Instead of the button of the QuickSearchWidget, the header should somehow accommodate the quick search input field plus (a) a button to open the settings modal and (b) a help button documenting the functionality (or maybe there's some better way for this UI...)
bkis commented 1 month ago

Also: Instead of selecting the text to search in the quick search settings, we could select the specific resources to search (like in VW1.0)

Relevant #286