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

make tab previews based on mouse idle time #8852

Closed
wants to merge 1 commit into from

Conversation

cezaraugusto
Copy link
Contributor

@cezaraugusto cezaraugusto commented May 12, 2017

This PR changed its purpose, please see description

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).

Close #8860

Note for reviewers:

Previews are now happening based on mouse idle time. Which means that it will only be fired if you stay the mouse over a tab for a given amount of time -- which is defined in prefs->tabs.

Once the mouse is long enough over a tab and you wish to preview another tab, the preview is fired immediately. Once you leave the tab to another component, the event is canceled and you'll only be able to preview again if the mouse is idle again.

Test Plan:

Intentional preview

  1. Open three tabs
  2. Hover over one inactive tab, let your mouse stopped for 2s (this is the default for now)
  3. Tab should preview
  4. Hover over third tab
  5. Third tab should preview

Unintentional preview/intentional preview

  1. Open three tabs
  2. Keep hovering from top/bottom, left/right
  3. No tab should preview
  4. Stop at a given tab
  5. It should preview
  6. Hover over something other than another tab
  7. Hover over a tab again
  8. It should not preview
  9. Let your mouse stopped over a tab
  10. It should preview

Dealing with options

  1. Go to prefs->tabs
  2. Disable tab preview
  3. Tab preview timing selection should be hidden
  4. Enable again
  5. Switch to "normal" (set to 1s) or "short" (set to 500ms)
  6. Open three tabs
  7. Hover over one inactive tab, let your mouse stopped for 2s (this is the default for now)
  8. Tab should preview
  9. Hover over third tab
  10. Third tab should preview faster than previous STR

Reviewer Checklist:

Tests

  • Adequate test coverage exists to prevent regressions
  • Tests should be independent and work correctly when run indivually or as a suite ref

Copy link
Contributor

@luixxiul luixxiul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test plan works. LGTM.

@cezaraugusto
Copy link
Contributor Author

setting to work in progress since we'll fully change how we deal with tab previews

@cezaraugusto cezaraugusto force-pushed the tabsbar/preview-timing branch 4 times, most recently from 7d4dab6 to cabbc3e Compare May 23, 2017 07:44
@cezaraugusto cezaraugusto changed the title Improve tab preview timing make tab previews based on mouse idle time May 23, 2017
@cezaraugusto
Copy link
Contributor Author

PR is still WIP as it needs Brad approval regarding preview timing but is ready for code review and feedback

@cezaraugusto
Copy link
Contributor Author

ok rebased

@alexwykoff alexwykoff modified the milestones: 0.19.x, 0.17.x (Frozen, only critical adds from here) Jun 12, 2017
@cezaraugusto cezaraugusto mentioned this pull request Jun 19, 2017
8 tasks
*
* @param {Boolean} shouldEnablePreview - true if user enters in previewMode state
*/
setPreviewMode: function (shouldEnablePreview) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this action doesn't provide any new information that we don't already have in setPreviewFrame. We are already duplicating information in setTabHoverState and setPreviewFrame (fixed in #9542) and definitely don't want to add any more actions for this functionality

Copy link
Collaborator

@bridiver bridiver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments

@cezaraugusto
Copy link
Contributor Author

moving to 0.18.x per last weekly triage meeting. WIP and blocked until #9542 lands, which is set for the same milestone.

@cezaraugusto cezaraugusto modified the milestones: 0.18.x (Developer Channel), 0.19.x (Nightly Channel) Jun 21, 2017
@cezaraugusto
Copy link
Contributor Author

am going to close this and keep as a ref and open a new one with updated logic

@luixxiul luixxiul removed this from the 0.18.x (Beta Channel) milestone Jul 6, 2017
@cezaraugusto cezaraugusto deleted the tabsbar/preview-timing branch October 14, 2017 15:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants