Vector: Fix conflicts of "Actions" dropdown with collapsibleTabs
authorBartosz Dziewoński <matma.rex@gmail.com>
Sat, 31 May 2014 20:55:40 +0000 (22:55 +0200)
committerOri.livneh <ori@wikimedia.org>
Sun, 1 Jun 2014 05:05:51 +0000 (05:05 +0000)
commit1875b36bd16aaefd7db0b855061b8529a1eb544b
tree811143a821579ee3c2a3ed4067739d502b80193f
parent40282be46aa7fe0dc223d86e402b5169dec3a32b
Vector: Fix conflicts of "Actions" dropdown with collapsibleTabs

Follow-up to I09c8031c.

* Don't override the width of the "Actions" dropdown when collapsing
  tabs. The width was hardcoded to 24px, using the actual width now.
  This only matters when the "Actions" dropdown disappears completely
  (it has no items inside), and then something gets moved inside it
  causing it to reappear.
* Use the same collapsing speed for the dropdown and the tabs.
* Account for the width of the "Actions" dropdown if the expansion
  would hide it. This issue was there before, but was not that
  noticeable because the width of the dropdown was negligible.
  (This required making the calculateTabDistance() function in
  collapsibleTabs part of the public API.)
* Do not collapse if the width of the dropdown would exceed the width
  of the tab we're collapsing. This issue was there before as well,
  but in practice the dropdown was always smaller; this is not
  necessarily the case now, for example in Lithuanian (lt).

Bug: 44591
Change-Id: Id4548ea388fd9f4341dd78bb132c716feb14b137
skins/vector/collapsibleTabs.js
skins/vector/vector.js