WordPress-Android
WordPress-Android copied to clipboard
Stats traffic by week chart
Fixes #19951
Adds bar graphs for Week, Month, and Year granularity
| Day | Week | Month | Year |
|---|---|---|---|
To Test:
Test 1:
- Enable
stats_traffic_tabfeature flag (Me -> Debug settings - Remote Features) - Go to Stats
Verifyonly Traffic tab, and Insights tabs are shown as in after columnSwitchto Traffic tab if not on it alreadySelectBy day from the drop-downVerifythat Today card is shown in the image aboveSelectBy week from the drop-downVerifya Bar chart is shown with seven bars for 7 days in a week
[!NOTE] This is still work in progress. Date selector, and graphs need to be in sync You may also check
By month, andBy yearoptions from the drop-down
Test 2:
- Disable feature flag
VerifyStats tabs all show up, and work as before
Regression Notes
-
Potential unintended areas of impact
- Behind feature flag
-
What I did to test those areas of impact (or what existing automated tests I relied on)
- Tested
-
What automated tests I added (or what prevented me from doing so)
- Updated existing unit tests
PR Submission Checklist:
- [x] I have completed the Regression Notes.
- [x] I have considered adding accessibility improvements for my changes.
- [x] I have considered if this change warrants user-facing release notes and have added them to
RELEASE-NOTES.txtif necessary.
Testing Checklist:
- [ ] WordPress.com sites and self-hosted Jetpack sites.
- [ ] Portrait and landscape orientations.
- [ ] Light and dark modes.
- [ ] Fonts: Larger, smaller and bold text.
- [ ] High contrast.
- [ ] Talkback.
- [ ] Languages with large words or with letters/accents not frequently used in English.
- [ ] Right-to-left languages. (Even if translation isnβt complete, formatting should still respect the right-to-left layout)
- [ ] Large and small screen sizes. (Tablet and smaller phones)
- [ ] Multi-tasking: Split screen and Pop-up view. (Android 10 or higher)
| 7 Warnings | |
|---|---|
| :warning: | This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews. |
| :warning: | Class TrafficOverviewMapper is missing tests, but unit-tests-exemption label was set to ignore this. |
| :warning: | Class SelectedType is missing tests, but unit-tests-exemption label was set to ignore this. |
| :warning: | Class TrafficOverviewUseCase is missing tests, but unit-tests-exemption label was set to ignore this. |
| :warning: | Class UiState is missing tests, but unit-tests-exemption label was set to ignore this. |
| :warning: | Class TrafficOverviewUseCaseFactory is missing tests, but unit-tests-exemption label was set to ignore this. |
| :warning: | Class BarChartLabelFormatter is missing tests, but unit-tests-exemption label was set to ignore this. |
Generated by :no_entry_sign: Danger
π² You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
| App Name | WordPress |
|
| Flavor | Jalapeno | |
| Build Type | Debug | |
| Version | pr20188-91312d4 | |
| Commit | 91312d43b152f292530586951f2009e70feb12a5 | |
| Direct Download | wordpress-prototype-build-pr20188-91312d4.apk |
π² You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
| App Name | Jetpack |
|
| Flavor | Jalapeno | |
| Build Type | Debug | |
| Version | pr20188-91312d4 | |
| Commit | 91312d43b152f292530586951f2009e70feb12a5 | |
| Direct Download | jetpack-prototype-build-pr20188-91312d4.apk |
Codecov Report
Attention: Patch coverage is 0.67114% with 296 lines in your changes are missing coverage. Please review.
Project coverage is 40.23%. Comparing base (
bf356dd) to head (91312d4). Report is 26 commits behind head on trunk.
Additional details and impacted files
@@ Coverage Diff @@
## trunk #20188 +/- ##
==========================================
- Coverage 40.37% 40.23% -0.14%
==========================================
Files 1469 1472 +3
Lines 67691 67912 +221
Branches 11209 11244 +35
==========================================
- Hits 27327 27325 -2
- Misses 37864 38088 +224
+ Partials 2500 2499 -1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
LineChartLabelFormatter was crashing on my local. The reason might be the time zone difference between my home and the site. I fixed it: https://github.com/wordpress-mobile/WordPress-Android/pull/20188/commits/82c142dd8c3b08d39300e4c8040be72b8aa9a2de
The date selector, overview card, and chart are working as expected after my latest commits. Now, we can see and test all chart types in this PR.
- I think we can address Andy's comments, and
- update the UI of the card with the latest design (p1708598484003149/1708374772.289219-slack-C06BR07TJHK),
then close this PR. There is an issue with loading the previous dates; the cards display wrong values for a very short time before showing the correct value. I'll look at it in a separate PR.
then close this PR. There is an issue with loading the previous dates; the cards display wrong values for a very short time before showing the correct value. I'll look at it in a separate PR.
Nice work π₯ Sounds good π. There could also be some stylistic issues that can be fixed in separate PR after Chris review.
The change LGTM! I'm approving the PR, but I removed
Fixes #19951from the description since the issue needs 2 more tasks:
- [x] Design updates from the notes I explained in the screenshot.
Updated the color, the margin is required, otherwise the Y axis values are being cut of higher value range, probably it's looking better without being edge-to-edge.