Skip to content
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

Usability of the highlighter tool #9

Closed
SonephetR2 opened this issue May 31, 2019 · 3 comments
Closed

Usability of the highlighter tool #9

SonephetR2 opened this issue May 31, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@SonephetR2
Copy link

Hello John Factotum and first of all thank you for coding such a promising tool!

I am finding it difficult to apply highlights properly as is however as they seem to be applied based on a timer with a very short fuse. This means that when selecting the text that is to be highlighted, the selection will be interrupted if the user isn't fast enough. In pratical terms, highlighting long sentences in one go is all but impossible and most highlights will miss a few words. The usual way of implementing this tool in highlighter-enabled PDF viewers or the rare highlighter-enabled EPUB viewers (Bluefire on Windows and Android) is to apply the highlighting when the mouse click is released ("onmouseup"), which allows for much better user experience for serial highlighters such as myself.

Also, the highlight options tools that appears upon application is really neat but can appear quite far from where the user's cursor is (top of the active paragraph only). Wouldn't it be better to make it appear just below the cursor upon application? This would help minimize cursor travel distance and therefore improve usability.

Thanks!

@johnfactotum
Copy link
Owner

  1. Indeed, this is something that really bugs me as well. Currently highlighting depends on the selected event in Epub.js -- I got the impression that this is the intended way to do highlights as this is what's used in their example, and somehow the the event is set to fire after a timeout rather than on mouseup. We should probably file an issue to them as well.
  2. I haven't really considered this point. The main point of the current behavior, I suppose, is that the popover would not obstruct the text. The travel distance isn't that much, in my opinion.

So I think a more desirable behavior might be to

  1. Keep the current behavior, just make the event fire only after mouseup; or
  2. Keep the current behavior, fix event trigger, but don't auto-highlight; instead, show a "highlight" button in the popover; or
  3. Don't do anything on selection; instead, show the popover only on right click

I think if the popover is triggered by selection, it should try its best not to obstruct the selection. If it's triggered by right click, like a context menu, then I agree, it should follow the cursor.

@SonephetR2
Copy link
Author

Regarding point 1, I just opened the thread here. Hope this helps.

Point 2. is obviously very minor. Not obstructing the text is obviously completely critical whereas minimizing travel distance when already relatively short is a luxury.

I'd vastly prefer behaviour no. 1 over the two others (especially behaviour no. 2, which I feel would be nearly as frustrating as the current behaviour). Behaviour no. 3 would be a good cop-out though it would probably then be ideal to have a customisable keyboard shortcut for the highlighter tool (or even one per colour) to give users a quicker option.

@johnfactotum
Copy link
Owner

Thanks for opening that issue.

I've considered not auto-highlighting because sometimes you might just want to copy or do some other action such as dictionary/translation or search, but without highlighting. Obviously this depends on which functionality you use more often. But this can be easily solved by adding a preference.

The biggest problem is still the annoying event behaviour. I'll look into workarounds if I have the time. Or we'll just wait for upstream to respond.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants