Helium314 / HeliBoard

Customizable and privacy-conscious open-source keyboard
Apache License 2.0
2.03k stars 75 forks source link

Scroll bar in the personal dictionary disappears #803

Open Uranusek opened 2 months ago

Uranusek commented 2 months ago

Describe the bug If there are words in the personal dictionary that begin with a letter that is not in the English alphabet, the scroll bar disappears.

To Reproduce

  1. Open the personal dictionary in the keyboard settings
  2. Add words starting with letters not present in the English alphabet
  3. Scroll almost to the end (that's where these words are)
  4. See that the scroll bar disappears

Expected behavior The scroll bar does not disappear and shows the correct position

Screenshots

https://github.com/Helium314/HeliBoard/assets/135356908/fb07969b-3501-4c71-ab38-a4ff46854ed7

App version HeliBoard 2.0-alpha1, but the problem occurred in older versions.

Device (please complete the following information):

Additional context It's possible that the bug only appears if there are a lot of words in the personal dictionary. Sorry for reporting such a minor bug, but it annoys me a bit 😅

Helium314 commented 2 months ago

Sorry for reporting such a minor bug, but it annoys me a bit

A minor and rare bug still is a bug, @BlackyHawky do you remember whether you did anything special related to scrollbar handling? Or is it just default?

BlackyHawky commented 2 months ago

Seeing how difficult it was for me to implement this personal dictionary I remember. 😅

I don't think I've changed anything about the scroll bar. I don't see why I should have, as it's just a scroll bar.

Helium314 commented 2 months ago

Thanks! It might be related to user_dict_fast_scroll_alphabet used for an AlphabetIndexer.

Helium314 commented 1 month ago

@Uranusek once the next version is out, please comment if this is fixed. If yes, the issue is not yes solved, as strings for other languages still need to be adjusted.

Uranusek commented 1 month ago

Now the scroll bar jumps strangely.

https://github.com/Helium314/HeliBoard/assets/135356908/027db341-56a8-4434-83ce-687cfb45143f

BlackyHawky commented 1 month ago

The same applies to the French language ☚ī¸

Helium314 commented 1 month ago

Weird that French is affected by the change. The user_dict_fast_scroll_alphabet string is untouched (and the same as the English one).

Uranusek commented 1 month ago

Hmm, adding Polish letters to the end of the alphabet in the strings file fixes the bug in my language, but causes another one: I can't fast scroll to the words at the end of the personal dictionary. Scrolling only works up to the Y. Scrolling further causes strange bugs, e.g. scrolling to Z displays words starting with W. Screenshot_2024-06-13_17-51-28_1

Helium314 commented 1 month ago

I reverted the initial fix attempt, as it seems to make things worse, even for other languages. Looks like it's necessary to better understand the AlphabetIndexer, or implement the SectionIndexer in a different way.