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 Page: switch to @wordpress/date in Stats dashboard #17343

Merged
merged 2 commits into from
Oct 13, 2020

Conversation

jeherve
Copy link
Member

@jeherve jeherve commented Oct 1, 2020

Follow-up to #17321

Changes proposed in this Pull Request:

  • This should allow for better translations and date formatting in i18n languages for all date labels in the Stats graph of the Jetpack dashboard.

Before (note the untranslated dates and months)

screenshot 2020-10-01 at 14 08 32

screenshot 2020-10-01 at 14 08 24

After

screenshot 2020-10-01 at 14 14 29

screenshot 2020-10-01 at 14 14 08

screenshot 2020-10-01 at 14 13 04

Jetpack product discussion

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

  • No

Testing instructions:

You'll need an active site with some stats to be able to test things.

  • Go to Jetpack > Dashboard
  • Check the different views of the Stats graph (day / week / month)
  • Check the dates in all labels and axis; they should be formatted properly.
  • Check the "Best day" item at the bottom of the stats graph; that day should be formatted according to the settings under Settings > General.
  • If you switch to a different language, that date should change to use the new language.

Proposed changelog entry for your changes:

  • Dashboard: improve the display of dates in the Stats graph.

Follow-up to #17321

This should allow for better translations and date formatting in i18n languages for all date labels in the Stats graph of the Jetpack dashboard.
@jeherve jeherve added [Feature] Stats Data Feature that enables users to track their site's traffic and gain insights on popular content. [Status] In Progress [Focus] i18n Internationalization / i18n, adaptation to different languages Admin Page React-powered dashboard under the Jetpack menu [Type] Janitorial [Pri] Normal labels Oct 1, 2020
@jeherve jeherve added this to the 9.1 milestone Oct 1, 2020
@jeherve jeherve self-assigned this Oct 1, 2020
@jetpackbot
Copy link

jetpackbot commented Oct 1, 2020

Scheduled Jetpack release: November 3, 2020.
Scheduled code freeze: October 27, 2020

E2E results is available here (for debugging purposes): https://jetpack-e2e-dashboard.herokuapp.com/pr-17343

Thank you for the great PR description!

When this PR is ready for review, please apply the [Status] Needs Review label. If you are an a11n, please have someone from your team review the code if possible. The Jetpack team will also review this PR and merge it to be included in the next Jetpack release.

Generated by 🚫 dangerJS against 9ae0739

@jeherve jeherve added [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. and removed [Status] In Progress labels Oct 1, 2020
kbrown9
kbrown9 previously approved these changes Oct 9, 2020
Copy link
Member

@kbrown9 kbrown9 left a comment

Choose a reason for hiding this comment

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

This works well for me! I tested with a few different languages, and they worked well.

I left an in-line suggestion about a comma in longMonthYearFormat. It's not a blocker, so if you disagree with my suggestion, feel free to merge.

@kbrown9 kbrown9 added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Oct 9, 2020
Co-authored-by: Kim Brown <50059399+kbrown9@users.noreply.github.com>
@jeherve jeherve added [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. and removed [Status] Ready to Merge Go ahead, you can push that green button! labels Oct 12, 2020
Copy link
Member

@kbrown9 kbrown9 left a comment

Choose a reason for hiding this comment

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

This works well for me!

@kbrown9 kbrown9 added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Oct 13, 2020
@jeherve jeherve merged commit 8791925 into master Oct 13, 2020
@jeherve jeherve deleted the update/aag-moment-date branch October 13, 2020 06:41
@matticbot matticbot added [Status] Needs Changelog and removed [Status] Ready to Merge Go ahead, you can push that green button! labels Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Admin Page React-powered dashboard under the Jetpack menu [Feature] Stats Data Feature that enables users to track their site's traffic and gain insights on popular content. [Focus] i18n Internationalization / i18n, adaptation to different languages [Pri] Normal [Type] Janitorial
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants