Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Only show tab previews if mouse is moving slow enough (#3271) #3300

Closed
wants to merge 1 commit into from
Closed

Only show tab previews if mouse is moving slow enough (#3271) #3300

wants to merge 1 commit into from

Conversation

willy-b
Copy link
Contributor

@willy-b willy-b commented Aug 22, 2016

  • Used Github auto-closing keywords in the commit message.
  • Ran git rebase -i to squash commits if needed.

Just taking a stab at issue #3271 here: Don't show tab preview unless mouse velocity is low enough

Changes:

  • The tab preview now requires that either:
    (1) the mouse is moving slower than a velocity threshold (in coordinates scaled by client tab dimensions so that this isn't tuned to particular screen resolution)
    (2) the mouse hovers for longer than a new mouseover duration threshold (I'm on the fence, this may actually be unnecessary, velocity by itself seems fine)
  • A 50% higher mouse velocity is tolerated if user is in "preview mode", i.e. moving mouse from one tab to another. This is to avoid flashing out of preview when mousing from one tab preview to another (a different source of flicker), see issue add tab-preview timer reset when entering and exiting tab bar to remove unwanted previewing #1434 where this was handled differently.

N.B. This only checks if velocity is low enough, not whether it is decreasing, and does not look at if the mouse is headed "into the tab", but it seems to work pretty well, so I thought I'd let people judge the simpler approach first. It would be easy to check if velocity was decreasing, or whether mouse is headed towards middle of component, so let me know if you want that too.

New settings variables:

  • the velocity threshold is set in constants/settings.js: tabs.tab-previews.mouse-velocity-threshold
  • the mouseover duration threshold is set in constants/settings.js: tabs.tab-previews.mouseover-duration-threshold-ms

- fixes #3271: Dont show tab preview unless mouse velocity is low enough
- tab preview requires that either:
  mouse be moving slower than a velocity threshold relative to tab size (so should be relative to resolution)
  mouse hover for longer than a new mouseover duration threshold (this may be unnecessary, velocity seems fine)
- 50% higher mouse velocity is tolerated if user is in "preview mode" (moving mouse from one tab to another, see issue #1434)
  to avoid flashing out when mousing from one tab preview to another
- velocity threshold is set in `constants/settings.js`: `tabs.tab-previews.mouse-velocity-threshold`
- mouseover duration threshold is set in `constants/settings.js`: `tabs.tab-previews.mouseover-duration-threshold-ms`
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant