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

Make hint labels more like Vimium #27

Merged
merged 1 commit into from
Jan 11, 2021
Merged

Conversation

extratype
Copy link
Contributor

@extratype extratype commented Dec 26, 2020

For the sake of convenience let hintCharacters be decimals: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. Suppose there are 21 labels. In current implementation we see

  • There are 7 (floor(100-21)/10) short hints: 0 1 2 3 4 5 6
  • There are 14 long hints: 70 71 72 ... 83

In this pull request:

  • There are 14 long hints: 00 10 20 01 11 21 02 12 22 03 13 23 04 14
  • There are 7 short hints: 3 4 5 6 7 8 9

Observations:

  • Vimium prefers lower numbers (starting characters) in long hints, not short hints.
  • Vimium changes higher decimal places (starting characters) for adjacent items: 00 10 20, not 00 01 02.

I figured this out by just looking labels, not source code, so this implementation may not be exactly same.

By the way there was a typo in HintLabelServiceTEst.cs. I corrected it.

@zsims
Copy link
Owner

zsims commented Jan 11, 2021

This works great in the cases I tried, subtle but helpful 👍

By the way there was a typo in HintLabelServiceTEst.cs. I corrected it.

Thanks

@zsims zsims merged commit 4a82517 into zsims:master Jan 11, 2021
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