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 display-first as an opt-in alternative handling of recent characters #78

Closed
wants to merge 5 commits into from

Conversation

stefanradziuk
Copy link

This PR adds a --display-recents {bar,display-first} option, defaulting to bar (current behaviour).

When set to display-first, recent characters are displayed as initial entries of the character list rather than on a separate bar. Recent characters can still be inserted using the alt+n keybinding, but there will be no visual indication as to which recent character corresponds to which number.

See previous discussion at #74

@fdw
Copy link
Owner

fdw commented May 24, 2021

Sorry to leave this uncommented for so long, and thanks for your patience! 🙏

I used some of that break to think about this issue, and I think I found some good starting points. So, to recap first, the problems with this approach are:

  1. Performance is not certain, but we're optimistic. In any case, we should watch out for it.
  2. Emojis with skin-tones and multiple selections are problematic, as they have no descriptions available. But showing them without one is weird, too.
  3. How to deal with characters from different blocks? If I have Arabic and Hebrew, for example, should the first entries be the least recently used, independent of their language? Or should we first show Arabic, then Hebrew, but each sorted with their respective least recently used characters first? I tend towards the second approach.

Now, a possible solution, or at least a start:
Instead of making this about least recently used, how about we make this about sorting the characters by frecency? Each block (e.g. emojis, maths, Thai) is shown first with more frecently used characters, less frecently used ones and finally all others.
To sort, we'd have to update the frecency in a file each time a selection is made (without skin tone, and multiple selections deconstructed to its components). Do you think that is possible and performant?
One problem I see is that changing the order could be confusing. But I think we need to try it first to see what it's like.

Orthogonal to that, if one wants to make skin-tone selection easier, we could save "built" emojis (i.e. ones with skin tones) separately and suggest those in the skin tone selection dialog. I'm not really sure about the UX here; if it is more comfortable or not, but it's something to think about.

However, I think the first idea could solve the problems we have here. What is your opinion? Would you want to try that out? Should I do so, whenever I find time?

@fdw
Copy link
Owner

fdw commented Jun 30, 2021

So, I have finally found the time to try this and I have to admit, I like it so far. Speed is also not a problem (yet 🙈).

Please try out the frecency branch, if you're interested, and report back with feedback!

@stefanradziuk
Copy link
Author

Sorry for the delay, I've been a bit busy lately.

I've had a look at frecency and it works very nicely! It definitely feels close to how rofi -show run or other rofi launchers work which was one of the primary motivations behind my PR.

The only reason I would argue for most-recently-used over frecency is that frecency is somewhat unpredictable (it's easier to mentally predict MRU than frecency sorting). However, frecency ordering does get a bit more stable with usage and the alt + 1 keybindings are still there for predictable access to 1st/2nd/n-th most recently used entries.

I can't really share much insight into multi-character selection / skintone character handling as I don't use those very often but the way you've done it seems reasonable.

Overall, I quite like how this works. Thanks for taking the time to look into this! Are you planning on releasing the frecent version?

@fdw
Copy link
Owner

fdw commented Jul 9, 2021

Sorry for the delay, I've been a bit busy lately.

No worries 🙂

The only reason I would argue for most-recently-used over frecency is that frecency is somewhat unpredictable (it's easier to mentally predict MRU than frecency sorting). However, frecency ordering does get a bit more stable with usage and the alt + 1 keybindings are still there for predictable access to 1st/2nd/n-th most recently used entries.

Yes, and I'd even say that frecency gets more predictable than least-recently-used after some time, as each usage has less and less impact.

I can't really share much insight into multi-character selection / skintone character handling as I don't use those very often but the way you've done it seems reasonable.

Thanks. I do hope it's better to use, but as always, I'm eager to hear feedback 🙂

Overall, I quite like how this works. Thanks for taking the time to look into this!

You're welcome, and thanks for your effort and for pushing me to investigate the whole idea deeper! I had plans for this even back when I first started rofimoji, but then it was always "good enough" and I was skeptical of performance, so thank you very much for your initiative!

Are you planning on releasing the frecent version?

I'd like to, but I was waiting for feedback first, if people like the change, if it improves something or if I broke it. Maybe I'll merge it soon and see what happens then 😉

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

Successfully merging this pull request may close these issues.

2 participants