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

Feature Request: Allow scrolling / stepping through entries #555

Open
Ouguiya opened this issue Apr 2, 2021 · 3 comments
Open

Feature Request: Allow scrolling / stepping through entries #555

Ouguiya opened this issue Apr 2, 2021 · 3 comments

Comments

@Ouguiya
Copy link

Ouguiya commented Apr 2, 2021

Note: If this is already possible, I apologize: I searched github, google and the config page, but couldn't find anything about this. If it is, I would greatly appreciate the instructions being included in the settings page where most other features are already explained.

The one feature I am currently missing with Rikaichamp is the ability to go from one entry to the next, scrolling the popup each time. This lack is bothersome in two cases:

  1. When the popup shows up above the text - if it shows up below, I can simply use my mouse wheel to scroll down and see more entries. If the popup shows up above, however, I have no way of accessing cut-off entries: Scrolling upwards simply scrolls up the page, but not the popup.
  2. When there are many entries: I've noticed that if there are too many dictionary entries, they will cut off at some point with a simple "..." to indicate that there are more (I assume?). An example of this is みる. At this point, I see no way (or hotkey) to reveal those extra entries.

A possible solution would be to create something similar to copy mode, or alter copy-mode to make it work - currently, copy mode doesn't scroll the popup. Also, it doesn't reveal additional entries when the "..." sign appears, but instead wraps around to the top entry again.

@birtles
Copy link
Member

birtles commented Apr 4, 2021

Firstly thank you very much for filing such a very thoughtful and 丁寧 issue!

I suppose as a workaround for case (1), in some situations you might be able to scroll the page so that the text to highlight is at the top of the page so that the popup appears below. That's quite cumbersome though and not possible if the text appears at the bottom of the page. It also doesn't help with case (2).

I personally haven't encountered the issue but perhaps it is more noticeable on smaller screens? Or with working with materials primarily in kana (resulting in more possibly relevant matches)?

One idea that comes to mind, would be a shortcut key that makes the popup window sticky. For example, suppose pressing s made the window switch to a sticky mode where:

  1. It doesn't disappear until you close it manually using a little [x] in the top-right corner (or some other keyboard shortcut).
  2. The search is re-run with a much higher limit on the number of returned entries.
  3. Scrollbars are shown to allow scrolling the entries.

This sticky mode could also be extended with actions next to each entry such as "Copy word", "Copy definition" etc.

What do you think?

@Ouguiya
Copy link
Author

Ouguiya commented Apr 6, 2021

Hi again and thanks for the kind reply.

I think your idea sounds great and would definitely make things easier to go through. Perhaps one reason not everyone else has this problem is because I am still a complete beginner at Japanese and zoom in to >200% so I can have a nice, clean look at the Kanji. That obviously lowers the area of text displayed by Rikaichamp.

Another idea that came to me was one I hinted at in my original post: Expand the copy mode: Right now, it already supports highlighting and keyboard switching of entries. All that would be needed is that the text window scrolls with the highlight and that new entries are loaded when hitting the bottom entry.
I don't know javascript (or any web development in general), so I don't know what would be easier to implement (or more efficient). I'd certainly love either one. Although, the sticky mode would offer additional uses (such as moving the mouse cursor elsewhere while keeping the window open), so I think your idea might be the better option if it's not too much work.

@birtles
Copy link
Member

birtles commented Apr 8, 2021

Hi! Thanks again for following up on this.

Yes, I'm a little bit unsure which approach would be best. I think the "sticky" approach might be easier for many new users since they need to remember fewer keys, but extending the copy mode might be better for power users.

Unfortunately, this is not the top priority for me at the moment but it overlaps a little bit with some over features I want to add in the next six months so I will likely get to it then, unless someone else wants to try sooner.

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