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

Add option to permanently pin popup #1737

Open
StarScape opened this issue Apr 25, 2024 · 4 comments
Open

Add option to permanently pin popup #1737

StarScape opened this issue Apr 25, 2024 · 4 comments

Comments

@StarScape
Copy link
Contributor

This is a feature I would personally like to have on desktop. Current behavior is that there is a 'pin' icon in the top right, but it will only pin the word you've currently moused over. If you then mouse over another word, it will be unpinned. It'd be nice to have an option where it stays pinned permanently. This should be pretty easy to implement.

@birtles
Copy link
Member

birtles commented Apr 27, 2024

For what it's worth, you can force the popup to show up in the bottom-left or top-right using j / k which at least means it has a consistent position.

@StarScape
Copy link
Contributor Author

StarScape commented Apr 27, 2024

So, re-reading what I wrote above I realize I wasn't clear what my current problem is.

I frequently interact with the popup window with the mouse. To scroll through definitions, click different tabs, etc. My frustration is, it takes brief timeout before the little caret appears below and the popup window 'stickies' such that I can move my mouse into the window area without the popup closing, and I frequently misjudge the timing of this, sometimes even failing multiple times in a row to get my mouse into the popup without it closing.

One solution is to pin the window, so it can't slip away from me. Also, I actually prefer having to click off somewhere else in the page to get the popup to disappear, rather than it doing so automatically when I move my mouse away. What I was talking about above is having an option to pin the popup by default, so I don't have to hit ctrl or click the pin button for every new word I mouse over. Basically, the same behavior that Yomichan has, which admittedly I like better than the current 10ten behavior.

This does involve adding another option, however—which I'm not always the biggest fan of, and I know the project guidelines you wrote caution against too many options as well.

For what it's worth, you can force the popup to show up in the bottom-left or top-right using j / k which at least means it has a consistent position.

On a side note, is there a way to do this on mobile? I know on the tiny phone screen I often find myself wishing I could have the popup display in the bottom of the screen.

@birtles
Copy link
Member

birtles commented Apr 29, 2024

One solution is to pin the window, so it can't slip away from me. Also, I actually prefer having to click off somewhere else in the page to get the popup to disappear, rather than it doing so automatically when I move my mouse away. What I was talking about above is having an option to pin the popup by default, so I don't have to hit ctrl or click the pin button for every new word I mouse over. Basically, the same behavior that Yomichan has, which admittedly I like better than the current 10ten behavior.

Ah, I see. I seem to recall considering the Yomichan behavior when I implemented the pinning feature but from memory the problem was that the 10ten popup shows up too fast. Yomichan has a configurable delay before the popup shows up. For 10ten, however, it shows up almost instantly. As a result, if we pin the popup immediately it interferes with scanning text.

For example, suppose you want to look up a word on the second row of a paragraph but as you move your cursor down towards it, it passes over a word in the first row of the paragraph triggering the popup which covers up the word in the second row.

We could add a delay like Yomichan but or most users it makes 10ten less responsive and a number of users have commented how they appreciate how fast 10ten is.

I think if we were to add an option, it would probably be to add a configurable delay to when the popup shows. If that delay was non-negative we would pin the popup by default.

For what it's worth, you can force the popup to show up in the bottom-left or top-right using j / k which at least means it has a consistent position.

On a side note, is there a way to do this on mobile? I know on the tiny phone screen I often find myself wishing I could have the popup display in the bottom of the screen.

No, it's keyboard only for now. I could imagine adding some UX for that for mobile, however.

@StarScape
Copy link
Contributor Author

Yomichan has a configurable delay before the popup shows up. For 10ten, however, it shows up almost instantly. As a result, if we pin the popup immediately it interferes with scanning text.

Ah, okay, the current behavior is making more sense now.

I think if we were to add an option, it would probably be to add a configurable delay to when the popup shows. If that delay was non-negative we would pin the popup by default.

Agreed. Although, as I think about it more, I'm not sure how it would work if you don't have the 'hold ctrl/alt/ctrl+alt to show popup' option enabled. Assuming you have that off, and just hovering triggers the popup, I don't think it would be desirable to auto-pin the popup even if there was a delay. So I think the only way this would make sense is to auto-pin if the user has a hotkey configured to show the popup and if there is a delay.

...which seems a bit convoluted. I'll think on this some more, but maybe the current UX is better after all and I don't know what I'm talking about 😅.

No, it's keyboard only for now. I could imagine adding some UX for that for mobile, however.

Putting a pin in this. I might be interested in implementing this whenever I get done with other things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants