Page MenuHomePhabricator

OOjs UI: Make the toolbar narrower when the window is narrow (responsive layout)
Closed, ResolvedPublic1 Estimated Story Points

Assigned To
Authored By
gpaumier
Jun 26 2013, 1:30 PM
Referenced Files
F73594: 3-ve-toolbar-smaller.png
Mar 10 2015, 8:36 PM
F58305: pasted_file
Mar 7 2015, 4:39 PM
F58299: pasted_file
Mar 7 2015, 4:39 PM
F52680: pasted_file
Mar 2 2015, 9:56 PM
F52678: pasted_file
Mar 2 2015, 9:56 PM
F52639: pasted_file
Mar 2 2015, 9:07 PM
F11777: Screen_Shot_2013-11-11_at_2.10.02_PM.png
Nov 22 2014, 2:06 AM
F11778: Screen_Shot_2013-11-11_at_2.10.18_PM.png
Nov 22 2014, 2:06 AM

Description

When the browser's window is narrow (or at high zoom), toolbar buttons span several lines.

Current screenshot using Vector skin:

pasted_file (271×739 px, 58 KB)

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:06 AM
bzimport added a project: OOUI.
bzimport set Reference to bz50227.

This can be fixed by changing the background image of .ve-ui-toolbar-bar to specify background-size: auto 100%; That does however affect the gradient in 1 row mode (size the background image is 2 rows high currently). So the background image might have to be regenerated for this.

Right now, when the browser is resized to narrow window OR at high zoom,all the toolbar buttons have a background and the contents of page does not show up behind the toolbar .But, the buttons on the first line is now overlapping with the Edit/Edit-beta buttons before user scrolls down the article.

Tested on MAC OS X 10.8.5 using firefox 20 and chrome 26.0.1410.65 on page:
https://en.wikipedia.org/w/index.php?title=World_War_II&veaction=edit

See the screenshots attached.

Created attachment 13767
all buttons having background and content not showing up

Attached:

Screen_Shot_2013-11-11_at_2.10.02_PM.png (556×1 px, 137 KB)

Created attachment 13768
Toolbar buttons overlapping with Edit/Edit-beta button

Attached:

Screen_Shot_2013-11-11_at_2.10.18_PM.png (815×1 px, 255 KB)

Marking as depending on bug 72159 because presumably we'd want to push groups into the catch-all group or something?

  • Bug 70928 has been marked as a duplicate of this bug. ***

So the idea is that:

  • When there is too little space, we should tighten the whitespace a bit (https://gerrit.wikimedia.org/r/#/c/193282/).
  • When that doesn't help, all of the items that don't fit should be stuffed into a long dropdown list inserted at the end of the toolbar.

If this is a Q3 blocker, then I assume it should not depend on T74159: OOUI: Toolbar groups should support sub-groups as items (hierarchical, nested menus), and therefore the dropdown would just include all of the tools in one list rather than putting it in a hierarchical menu? At least until someone implements T74159, that is.

I am not sure if the latter, without hierarchical menus, would actually be beneficial; but we can implement the former easily (in fact I have already done it).

gerritbot subscribed.

Change 193282 had a related patch set uploaded (by Bartosz Dziewoński):
Tighten toolbar whitespace on narrow displays

https://gerrit.wikimedia.org/r/193282

@KHammerstein & @Nirzar did you have a expanded version and compact version that we could use to show the extremes of how this should work, I assume we should leverage the usage and frequency information we found from the toolbar user testing to define the control collapse order.

From task summary:

all the buttons except those displayed on the last line are lacking a background

This affected only the Apex theme, and seems to have been fixed in the meantime – the gradient is correctly being stretched now.

@KHammerstein & @Nirzar did you have a expanded version and compact version that we could use to show the extremes of how this should work, I assume we should leverage the usage and frequency information we found from the toolbar user testing to define the control collapse order.

Other editors that implement this behavior just fold items from the end of the toolbar; I think that will be the least surprising for users. Perhaps we should place the most frequently used items at the beginning?

Here are screenshot of the whitespace tightening I'm working on above. I have not implemented it for MediaWiki theme yet, but it's going to look pretty much the same, sans the gradients and shadows.

"Wide" configuration:

pasted_file (88×821 px, 9 KB)

"Narrow" configuration:
pasted_file (86×709 px, 8 KB)

How much actual space does this save for VE-MW?

Wide:

pasted_file (256×1 px, 57 KB)

Narrow:

pasted_file (249×970 px, 55 KB)

(It mostly cooperates with Vector's narrow display styles, as you can see.)

Is there a particular reason we don't make the narrower styling the default?

Yeah, the wide one looks better. Especially in the MediaWiki theme, where there are no separators or frames on the buttons and therefore we're forced to separate them with whitespace. (Apex has frames on hover, at least.)

Change 195047 had a related patch set uploaded (by Bartosz Dziewoński):
ve.ui.Toolbar: Fix up onWindowResize to call parent method

https://gerrit.wikimedia.org/r/195047

Change 195049 had a related patch set uploaded (by Bartosz Dziewoński):
ve.init.mw.ViewPageTarget: Recalculate toolbar sizes when adding "Save" button

https://gerrit.wikimedia.org/r/195049

Change 193282 merged by jenkins-bot:
Toolbar: Tighten whitespace on narrow displays

https://gerrit.wikimedia.org/r/193282

We can solve this problem by making VE toolbar responsive - here are more details about it with mockups

3-ve-toolbar-smaller.png (1×1 px, 678 KB)
for reference

Change 195049 merged by jenkins-bot:
ve.init.mw.ViewPageTarget: Recalculate toolbar sizes when adding "Save" button

https://gerrit.wikimedia.org/r/195049

Jdforrester-WMF renamed this task from OOjs UI: Toolbar should collapse items rather than span multiple lines when the window is narrow to OOjs UI: Toolbar should collapse items rather than span multiple lines when the window is narrow (responsive layout).Mar 11 2015, 4:51 PM
Jdforrester-WMF edited a custom field.

Okay, so I this bug mostly turned into "Make the toolbar narrower when the window is narrow", rather than what the current title says ("Toolbar should collapse items rather than span multiple lines when the window is narrow (responsive layout)"). Let's rename and close it, and continue with making the responsive behavior better on T92315.

matmarex renamed this task from OOjs UI: Toolbar should collapse items rather than span multiple lines when the window is narrow (responsive layout) to OOjs UI: Make the toolbar narrower when the window is narrow (responsive layout).Mar 12 2015, 2:42 PM

Change 196305 had a related patch set uploaded (by Jforrester):
Update OOjs UI to v0.9.1

https://gerrit.wikimedia.org/r/196305

Change 195047 abandoned by Jforrester:
ve.ui.Toolbar: Fix up onWindowResize to call parent method

Reason:
Squashed into I936ea56e1c.

https://gerrit.wikimedia.org/r/195047

Change 196305 merged by jenkins-bot:
Update OOjs UI to v0.9.1

https://gerrit.wikimedia.org/r/196305