HugoFara / lwt

Learn languages by reading! A language learning app stemmed from Learning with Texts (LWT).
https://hugofara.github.io/lwt/
The Unlicense
169 stars 19 forks source link

Shift click terms and bulk edit statuses. #75

Closed jzohrab closed 1 year ago

jzohrab commented 1 year ago

Description

Let the user select multiple terms from the reading pane and set their statuses in bulk. (This is something I wanted ... :-) Hopefully it's a good add for others.)

When I'm working on a new big page, I usually like to get rid of a bunch of things right off of the top, such as ignoring names, or flagging things that I don't know. Then I can set the rest to known, and come back to the items I've marked. With this PR, I can mark a whole bunch of things at once, instead of one-by-one, which gets tedious.

Demo

A new text with all unknowns:

image

I can hold Shift and click on multiple words (clicking the same word then un-highlights it):

image

These are all names, so I can ignore them all at once by clicking the "set highlighted status" button:

image

When I click a status, all of the terms are set with the right status:

image

And you can click on new terms and non-new terms and set them all as well:

image

Limitations

This only supports single-word-click, you can't click-and-drag to include multi-word terms. That felt a bit crazy for the first pass.

Unknowns

jzohrab commented 1 year ago

This is a net-new feature, but the edits to the existing files are minimal. The functionality comes from new files.