Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nav unification: consolidate color-sidebar-menu-hover-heading-background with non-"heading" version #47300

Merged
merged 3 commits into from
Nov 11, 2020

Conversation

mreishus
Copy link
Contributor

Background

Compared to #47294, this is a slightly more complex change. I definitely want @cpapazoglou to check this one out.

  • This is considering the color of the background when hovering over sidebar items.
  • Before we started the nav-unification project, calypso color schemes used color-sidebar-menu-hover-background.
  • When we first added nav unification styles, we defined two variables, with the same color value:
    • color-sidebar-menu-hover-heading-background
      • This is a completely new variable to nav unification, not used in other places in calypso. However, it seems to perform the same function as the color-sidebar-menu-hover-background variable in calypso.
      • It's basically used everywhere in nav unification. So a theme must define the same value to color-sidebar-menu-hover-heading-background and color-sidebar-menu-hover-background to work with nav unification both on and off.
    • color-sidebar-menu-hover-background
      • This matches the calypso variable, but was only used in one corner case I couldn't recreate. Something about the site switcher. Link to code.
      • Its value in the default nav unification scheme is #32373c, which is a slightly darker version of the main color #1a1e23. In pull request Nav-unification: Submenu colors are controlled by variable #47249, I added a submenu-background variable which is also defined #32373c.

2020-11-10_16-01

Changes proposed in this Pull Request

  • Let color-sidebar-menu-hover-background control the sidebar hover background in both calypso and calypso+nav-unification.
  • For the corner case with the site switcher, change to color-sidebar-submenu-background, which is also #32373c.
  • Remove the new color-sidebar-menu-hover-heading-background variable.

Benefits

  • One less variable
  • Less changes needed to calypso schemes when porting to nav-unification calypso.

Testing instructions

Visit calypso with nav unification turned on, http://calypso.localhost:3000/?flags=nav-unification. Hovering sidebars should still work.

2020-11-10_15-48_1

2020-11-10_15-48

Reference Issues

@matticbot
Copy link
Contributor

@mreishus mreishus requested a review from cpapazoglou November 10, 2020 22:06
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Nov 10, 2020
@mreishus mreishus requested a review from a team November 10, 2020 22:06
@mreishus mreishus self-assigned this Nov 10, 2020
@mreishus mreishus added the [Feature] Calypso & wp-admin Navigation All navigation in Calypso and wp-admin, and the unified transitions between the two. label Nov 10, 2020
@mreishus mreishus mentioned this pull request Nov 10, 2020
94 tasks
@matticbot
Copy link
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

@cpapazoglou
Copy link
Contributor

color-sidebar-menu-hover-background
This matches the calypso variable, but was only used in one corner case I couldn't recreate. Something about the site switcher. Link to code.

Is triggered when in site switcher you add a search term and press the down key

Copy link
Contributor

@cpapazoglou cpapazoglou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mreishus for wrangling this!
This change makes sense to me and looks good!

@mreishus mreishus merged commit ee57160 into master Nov 11, 2020
@mreishus mreishus deleted the fix/consolidate-nav-unification-vars-2 branch November 11, 2020 15:41
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Calypso & wp-admin Navigation All navigation in Calypso and wp-admin, and the unified transitions between the two.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants