Nothing Special   »   [go: up one dir, main page]

Page MenuHomePhabricator

[Refactor] Update Vector Zebra module to match current appearance
Closed, ResolvedPublic5 Estimated Story PointsBUG REPORT

Assigned To
Authored By
Jdrewniak
Sep 28 2023, 9:55 PM
Referenced Files
F41519247: screenshot 253.png
Nov 19 2023, 2:34 AM
F41519246: screenshot 251.png
Nov 19 2023, 2:34 AM
F41519245: screenshot 252.png
Nov 19 2023, 2:34 AM
F41519252: screenshot 254.png
Nov 19 2023, 2:34 AM
F41519241: screenshot 248.png
Nov 19 2023, 2:34 AM
F41519240: screenshot 250.png
Nov 19 2023, 2:34 AM
F41519239: screenshot 249.png
Nov 19 2023, 2:34 AM
F41519236: screenshot 245.png
Nov 19 2023, 2:34 AM

Description

As part of the strategy outlined in https://phabricator.wikimedia.org/T346363#9176155 we would like to keep the CSS refactors that Zebra introduced, but remove it's visual distinction until we do further testing.

To do this, we should update the Zebra CSS module so that visually, it looks the same as the current Vector 2022 design.

Technical notes

The styles responsible for the Zebra design are actually a very small part of the Zebra code, encapsulated in a mixin called .mixin-vector-content-box(). Modifying that mixin that will remove the background colors and will roughly match the current design, however padding and alignment will have to be adjusted throughout the layout. Design should be consulted in changes to alignment and sizing.

POC Patch: https://gerrit.wikimedia.org/r/c/mediawiki/skins/Vector/+/958529

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

Visual Changes

There will be some expected visual changes when implementing this change.

  • Pinnable element "hide"/“move to sidebar” buttons will remain in the Zebra style
  • Pinnable headers (ie the text labeling the ToC Contents) will remain bold

Acceptable visual change

  • The logo and main menu button moving to the left in the header slightly
  • User links moving to the right in the header slightly

Updating these styles should resolve (or invalidate) the following issues:

  • T339058 Zebra: VE surface widgets have too much padding on Vector Zebra
  • T343250 Zebra: Empty table of contents shows in VE edit mode
  • T336048 Zebra: You have new message toolbar is too small and too close to the toolbar in zebra design

QA Results - Prod

Event Timeline

Jdrewniak updated the task description. (Show Details)
ovasileva set the point value for this task to 5.Oct 10 2023, 5:11 PM

Change 969794 had a related patch set uploaded (by Jdrewniak; author: Jdrewniak):

[mediawiki/skins/Vector@master] Change Zebra module to match current Vector styles

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

Test wiki created on Patch demo by JDrewniak (WMF) using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/6c24db10b6/w

Test wiki on Patch demo by JDrewniak (WMF) using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/6c24db10b6/w/

Test wiki created on Patch demo by JDrewniak (WMF) using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/11f1376233/w

The following is a summary of the visual changes resulting from this work. In general, the goal was to get the Zebra refactor to mirror the existing design as much as possible (with a few improvements, IMO 😉) .

Layout

1. The content column is slightly narrower. This is done so that when you open and pin the TOC, the content doesn't shift *ever so slightly* like it does now. (This happens at laptop-wide resolutions).

MediaWiki_User_page_vector-2022_0_viewport_4_desktop-widest.png (900×1 px, 58 KB)
MediaWiki_User_page_vector-2022_0_viewport_4_desktop-widest-1.png (900×1 px, 58 KB)
failed_diff_MediaWiki_User_page_vector-2022_0_viewport_4_desktop-widest.png (900×1 px, 40 KB)
Current widthZebra widthdiff
Screen Recording 2023-11-01 at 9.35.27 AM.2023-11-01 10_14_17.gif (253×500 px, 172 KB)
Screen Recording 2023-11-01 at 9.34.01 AM.2023-11-01 10_10_56.gif (254×500 px, 159 KB)
Current behaviour, content shifting left/right when opening TOCZebra behaviour, content staying still when opening TOC

2. The left and right sidebar columns are now equal width. Previously the end-column was narrower than the start-column. This also makes the content column narrower when both TOC and Page Tools are in the sidebar.

MediaWiki_3_column_full_width_vector-2022_logged-in_limited-width-disabled_0_viewport_0_desktop-widest.png (900×1 px, 207 KB)
MediaWiki_3_column_full_width_vector-2022_logged-in_limited-width-disabled_0_viewport_0_desktop-widest-1.png (900×1 px, 206 KB)
failed_diff_MediaWiki_3_column_full_width_vector-2022_logged-in_limited-width-disabled_0_viewport_0_desktop-widest.png (900×1 px, 152 KB)
Current sidebar widthZebra sidebar widthdiff

3. The TOC is somewhat closer to the content

MediaWiki_Article_talk_page_vector-2022_0_viewport_3_desktop-wide.png (900×1 px, 71 KB)
MediaWiki_Article_talk_page_vector-2022_0_viewport_3_desktop-wide-1.png (900×1 px, 71 KB)
failed_diff_MediaWiki_Article_talk_page_vector-2022_0_viewport_3_desktop-wide.png (900×1 px, 60 KB)
Current sidebar alignmentZebra sidebar alignmentdiff

4. Searchbox is slightly closer to the logo

MediaWiki_Special_page_vector-2022_0_viewport_4_desktop-widest.png (900×1 px, 43 KB)
MediaWiki_Special_page_vector-2022_0_viewport_4_desktop-widest-1.png (900×1 px, 43 KB)
failed_diff_MediaWiki_Special_page_vector-2022_0_viewport_4_desktop-widest.png (900×1 px, 39 KB)
Current searchbox alignmentZebra searchbox alignmentdiff

5. As seen above, the footer has a larger gap between it and the content.

Alignment

1. Content is now centred(instead of being slightly off-centre, as is the case currently) when the TOC is open, at laptop width.

Screenshot 2023-11-01 at 10.33.21 AM.png (1×3 px, 243 KB)
Screenshot 2023-11-01 at 10.33.31 AM.png (1×3 px, 243 KB)
Current centeringZebra centering

2. The Main Menu column is aligned with the bottom border of the tab area .

MediaWiki_3_column_vector-2022_logged-in_0_viewport_4_desktop-widest.png (900×1 px, 207 KB)
MediaWiki_3_column_vector-2022_logged-in_0_viewport_4_desktop-widest-1.png (900×1 px, 206 KB)
failed_diff_MediaWiki_3_column_vector-2022_logged-in_0_viewport_4_desktop-widest.png (900×1 px, 144 KB)
Current main menuZebra main menudiff

3. The TOC arrows is no longer aligned with the edge of the main-menu button.

MediaWiki_Full_article_page_vector-2022_0_viewport_4_desktop-widest.png (900×1 px, 184 KB)
MediaWiki_Full_article_page_vector-2022_0_viewport_4_desktop-widest-1.png (900×1 px, 184 KB)
failed_diff_MediaWiki_Full_article_page_vector-2022_0_viewport_4_desktop-widest.png (900×1 px, 136 KB)

4. The searchbox now aligns with the edge of the content when both sidebars are closed.

MediaWiki_Empty_user_page_vector-2022_0_viewport_4_desktop-widest.png (900×1 px, 58 KB)
MediaWiki_Empty_user_page_vector-2022_0_viewport_4_desktop-widest-1.png (900×1 px, 58 KB)
failed_diff_MediaWiki_Empty_user_page_vector-2022_0_viewport_4_desktop-widest.png (900×1 px, 41 KB)
Current searchbox alignmentZebar searchbox alignmentdiff

Component changes

A big part of this refactoring was unifying the menu styles in dropdowns and sidebars, so that they share the same styles in both places. This means menus now share the same padding as both dropdowns and sidebars, and the main menu looks like the other menus.

  • The main menu no longer has a grey background
  • A new 'hide' button in the menus with a grey background
  • Dropdown no longer have a dark grey outline, relying mostly on dropshadows for definition ( I think this was a previous design decision...)

Known Bugs

  1. Something strange happening with the logo at very narrow resolutions, which we technically don't support anyway... will investigate this at a later time.
MediaWiki_Main_page_vector-2022_0_viewport_0_phone.png (480×320 px, 36 KB)
MediaWiki_Main_page_vector-2022_0_viewport_0_phone-1.png (480×320 px, 35 KB)
failed_diff_MediaWiki_Main_page_vector-2022_0_viewport_0_phone.png (480×320 px, 22 KB)
  1. There is a larger gap between the footer and the content. This is due to adding top-margin to the sidebars (for vertical menu alignment) and then pushing the sidebars below the content to avoid grid-gap causing the content to be off-center (and afaik, this existing spacing was arbitrary anyway).

Change 969794 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Change Zebra module to match current Vector styles

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

Jdlrobson subscribed.

@Jdrewniak would this benefit from QA from Edward?

Since this has been design reviewed and any QA will happen as part of deployment this can skip QA and I am signing it off.

Edtadros added a project: Verified.
Edtadros subscribed.

Test Result - Beta

Status: ✅ PASS
Environment: enwiki
OS: macOS Sonoma
Browser: Chrome
Device: MBA
Emulated Device:NA

Test Artifact(s):

QA Steps

✅ AC1: Visual Changes
There will be some expected visual changes when implementing this change.
Pinnable element "hide"/“move to sidebar” buttons will remain in the Zebra style
Pinnable headers (ie the text labeling the ToC Contents) will remain bold

screenshot 243.png (974×1 px, 352 KB)

✅ AC2: Layout

  1. The content column is slightly narrower. This is done so that when you open and pin the TOC, the content doesn't shift *ever so slightly* like it does now. (This happens at laptop-wide resolutions).
  2. The left and right sidebar columns are now equal width. Previously the end-column was narrower than the start-column. This also makes the content column narrower when both TOC and Page Tools are in the sidebar.
  3. The TOC is somewhat closer to the content
  4. Searchbox is slightly closer to the logo
  5. As seen above, the footer has a larger gap between it and the content.
screenshot 120.mov.gif (932×1 px, 666 KB)
screenshot 121.mov.gif (932×1 px, 1 MB)

✅ AC3: Alignment

  1. Content is now centred(instead of being slightly off-centre, as is the case currently) when the TOC is open, at laptop width.
  2. The Main Menu column is aligned with the bottom border of the tab area .
  3. The TOC arrows is no longer aligned with the edge of the main-menu button.
  4. The searchbox now aligns with the edge of the content when both sidebars are closed.

screenshot 246.png (971×1 px, 501 KB)

@Jdlrobson, the only issue I see is that the text in the TOC doesn't align with the Main Menu. I'm not sure what the spec calls out regarding this.
screenshot 245.png (971×1 px, 538 KB)

✅ AC4: Component changes

  1. A big part of this refactoring was unifying the menu styles in dropdowns and sidebars, so that they share the same styles in both places. This means menus now share the same padding as both dropdowns and sidebars, and the main menu looks like the other menus.
screenshot 249.png (851×1 px, 437 KB)
screenshot 250.png (848×1 px, 457 KB)
screenshot 248.png (966×1 px, 484 KB)
  1. The main menu no longer has a grey background

screenshot 254.png (958×1 px, 540 KB)

  1. A new 'hide' button in the menus with a grey background

see above

  1. Dropdown no longer have a dark grey outline, relying mostly on dropshadows for definition ( I think this was a previous design decision...)
screenshot 252.png (954×1 px, 496 KB)
screenshot 251.png (959×1 px, 471 KB)
screenshot 253.png (958×1 px, 461 KB)

Test wiki on Patch demo by JDrewniak (WMF) using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/11f1376233/w/