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

Override Modern color scheme's highlight color to Blueberry 2 #39748

Closed
wants to merge 3 commits into from

Conversation

fushar
Copy link
Contributor

@fushar fushar commented Oct 11, 2024

Related to: pfsHM7-1qe-p2#comment-1787

Proposed changes:

We would like to propose updating the Modern color scheme, so that the highlight color, which is present in the admin bar and sidebar, becomes blue (Blueberry 2) instead of green:

Before After
image image
image image

The color is chosen to follow the navbar menu item's active state color in the WordPress.org website:

image

This PR is to have the change faster in dotcom. If we like it, we can propose the change back to dotorg.

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

Does this pull request change what data or activity we track or use?

Testing instructions:

  1. Patch this to your site.
  2. Go to wp-admin/profile.php.
  3. Select the Modern scheme and click Update.
  4. Verify that the hover text color in the admin bar and sidebar is now blu-ish as per screenshot above.

@github-actions github-actions bot added [Feature] Masterbar WordPress.com Toolbar and Dashboard customizations [Package] Masterbar [Status] In Progress labels Oct 11, 2024
Copy link
Contributor

github-actions bot commented Oct 11, 2024

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • 🔴 Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Choose a review path based on your changes:
    • A. Team Review: add the "[Status] Needs Team Review" label
      • For most changes, including minor cross-team impacts.
      • Example: Updating a team-specific component or a small change to a shared library.
    • B. Crew Review: add the "[Status] Needs Review" label
      • For significant changes to core functionality.
      • Example: Major updates to a shared library or complex features.
    • C. Both: Start with Team, then request Crew
      • For complex changes or when you need extra confidence.
      • Example: Refactor affecting multiple systems.
  3. Get at least one approval before merging.

Still unsure? Reach out in #jetpack-developers for guidance!

Copy link
Contributor

github-actions bot commented Oct 11, 2024

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WordPress.com Simple site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin, and enable the update-modern-scheme branch.

    • For jetpack-mu-wpcom changes, also add define( 'JETPACK_MU_WPCOM_LOAD_VIA_BETA_PLUGIN', true ); to your wp-config.php file.
  • To test on Simple, run the following command on your sandbox:

    bin/jetpack-downloader test jetpack update-modern-scheme
    
    bin/jetpack-downloader test jetpack-mu-wpcom-plugin update-modern-scheme
    

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@fushar fushar force-pushed the update-modern-scheme branch from 3791f81 to 4e182f4 Compare October 11, 2024 14:48
@fushar fushar marked this pull request as ready for review October 11, 2024 15:01
@fushar fushar requested a review from youknowriad October 11, 2024 15:01
@fushar fushar self-assigned this Oct 11, 2024
@fushar fushar requested a review from jasmussen October 11, 2024 15:01
@github-actions github-actions bot added the [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! label Oct 11, 2024
@fushar fushar requested a review from a team October 11, 2024 15:06
@jasmussen
Copy link
Member

Color can work, sure, I'd like to defer to another developer like Riad on whether this is the right approach.

My instinct is that this is a local hack, that can be okay to have temporarily assuming we contribute the change to WordPress core itself as well. So it might need a core trac patch as well.

@youknowriad
Copy link

Same thought as @jasmussen Can we make this a core patch?

I was also checking this with @richtabor and he mentioned the possibility of not using a third color (or just reusing the same blue color for second and third colors)

@@ -0,0 +1,95 @@
$menu-submenu-focus-text: #7b90ff !important;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the !important necessary here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was afraid it loses to Core's, but it turns out it works out just fine, removed!

lsl
lsl previously approved these changes Oct 14, 2024
Copy link
Contributor

@lsl lsl left a comment

Choose a reason for hiding this comment

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

LGTM

@fushar
Copy link
Contributor Author

fushar commented Oct 14, 2024

I was also checking this with @richtabor and he mentioned the possibility of not using a third color (or just reusing the same blue color for second and third colors)

@youknowriad @richtabor I tried reusing the second color but it makes the text somehow unreadable on hover due to bad contrast against the black background, see:

I'm not a designer but my gut says to keep the third color, what do you think?

This PR Reusing second color
image image
image image

@fushar
Copy link
Contributor Author

fushar commented Oct 14, 2024

this is a local hack, that can be okay to have temporarily assuming we contribute the change to WordPress core itself as well. So it might need a core trac patch as well.

Same thought as @jasmussen Can we make this a core patch?

Yup, I'll make an upstream Core patch after we agree on the colors.

In dotcom, we need to update the color scheme on Calypso as well anyway, so I think it's better to update dotcom first (we can control the deployment timing). Then after Core patch is merged and shipped, we revert the hack.

@jasmussen
Copy link
Member

Then after Core patch is merged and shipped, we revert the hack.

Do you have a process for tracking this, so the drift doesn't build up over time?

@arthur791004
Copy link
Contributor

arthur791004 commented Oct 14, 2024

In dotcom, we need to update the color scheme on Calypso as well anyway, so I think it's better to update dotcom first (we can control the deployment timing). Then after Core patch is merged and shipped, we revert the hack.

IMHO it would be better to update Core first to avoid inconsistency because it's not a bug and it might take time to discuss whether it makes sense to change the color of Modern in Core 🤔 People may love to use “Modern” because of the green color...

@nuriapenya
Copy link

nuriapenya commented Oct 14, 2024

@youknowriad @richtabor I tried reusing the second color but it makes the text somehow unreadable on hover due to bad contrast against the black background, see. I'm not a designer but my gut says to keep the third color, what do you think?

If we want to reuse the Blueberry, we could consider using it as a background color + white font, as we have it in an active state on the navigation items. It ensures consistency and accessibility, but it's quite heavy on sight as an interaction. So I am not sure 100%, but just as an alternative:

screen 2024-10-14 at 12 29 49

@fushar
Copy link
Contributor Author

fushar commented Oct 14, 2024

If we want to reuse the Blueberry, we could consider using it as a background color + white font, as we have it in an active state on the navigation items. It ensures consistency and accessibility, but it's quite heavy on sight as an interaction.

Thanks @nuriapenya for the alternative solution! I just checked all existing color schemes, and I found none of them have this pattern of using the same hover background color as the active menu background color. So, not sure if we want this 🤔

@fushar
Copy link
Contributor Author

fushar commented Oct 14, 2024

Hi folks, I think I just discovered a conclusive solution. So if you are logged in to WordPress.org, you will see the Blueberry 2 (#7b90ff) font color as the hover state, which is exactly what is being proposed in this PR:

image

Let's go with this. I guess as the next step I'll propose a patch in Core and stop overriding in dotcom as suggested here pfsHM7-1qe-p2#comment-1790.

@fushar
Copy link
Contributor Author

fushar commented Oct 14, 2024

Added a Core patch: https://core.trac.wordpress.org/ticket/62219

@youknowriad / @jasmussen let me know if this patch is good; I've never landed a patch in Core! 😄

Do you have a process for tracking this, so the drift doesn't build up over time?

I'll keep this parent issue:

open until that patch is accepted, and most likely will just close out this PR soon.

@fushar fushar closed this Oct 15, 2024
@github-actions github-actions bot removed the [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! label Oct 15, 2024
@youknowriad
Copy link

Patch is great, we might want to wait a few days to land it because I believe we're in beta period for 6.7 and we didn't branch yet (create a dedicated branch for 6.7) which means trunk is closed for enhancements at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Masterbar WordPress.com Toolbar and Dashboard customizations [Package] Masterbar
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants