koreader / koreader

An ebook reader application supporting PDF, DjVu, EPUB, FB2 and many more formats, running on Cervantes, Kindle, Kobo, PocketBook and Android devices
http://koreader.rocks/
GNU Affero General Public License v3.0
16.8k stars 1.26k forks source link

Dictionary lookup popup: Cannot lookup words from the dictionary heading #11755

Open artjomsR opened 6 months ago

artjomsR commented 6 months ago

Issue

I have several dictionaries in KOReader, but only 1 of them supports inflections. Meaning that if I look up a non-infinitive word, I only get 1 definition instead of X. I would like to be able to get more definitions by tapping on the infinitive form - this is the current heading of the dictionary popup window. However, tapping on it simply shows a blurry screen (instead of querying the infinitive form). Lookups from all other places of the dictionary popup work fine

Steps to reproduce

  1. Do a dictionary lookup of any word
  2. Try to get the definition of the headword by tapping on the bold word at the top, under the dictionary name
  3. Blurry screen appears

Notes

My description with inflected / non-infinitive form is simply the reasoning how the bug affects me. To actually reproduce it, you can use any word / dictionary. It's just that normally there's no need to get the definition from the bolded headword

https://github.com/koreader/koreader/assets/6875790/44e2108f-45a5-4c6b-af02-d7650edfc231

poire-z commented 6 months ago
  • Try to get the definition of the headword by tapping on the bold word at the top, under the dictionary name
  • Blurry screen appears

This "head word" is actually a distinct text element/sub-widget in the Dict lookup result widget, and we... just didn't think their would be a use case for (re-)looking that (possibly different) word up, so there is ZERO event handler when tap or long-press on it. (So, long-press falls back to the classic behaviour of long-press on not-yet-moved movable widgets: making them translucent.)

poire-z commented 2 months ago

image

It would be a matter of replacing that yellow TextWidget by a Button (which may change a bit the geometry/positionning, I don't really want to think about how to counteract any of that), but we wouldn't want to have tap work, and only long-press (because in the definition text, only long-press works, so we'd rather not want to have all that different). Then, I realized we have that pink pencil edit button, that (not obvious, but discoverable):

So.... won't fix ?

artjomsR commented 1 month ago

I agree that long press on the pencil icon is a very viable alternative! I'm happy with a won't fix, the only issue is that to the new user the pencil button long press functionality is not obvious, unless you discover it by sheer chance (unless I've missed something)