-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Crum/Xooxle] Improve User Experience #229
Comments
- Make sure the index is loaded at most once. - Run the script with `defer`. Hopefully, this means the page will get loaded first, and the index will get loaded in the background. - Use a stack of comprehensions instead of creating intermediate lists. We had an impression (which empirical date did NOT corroborate) that this will make it possible to update the display while more results are being retrieved, instead of waiting for all results to be retrieved and then updating the display once. This doesn't seem to be the case empirically though, but we don't possess sufficient JavaScript wizardry skills to make the display update asynchronous. We retain the change anyway, because it's (arguably) more aesthetic.
Summary of changes: - Add an option to restrict the search to full-word matches only. - Add an option to use regular expressions. - Update the display as results are generated, instead of waiting for all results to be retrieved and then updating the display. Notice that we abort an ongoing search if a new search query is received. - Searching with an empty query clears the results. - URI-encode the text fragment. - Use full-word matches for the text fragment, thus rendering the directive more useful. - Handle potential JSON errors. NOTE: We already load the index in the background without letting it block loading the page, nothing to do here. NOTE: This commit was mostly implemented using ChatGPT.
This is obviously related to #171, but you might be wondering how it has anything to do with #229. The answer is that, with the current HTML, some text extractors see "Crum" and whatever precedes it as a single word, thus messing up with our search function (and also with text highlighting experience in the browser). Adding a line break is a way to ensure that this doesn't happen.
Status: Summary TODO:
|
This is, at least partially, highly desirable (and feasible). Moving to the v1.0 milestone. |
TODO: Number the list with Roman numerals. |
Most elements in the HTML seem to have classes that we can use to exclude them from the search, except "Crum", "Dawoud", and the page numbers below the Dawoud dictionary scans. |
- Add a link to JavaScript syntax page. - Add a link to the site's home page. - Add some horizontal lines.
We add the following classes: - "root-type" refers to the root type. - "marcion" refers to the full entry block. - "meaning" refers to the meaning block. - "dictionary" refers to the dictionary pages blocks. - "crum" refers to the string "Crum". - "dawoud" refers to the string "Dawoud". - "dawoud-page-external" refers to the Dawoud page numbers right beneath the scans. - "dawoud-page-img" refers to the Dawoud page images. NOTE: "dawoud-page-external" uses to refer to the images. We modify it to maintain consistency with Crum.
Pick up removing some classes from the index text.
Status:
Summary TODO:
|
TODO: Words have a hyperlink to the page, don't put the page on a separate column. |
TODO:
|
Status: Done:
Rejected:
TODO: Nit:
More involved:
Low-priority:
|
Status: Moved:
TODO (low-priority):
|
The only observable side effect of letting the event propagate is that, when clicking `/` to highlight the search box, the character `/` is also written into the search box.
Determinism is helpful when comparing the outputs of different configurations.
Status: DONE:
TODO (low-priority):
Footnotes
|
Status: Moved:
Footnotes
|
Huge, general-purpose issues are a bad idea! See! |
The behavior was introduced in 2af2e82.
TODO:
:~:text=
. Support it for both whole-word and simple search.regex
.The text was updated successfully, but these errors were encountered: