Skip to content

Stats Review: Add ChartCard, TopListCard, StandaloneChartView (P12) #24724

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

Open
wants to merge 1 commit into
base: review/add-charts
Choose a base branch
from

Conversation

kean
Copy link
Contributor

@kean kean commented Aug 5, 2025

This PR adds the actual cards. The cards load the data and manage its presentation. The more challenging bit was to get it to stagger the reloads in the case the user taps quickly on "backward" or "forward" button.

I put both charts in the same PR as there are many similarities between them.

This PR also contains StandaloneChartCard which is used on the PostStatsView. This component could be improved as there is likely something to reuse with the other cards.

I also included TopListScreenView that opened when you tap "Show All" on the "Top List" card:

Screenshot 2025-08-05 at 11 24 37 AM

@kean kean added this to the Pending milestone Aug 5, 2025
@kean kean added the Stats label Aug 5, 2025
@kean kean mentioned this pull request Aug 5, 2025
14 tasks
@dangermattic
Copy link
Collaborator

1 Warning
⚠️ This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by 🚫 Danger

Copy link

sonarqubecloud bot commented Aug 5, 2025

isStale = false
chartData = data
} catch is CancellationError {
return
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you'd want to set the isLoading = false here. Or, you could add defer { isLoading = false } to the top of the function, and don't need to worry about early returns.

cachedCountriesMapData = nil
}
} catch is CancellationError {
return
Copy link
Contributor

Choose a reason for hiding this comment

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

Potentially missed isLoading = false here too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants