Skip to content

Conversation

@irfano
Copy link
Member

@irfano irfano commented May 7, 2024

This PR

before after description
adds title to the Subscribers chart card in loading state
handles empty state of Followers card (wordpress-mobile/WordPress-FluxC-Android#3005). Since all cards in error state now, the screen displays Retry button
Renames the chart card's title to "Subscriber Growth"
Add singular-plural "subscribers" label support to the marker view of the subscribers chart.

To Test:

  1. Log in.
  2. Set the airplane mode on your device.
  3. Open SUBSCRIBERS from "My Site → Stats".
  4. Verify that the Retry button id displayed instead of displaying "No data yet" message on the Subscribers card.
  5. Turn off airplane mode.
  6. Verify that the Subscribers chart card has a title in the loading state.

Regression Notes

  1. Potential unintended areas of impact

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

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

    • Not an important case for automated tests.

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.

Testing Checklist (strike-out the not-applying and unnecessary ones):

  • 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)

@wpmobilebot
Copy link
Contributor

wpmobilebot commented May 7, 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
Versionpr20776-e31a090
Commite31a090
Direct Downloadwordpress-prototype-build-pr20776-e31a090.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented May 7, 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
Versionpr20776-e31a090
Commite31a090
Direct Downloadjetpack-prototype-build-pr20776-e31a090.apk
Note: Google Login is not supported on these builds.

@codecov
Copy link

codecov bot commented May 7, 2024

Codecov Report

Attention: Patch coverage is 40.00000% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 40.66%. Comparing base (ce04048) to head (e31a090).
Report is 4 commits behind head on release/24.9.

Files Patch % Lines
...sections/subscribers/usecases/SubscribersMapper.kt 0.00% 1 Missing ⚠️
.../ui/stats/refresh/utils/LineChartLabelFormatter.kt 0.00% 1 Missing ⚠️
...ts/refresh/utils/SubscribersChartLabelFormatter.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##           release/24.9   #20776   +/-   ##
=============================================
  Coverage         40.66%   40.66%           
=============================================
  Files              1490     1490           
  Lines             68621    68621           
  Branches          11338    11338           
=============================================
  Hits              27907    27907           
  Misses            38195    38195           
  Partials           2519     2519           

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

@notandyvee
Copy link
Contributor

Code LGTM and everything works great. But one thing I noticed. Two cards have the same title, which is less than ideal. I recommend making it clearer. "Subscribers Chart", "Subscribers List", Etc. Since we are here.

subscribers-dupe

cc @staskus . This could be the same in iOS. Syncing between the two would be helpful. Or we can decide to ignore it. Up to y'all.

@aditi-bhatia
Copy link
Contributor

aditi-bhatia commented May 7, 2024

^ I agree with @notandyvee 's feedback, I thought it was strange at first that both cards have the same title - but then noticed that's how it was in the final designs as well.

In the earlier proposed designs (IqhXWz3Iir7RMb5XH5gGfZ-fi-108_4611), the name of that card was Subscriber Growth:

Screenshot 2024-05-07 at 4 10 21 PM

Maybe we could change it to that, any thoughts?

@staskus
Copy link
Contributor

staskus commented May 8, 2024

Thanks, @aditi-bhatia and @notandyvee, great observation. I think calling it Subscriber Growth would be appropriate 👍 I'll update it on iOS as well. cc @irfano

@irfano irfano changed the title Fix subcribers chart issues Fix subscribers chart issues May 8, 2024
@dangermattic
Copy link
Collaborator

dangermattic commented May 8, 2024

1 Warning
⚠️ This PR is assigned to the milestone 24.9 ❄️. The due date for this milestone has already passed.
Please assign it to a milestone with a later deadline or check whether the release for this milestone has already been finished.

Generated by 🚫 Danger

@irfano
Copy link
Member Author

irfano commented May 8, 2024

I also updated the title to the "Subscriber Growth" in this PR.

Copy link
Contributor

@aditi-bhatia aditi-bhatia left a comment

Choose a reason for hiding this comment

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

Changes look good to me and work as expected 👍 I left a small clarifying comment on the Flux-C PR related to this to get a better understanding before I approve: wordpress-mobile/WordPress-FluxC-Android#3005 (review)

@aditi-bhatia
Copy link
Contributor

Hi @irfano, I spent some time testing again today and there's a crash that I'm seeing from SubscribersChartLabelFormatter.kt. I'm only able to reproduce on one device with airplane mode on + I'm only seeing when testing with a blog with 0 subscribers (I've been using buddyuniversity.wordpress.com for this) :

Screenshot 2024-05-10 at 3 27 25 AM

I haven't debugged it too much yet (I can help with this tomorrow) but this is the value after setting a breakpoint:

Screenshot 2024-05-10 at 3 54 09 AM

@irfano
Copy link
Member Author

irfano commented May 10, 2024

I couldn't reproduce your crash, but I did fix another issue related to 0 subscribers case. It was crashing when tapping the line on sites with 0 subscribers. This might be related to the crash you're experiencing. I would appreciate it if you could find a way to reproduce it.

@aditi-bhatia
Copy link
Contributor

Hi @irfano, I can't seem to reproduce the crash I mentioned above which would occur after clicking on My Site -> Stats on airplane mode on a blog with 0 subscribers. Now, I'm seeing a different crash after clicking the chart:

Screenshot 2024-05-10 at 6 12 28 PM

To reproduce:

  • Load Stats with data on on a blog with 0 subscribers
  • Turn off data and access Stats -> Subscribers again
  • Click the blue line on the Subscribers Growth Chart

@irfano
Copy link
Member Author

irfano commented May 11, 2024

That's the crash I mentioned and fixed with my latest commit (9c581d3). Can you ensure that you pulled the latest commit?

@oguzkocer oguzkocer removed this from the 24.9 milestone May 13, 2024
@oguzkocer oguzkocer added this to the 25.0 milestone May 13, 2024
Copy link
Contributor

@aditi-bhatia aditi-bhatia left a comment

Choose a reason for hiding this comment

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

I used a fresh install last time but maybe something went wrong with the versioning since I'm not able to reproduce the crash today. Tested using a fresh install on two devices, lgtm 👍

@irfano
Copy link
Member Author

irfano commented May 13, 2024

@oguzkocer, sorry for the delay in making this ready before the code freeze. We should have let you know earlier. Can we include this in release/24.9?

@oguzkocer
Copy link
Contributor

@irfano Sure - but you'll need to wait a couple days for the beta as I just submitted it.

@irfano irfano changed the base branch from trunk to release/24.9 May 13, 2024 17:11
@irfano irfano modified the milestones: 25.0, 24.9 ❄️ May 13, 2024
@irfano
Copy link
Member Author

irfano commented May 13, 2024

Thank you!

but you'll need to wait a couple days

That's fine! This fixes required but minor issues. So, it won't disrupt the testing process until the next beta is released.

@irfano irfano requested a review from antonis May 22, 2024 13:47
@sonarqubecloud
Copy link

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
Contributor

@antonis antonis left a comment

Choose a reason for hiding this comment

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

Thank you for including a fix for #20864 in your PR @irfano 🙇
The code changes in e31a090 look good and the app works as expected 🎉

@irfano irfano linked an issue May 22, 2024 that may be closed by this pull request
@irfano irfano merged commit b8d617e into release/24.9 May 22, 2024
@irfano irfano deleted the fix/subcribers-chart-issues branch May 22, 2024 14:36
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.

IndexOutOfBoundsException: Index 1 out of bounds for length 1

9 participants