Page MenuHomePhabricator

Tab font-size is not applied to menu item links
Closed, DeclinedPublicBUG REPORT

Description

Right now the tab font size is applied to the individual li elements in the vector menu list in Legacy Vector and not at all in normal Vector.

Issues

In Legacy Vector, this causes the tab font size to be applied to submenu items multiple times, making the text smaller for submenus.

image.png (228×238 px, 12 KB)

In normal Vector, the tab font size is not applied to any menu items, causing menu item text to appear larger than the tab text.

image.png (143×210 px, 5 KB)

Cause

Both of these issues were caused by T191021's commit, https://gerrit.wikimedia.org/r/c/mediawiki/skins/Vector/+/702456/, which for some reason only applies the correct font size to span elements inside the links inside the menu items even though those span elements are never added anywhere. T287052 tried to fix this for Legacy Vector only, but it caused the above issue with submenus.

Details

Event Timeline

Change 710500 had a related patch set uploaded (by BrandonXLF; author: BrandonXLF):

[mediawiki/skins/Vector@master] Apply tab font size to dropdown item links

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

Vector doesn't officially support nested dropdowns. Why can this not be done as part of the gadget that adds that nested dropdown?

Possibly some overlap with T287052

cjming triaged this task as Medium priority.Aug 6 2021, 4:33 PM

Vector doesn't officially support nested dropdowns. Why can this not be done as part of the gadget that adds that nested dropdown?

Possibly some overlap with T287052

Sure they can, but there are multiple gadgets and scripts that use submenu and I don't see a reason why this simple fix can't be made. Anyways, the fix for the font size on normal Vector also happens to resolve the issue with submenu font size, and that is definitely an issue that Vector needs to fix.

Sure they can, but there are multiple gadgets and scripts that use submenu and I don't see a reason why this simple fix can't be made. Anyways, the fix for the font size on normal Vector also happens to resolve the issue with submenu font size, and that is definitely an issue that Vector needs to fix.

The fix you provided interferes with a future planned feature that changes how menus operate (giving them icons) and turns certain menus into dropdowns where nesting is not going to work. This got broken because Vector doesn't support nested menus out the box, it only supports adding menu items through the mw.util.addPortletItem method.

It's not a good idea going forward for the maintainers of Vector to maintain nested menus on behalf of a few gadgets. Updating the gadget is just as simple and the gadget developer is in a better place to maintain this on the long run than the Vector engineers.

@Jdlrobson I split the part of this task about the new Vector skin off into T288367 since it was not addressed by the reason you closed this task and its really a separate issue.

Couldn't this be solved just by refining the selector .vector-menu-dropdown li to .vector-menu-dropdown li a in Legacy Vector only? Would that still interfere with the new dropdown?

Change 710500 abandoned by BrandonXLF:

[mediawiki/skins/Vector@master] Apply tab font size to dropdown item links

Reason:

Conflicts with other changes to the skin

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