kuhumcst / glossematics

The life of Louis Hjelmslev.
https://glossematics.dk
4 stars 1 forks source link

Next/prev document button #74

Closed simongray closed 2 years ago

simongray commented 2 years ago

In the document reader, one key functionality is being able to jump from one letter in a correspondence to the next, presumably by pressing a button. Since a correspondence in Glossematics is simply a specialised search result, in practice this feature means jumping from one search result to the next.

In order to implement this, the SPA will need to cache the query, the index and the current result when clicking a document link in the search results. In this way, a next/prev button simply needs to use this information to decide which document to navigate to. When the next/prev result does not exist in the list of cached results, the cached query can be used to quietly expand the search results behind the scenes.

Obviously, this feature isn't relegated to just correspondences, it can be used to navigate any list of results.