Page MenuHomePhabricator

VE toolbar changes width when moving from paragraphs to headings
Closed, ResolvedPublic

Assigned To
Authored By
Esanders
Nov 28 2025, 12:07 PM
Referenced Files
F70710168: image.png
Nov 28 2025, 12:07 PM
F70710077: image.png
Nov 28 2025, 12:07 PM
F70710073: image.png
Nov 28 2025, 12:07 PM
F70710071: image.png
Nov 28 2025, 12:07 PM
Subscribers

Description

Having the toolbar jump as you cursor through the document is not ideal, and having tools that change width makes our responsive calculations harder

image.png (798×201 px, 38 KB)

image.png (798×201 px, 38 KB)

image.png (798×201 px, 39 KB)

There are a few approaches:

  1. Try to calculate the maximum width and use this
    • Menus items can change dynamically, and in VE when you enter a table, so this would still result in some resizing
  2. Use a maximum width with an ellipsis. This is used by GoogleDocs et al.
    • The downside here is that in some languages (probably German), meaningful information is truncated (e.g. "Unterüberschrift..."), but this is still available when opening the menu.
  3. Come up with short-text versions of all these headings that are used when the text would otherwise be truncated (e.g. "Sub head 1"?)
    • Difficult to provide translation guidance for these. How short is short enough?

image.png (272×131 px, 7 KB)

Event Timeline

Change #793828 had a related patch set uploaded (by Esanders; author: Esanders):

[oojs/ui@master] Make menuToolGroup handle fixed width

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

The above patch implements the GoogleDocs solution (2).

Note also that ellipsis truncation is how we handle regular DropdownWidgets.

Change #793828 merged by jenkins-bot:

[oojs/ui@master] Make menuToolGroup handle fixed width

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

Change #1275892 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/core@master] Upgrade OOUI from v0.53.1 to v0.53.2

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

Change #1275892 merged by jenkins-bot:

[mediawiki/core@master] Upgrade OOUI from v0.53.1 to v0.53.2

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

matmarex assigned this task to Esanders.