mjrusso / scoot

Keyboard-driven MacOS cursor actuator
BSD 3-Clause "New" or "Revised" License
333 stars 14 forks source link

Improve legibility of element-based navigation when many elements are in close proximity #2

Closed mjrusso closed 2 years ago

mjrusso commented 2 years ago

Legibility when using element-based navigation is (usually) OK-ish, but far from perfect.

As an example of a degenerate case, here's what HN looks like when element-based nav is active:

Screen Shot 2022-01-01 at 10 30 48 AM

The combination of a small font size, with many unique anchors in close proximity, is problematic. It might make sense to ignore elements that are clustered too closely together (using size as a proxy for importance).

Originally posted by @mjrusso in https://github.com/mjrusso/scoot/issues/1#issuecomment-1003574556

mjrusso commented 2 years ago

I implemented (naive) algorithm that reduce "crowding", by filtering out elements that are positioned too closely together.

Here's what HN looks like with this change (see 323229b for implementation details):

Screen Shot 2022-01-09 at 9 04 02 AM

This is a huge improvement over before. It can still be hard to read the text, but that's a separate issue (being tracked in #4).

mjrusso commented 2 years ago

Added 4cd2104, which draws a background colour underneath the element labels, to improve legibility. Here's what HN looks like with this change:

Screen Shot 2022-01-09 at 2 40 43 PM

It's not perfect, and not a substitute for #4, but it is a dramatic improvement.