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

Stats: fix dashboard header/tab alignment #96685

Merged
merged 2 commits into from
Nov 26, 2024
Merged

Conversation

myhro
Copy link
Contributor

@myhro myhro commented Nov 22, 2024

Closes Automattic/red-team#256.

Proposed Changes

Fix the alignment of the header and navigation tabs in the Stats dashboard on Calypso Blue.

Why are these changes being made?

These changes are being implemented to align the header and navigation tabs with the similar design found in the WP Admin dashboard.

Testing Instructions

  • In a local or Calypso live environment, navigate to the Stats section in the sidebar of a given site.
    • This can also be tested using a Jurassic Ninja site, such as /stats/day/artistic-ukulele-worm.jurassic.ninja.
  • Check the alignment of the Traffic / Insights / Subscribers navigation bar compared to the Jetpack Stats header.
Before After
image image

Note

The length of the underline highlighting the active tab has been shortened slightly. This adjustment reflects the fact that the first item is no longer centered in its column. However, this behavior is consistent with what is observed in WP Admin:

WP Admin
image

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@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.

@myhro myhro requested a review from a team November 22, 2024 20:21
@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 22, 2024
Copy link
Contributor

@Initsogar Initsogar left a comment

Choose a reason for hiding this comment

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

Looks good to me. Tested on different resolutions and all seems good.

CleanShot 2024-11-25 at 14 13 08@2x

As mentioned in the ticket, it looks similar to wp-admin.

CleanShot 2024-11-25 at 14 14 10@2x

@myhro
Copy link
Contributor Author

myhro commented Nov 25, 2024

Thanks for the review, @Initsogar!

I'm holding on merging/deploying, as @kangzj might want to test it further.

@myhro myhro requested a review from kangzj November 25, 2024 19:35
Copy link
Contributor

@kangzj kangzj left a comment

Choose a reason for hiding this comment

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

Thanks @myhro for the fix. Happy for it to ship, but it'll be even better if you could take a look at the margin of the Jetpack log0 for screen width < 600px for Odyssey Stats. Thanks again for the fix.

image

@myhro
Copy link
Contributor Author

myhro commented Nov 25, 2024

@kangzj I've pushed a fix for the header alignment in Odyssey Stats. Can you please take a look again?

Before After
image image

@myhro myhro requested a review from kangzj November 25, 2024 22:38
@matticbot
Copy link
Contributor

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • blaze-dashboard
  • command-palette-wp-admin
  • help-center
  • notifications
  • odyssey-stats
  • whats-new

To test WordPress.com changes, run install-plugin.sh $pluginSlug fix/stats-tab-alignment on your sandbox.

Copy link
Contributor

@kangzj kangzj left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the fix 🚀

@myhro myhro merged commit 2cf6254 into trunk Nov 26, 2024
11 checks passed
@myhro myhro deleted the fix/stats-tab-alignment branch November 26, 2024 12:48
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants