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

Admin bar: move the Reader admin bar item to the secondary group #38976

Merged
merged 12 commits into from
Aug 23, 2024

Conversation

allilevine
Copy link
Member

@allilevine allilevine commented Aug 20, 2024

Fixes Automattic/wp-calypso#93534

Proposed changes:

  • Move the Reader admin bar item to the right side of the admin bar (the secondary group).
  • Give the Help Center item a priority.

Simple before:
Screen Shot 2024-08-21 at 4 45 12 PM

Simple this branch:
Screen Shot 2024-08-21 at 4 44 58 PM

Atomic before:
Screen Shot 2024-08-21 at 4 53 14 PM

Atomic this branch:
Screen Shot 2024-08-21 at 4 53 38 PM

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

Automattic/wp-calypso#93534

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

N/A

Testing instructions:

  • To test on WoA, go to the Plugins menu on a WordPress.com Atomic 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/admin-menu-reader-placement branch.
  • Also add define( 'JETPACK_MU_WPCOM_LOAD_VIA_BETA_PLUGIN', true ); to your wp-config.php file.
  • Go to WP Admin.
  • Verify that the Reader menu item is on the right, to the left of Help Center.
  • Check that clicking the Reader item takes you to the Reader.
  • Test on mobile screen sizes.
  • Test on supported browsers.
  • Test with different color schemes.
  • Test with a RTL language.
  • Repeat the testing steps with a Simple site. To test on Simple, run the following command on your sandbox:

bin/jetpack-downloader test jetpack-mu-wpcom-plugin update/admin-menu-reader-placement

Copy link
Contributor

github-actions bot commented Aug 20, 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!


Mu Wpcom plugin:

  • Next scheduled release: WordPress.com Simple releases happen daily.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Wpcomsh plugin:

  • Next scheduled release: on demand (usually Mondays if not sooner).

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

Copy link
Contributor

github-actions bot commented Aug 20, 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/admin-menu-reader-placement 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-mu-wpcom-plugin update/admin-menu-reader-placement
    

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

@allilevine allilevine force-pushed the update/admin-menu-reader-placement branch from fa4f4e5 to 25460c9 Compare August 20, 2024 18:35
@@ -100,7 +100,8 @@ function ( $wp_admin_bar ) {
),
)
);
}
},
119
Copy link
Member Author

Choose a reason for hiding this comment

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

Order the help center after the Reader, but before Notifications.

'class' => 'wp-admin-bar-reader',
),
'parent' => 'top-secondary',
Copy link
Member Author

Choose a reason for hiding this comment

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

Add the Reader to the secondary admin bar group.

'href' => maybe_add_origin_site_id_to_url( 'https://wordpress.com/read' ),
'meta' => array(
'id' => 'reader',
'title' => '<span class="ab-icon" aria-hidden="true"></span><span class="screen-reader-text">' .
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm following the example of the W logo here.

@allilevine allilevine changed the title Update/admin menu reader placement Admin bar: move the Reader admin bar item to the secondary group Aug 20, 2024
Copy link
Contributor

@fushar fushar left a comment

Choose a reason for hiding this comment

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

Can we fix the gap between Reader and Help Center icon? On >480px mobile width, it seems to have narrower gap than the others:

image

@allilevine
Copy link
Member Author

Can we fix the gap between Reader and Help Center icon? On >480px mobile width, it seems to have narrower gap than the others:

image

Thanks, I'll take a look!

@allilevine allilevine force-pushed the update/admin-menu-reader-placement branch from 2ebfb24 to 439edd7 Compare August 21, 2024 17:28
@allilevine
Copy link
Member Author

@fushar I pushed a change, let me know how it looks. I changed both < 782px and < 480px styles to get it to match the Help Center - Notifications gap.

Screen Shot 2024-08-21 at 2 47 06 PM

@github-actions github-actions bot added [Plugin] mu wpcom jetpack-mu-wpcom plugin [Plugin] Wpcomsh labels Aug 21, 2024
@allilevine allilevine force-pushed the update/admin-menu-reader-placement branch from 86c26fa to 5bc75d1 Compare August 21, 2024 20:27
fushar
fushar previously approved these changes Aug 22, 2024
Copy link
Contributor

@fushar fushar left a comment

Choose a reason for hiding this comment

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

I pushed a small CSS fix.

It's now pixel perfect with Calypso on various screen widths! Tested on Atomic and Simple as well.

@allilevine
Copy link
Member Author

I pushed a small CSS fix.

It's now pixel perfect with Calypso on various screen widths! Tested on Atomic and Simple as well.

Looks great, thanks @fushar!

Copy link
Contributor

@Addison-Stavlo Addison-Stavlo left a comment

Choose a reason for hiding this comment

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

This looks good to me!

Non blocking - there are minor differences in styles compared to the calypso PR. Note on mobile that there is an extra padding division between the reader and the help center in wp-admin but not calypso. And the calypso one is a little wider. But these are very minor things I wouldn't expect folks to notice.

minor-differences

Addison-Stavlo
Addison-Stavlo previously approved these changes Aug 22, 2024
Copy link
Contributor

@Addison-Stavlo Addison-Stavlo left a comment

Choose a reason for hiding this comment

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

WFM! Tested simple and atomic.

@allilevine
Copy link
Member Author

Non blocking - there are minor differences in styles compared to the calypso PR. Note on mobile that there is an extra padding division between the reader and the help center in wp-admin but not calypso. And the calypso one is a little wider. But these are very minor things I wouldn't expect folks to notice.

I'll timebox and see if there's a fix.

@allilevine allilevine dismissed stale reviews from Addison-Stavlo and fushar via 03711e2 August 22, 2024 18:32
@allilevine
Copy link
Member Author

@Addison-Stavlo I moved the padding to the inner span and I'm now seeing the same width as Calypso, no gap:

Screen.Recording.2024-08-22.at.2.37.32.PM.mov

@fushar fushar force-pushed the update/admin-menu-reader-placement branch from 871ecbd to abc5bf9 Compare August 23, 2024 04:17
fushar
fushar previously approved these changes Aug 23, 2024
Copy link
Contributor

@fushar fushar left a comment

Choose a reason for hiding this comment

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

I pushed a small fix. It's now consistent with the corresponding Calypso PR 👍

783px

wp-admin image
Calypso image
image

600px

wp-admin image
Calypso image
image

400px

wp-admin image
Calypso image
image

350px

wp-admin image
Calypso image

arthur791004
arthur791004 previously approved these changes Aug 23, 2024
Copy link
Contributor

@arthur791004 arthur791004 left a comment

Choose a reason for hiding this comment

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

Nice 👍

@fushar fushar dismissed stale reviews from arthur791004 and themself via 58f828b August 23, 2024 04:33
@fushar fushar force-pushed the update/admin-menu-reader-placement branch from abc5bf9 to 58f828b Compare August 23, 2024 04:33
fushar
fushar previously approved these changes Aug 23, 2024
@allilevine allilevine merged commit 1a961a8 into trunk Aug 23, 2024
55 checks passed
@allilevine allilevine deleted the update/admin-menu-reader-placement branch August 23, 2024 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reader - move admin bar link to the right side of the masterbar
4 participants