yari icon indicating copy to clipboard operation
yari copied to clipboard

enhance(design): improve style of current item in menu

Open caugner opened this issue 1 year ago • 3 comments

Summary

(MP-1103)

Problem

  1. The contrast of the highlighted menu item is too low in the light theme.
  2. The menu highlights the current page in the menu by reducing its visibility, which is counter-intuitive.

Solution

Inverse the menu highlighting, reducing the opacity of the inactive items using opacity: 0.775, and increasing the contrast of the active item by switching from --text-secondary to --text-primary, which is the same color used for the MDN logo.

Note: Also removes the --text-active variable, which is no longer used.


Screenshots

Theme Before/After Screenshot
Light Before image
Light After image
Dark Before image
Dark After image

How did you test this change?

Ran yarn dev and compared http://localhost:3000/en-US/docs/Learn locally against https://developer.mozilla.org/en-US/docs/Learn.

caugner avatar May 03 '24 11:05 caugner

Adding regression on stage currently, most noticeable in dark mode. Open the profile menu on a page with a content behind the menu, like https://developer.allizom.org/en-US/docs/Web/JavaScript and then use a mouse scroll motion to navigate the page. Notice the menu's opacity is decreased and it has become see through. image

mirunacurtean avatar Jul 04 '24 13:07 mirunacurtean

Adding regression on stage currently, most noticeable in dark mode. Open the profile menu on a page with a content behind the menu, like https://developer.allizom.org/en-US/docs/Web/JavaScript and then use a mouse scroll motion to navigate the page. Notice the menu's opacity is decreased and it has become see through. image

Good catch, thank you! I pushed a fix, and it's being deployed to stage now.

caugner avatar Jul 04 '24 14:07 caugner

I don't want to bikeshed here, but I don't like this design: it doesn't make sense to me. I can't think of any other site which shows the active section of the site by making the links to the other sections lower contrast. The active section should be shown with an underline, or some other distinguishing feature, not by making the rest of the links hard to see.

LeoMcA avatar Aug 01 '24 15:08 LeoMcA

Closing in favor of upcoming frontend work, which includes a redesigned menu.

caugner avatar Mar 12 '25 12:03 caugner