Page MenuHomePhabricator

[SPIKE] Investigate feasibility of incorporating Zebra refactors into default Vector styles
Closed, ResolvedPublic3 Estimated Story PointsBUG REPORT

Description

Investigation

The code for the Zebra redesign contains a considerable amount of CSS refactors that improve general code quality.
Whether or not we move forward with the visual changes in Zebra, we should still investigate folding the under-the-hood refactors into the default vector styles.
Most of the refactors have little or no affect on the visual appearance of the Vector skin, and maintaining two distinct CSS modules could be problematic in the long-term (especially with upcoming font-size work that also modifies CSS).

Some of these refactors include:

  • unified styling for pinned & unpinned menus
  • moving font-size declarations up the DOM to container elements
  • increased use of rems

Relevant patches:
https://gerrit.wikimedia.org/r/c/mediawiki/skins/Vector/+/910118
https://gerrit.wikimedia.org/r/c/mediawiki/skins/Vector/+/911435

Outcome

  • Determine which refactors could be folded back into the default Vector CSS module.
  • Document and consider the discrepancies in layout between the two designs e.g. horizontal placement of search input / vertical placement of toolbox.

Event Timeline

ovasileva set the point value for this task to 3.Sep 18 2023, 5:22 PM

Due to the scope of refactoring included in Zebra that @Jdrewniak already mentioned, it seems unfeasible to move the refactored bits into Vector's styles. It seems far easier to update Zebra to match (or mostly match) the existing styles, and go with Zebra as the default going forward.

I believe this should involve the following steps:

  1. Update Zebra to use the anon pref classes for the TOC (https://gerrit.wikimedia.org/r/c/mediawiki/skins/Vector/+/958516)
  2. Do T323141. This fixes a Zebra bug where the TOC can overlap with the footer. The solution described in that ticket still works, and its something we should do either way, as it also addresses an existing accessibility issue by improving the source order. The solution however does involve cached HTML changes
  3. Update Zebra to match the preZebra styles. This shouldn't be too difficult, but the size of the changes will also depend on which (if any) changes from Zebra can be kept. POC Patch
  4. We can now turn on the zebra flag in some wikis to test
  5. Lastly, we will need to eventually remove the CSS fork and make the new Zebra styles the default. This is essentially what we were planning to do originally anyway. This step is changes many files and should be reviewed carefully. It requires selectors on the HTML element to be updated, i.e. removing & from &.vector-feature-toc-pinned-enabled. We also should carefully review the mixins and variables after the merge.

@bwang that POC patch looks pretty good!

Screenshot 2023-09-18 at 3.51.22 PM.png (2×3 px, 1 MB)
Screenshot 2023-09-18 at 3.51.40 PM.png (2×3 px, 1 MB)
Current stylesZebra with current styles

Other than T323141, these are the other outstanding Zebra tickets. In my opinon they seem to be all low priority, or would not be an issue after the style changes. I.e. T336048 & T343250 will likely not be an issue after the zebra paddings are removed.

T339058 Zebra: VE surface widgets have too much padding on Vector Zebra - due to visual changes padding
T340571 Zebra: No-js pinned TOC on small viewports doesnt work - has a patch, low priority
T340481 Zebra: Align TOC title border with text - not important
T343250 Zebra: Empty table of contents shows in VE edit mode - due to visual changes padding
T336048 Zebra: You have new message toolbar is too small and too close to the toolbar in zebra design - might be due to padding

I also discussed this with @JScherer-WMF , we identified that the bolding of the pinnable element headers and the pin/unpin buttons from Zebra can stay, as they are improvements to the design.

While looking at the POC patch, we talked about how the header spacing is less than it should be, but that the most important thing is that the search bar is aligned with the page content. We also identified that the overall page content width is larger than it should be in the POC patch. When this task is worked on for real, ideally we should address both of these issues

The strategy laid out in this ticket has been captured in a mini epic here https://phabricator.wikimedia.org/T347713 so this is good to resolve now.