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] Add year to date picker for weeks. #20589

Merged
merged 3 commits into from
Apr 9, 2024
Merged

Conversation

notandyvee
Copy link
Contributor

Fixes #20488

Add year to the week granularity label in datepicker. The screenshot below is on a small screen width.

Note: this affects both the stats that is currently out to everyone and the traffic tab under the week granularity.

Screenshot_20240403_172130


To Test:

  • Turn on stats_traffic_tab feature flag in debug settings.
  • Go to stats and make sure you are on the traffic tab
  • Select the "By Week" granularity.
  • You should see a year on the from/to dates.
  • Turn off stats_traffic_tab.
  • Go back into stats and go to the weeks tab.
  • The date picker there should also have the year.

Regression Notes

  1. Potential unintended areas of impact

    This would only affect adding the year to the date picker label on the old stats week granularity.

  2. What I did to test those areas of impact (or what existing automated tests I relied on)

    Manual test.

  3. What automated tests I added (or what prevented me from doing so)

    n/a


PR Submission Checklist:

  • I have completed the Regression Notes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@notandyvee notandyvee added this to the 24.7 milestone Apr 3, 2024
@notandyvee notandyvee requested a review from irfano April 3, 2024 21:23
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Apr 3, 2024

WordPress📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress WordPress
FlavorJalapeno
Build TypeDebug
Versionpr20589-6ab59a0
Commit6ab59a0
Direct Downloadwordpress-prototype-build-pr20589-6ab59a0.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Apr 3, 2024

Jetpack📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack Jetpack
FlavorJalapeno
Build TypeDebug
Versionpr20589-6ab59a0
Commit6ab59a0
Direct Downloadjetpack-prototype-build-pr20589-6ab59a0.apk
Note: Google Login is not supported on these builds.

Copy link
Member

@irfano irfano left a comment

Choose a reason for hiding this comment

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

@notandyvee , can we make this change for only the traffic tab by checking stats_traffic_tab flag. The iOS is also doing it this way.
Additionally, I noticed that StatsDateFormatterTest is failing.

@notandyvee
Copy link
Contributor Author

can we make this change for only the traffic tab by checking stats_traffic_tab flag. The iOS is also doing it this way

That's fine. I'll make the changes.

…arity.

Additionally fixing some test failures.
Copy link

codecov bot commented Apr 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 40.34%. Comparing base (15001b9) to head (6ab59a0).
Report is 98 commits behind head on trunk.

Additional details and impacted files
@@           Coverage Diff           @@
##            trunk   #20589   +/-   ##
=======================================
  Coverage   40.34%   40.34%           
=======================================
  Files        1473     1473           
  Lines       67875    67877    +2     
  Branches    11224    11224           
=======================================
+ Hits        27386    27387    +1     
- Misses      38023    38024    +1     
  Partials     2466     2466           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@notandyvee
Copy link
Contributor Author

@irfano ready for re-review. Fixed the unit tests and added the feature flag check.

Copy link

sonarqubecloud bot commented Apr 9, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Member

@irfano irfano left a comment

Choose a reason for hiding this comment

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

LGTM! 👍🏻

@irfano irfano merged commit 140e713 into trunk Apr 9, 2024
20 checks passed
@irfano irfano deleted the andy/wp-android-issue-20488 branch April 9, 2024 21:24
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.

Stats Traffic tab dates should include year
3 participants