quemb / QMBTabs

Tab View Controller just like Safari or mobile Chrome
MIT License
124 stars 21 forks source link

Tab Sorting #9

Open skull-squadron opened 11 years ago

skull-squadron commented 11 years ago

Needs some UX thought before considering coding:

-- Draft, please comment --

  1. Tap and hold for time X
  2. While the hold gesture continues, the moving tab animates into it's new position
  3. When the gesture ends, the tabs stay.

Questions:

  1. Should there be a boolean 'unmovable' tab property?
  2. Should tabs optionally shake while being moved like Springboard icon reordering?
tonimoeckel commented 11 years ago

Thanks for participation!

A config to activate the sorting option would be great.

The procedure would be (as you said):

  1. Tap and hold for time X (set in the configs) 1.1. (optional) When time X is reached, a highlight animation would be great to notify the user about the sorting option - like in mobile chrome
  2. While holding the tab, the tab should move according to the gesture position
  3. When the new x-positions reaches the neighbors middle, the neighbor tab should swap the position
  4. When gesture ends -> the tab should move to the corresponding position

The whole thing wasn't made for sorting in the beginning. I think we need to rewrite the core a little bit.

skull-squadron commented 11 years ago

No worries. One obvious way that doesn't break users' code is an NSArray of indices which map the tabs' sort order to the tabitems. That way the sort array can be reordered without surprising users' code, and might be less work. Other areas prob need some tweaks and properties.

Also, on second thought, shaking might be too much of a distraction.

Finally, I'll take a look at chrome's tabs.