-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add WordAds Payment History #25174
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
base: task/add-chart-view-ads-p2
Are you sure you want to change the base?
Add WordAds Payment History #25174
Conversation
Generated by 🚫 Danger |
| totalAmountOwed = earningsContainer.totalAmountOwed.value | ||
|
|
||
| // Convert dictionary to sorted array | ||
| var earnings = earningsContainer.wordads.compactMap { (period, data) -> MonthlyEarning? in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll review this part tomorrow again. Ran out of time today. The rest should be good.
|
| App Name | WordPress | |
| Configuration | Release-Alpha | |
| Build Number | 30623 | |
| Version | PR #25174 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | d6ae5b3 | |
| Installation URL | 3hotditnt1oa0 |
|
| App Name | Jetpack | |
| Configuration | Release-Alpha | |
| Build Number | 30623 | |
| Version | PR #25174 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | d6ae5b3 | |
| Installation URL | 495cq9fkcvdmo |
🤖 Build Failure AnalysisThis build has failures. Claude has analyzed them - check the build annotations for details. |
9a35315 to
227c3e5
Compare
227c3e5 to
120a3b8
Compare
| .background(Constants.Colors.background) | ||
| .environment(\.context, context) | ||
| .environment(\.router, router) | ||
| .onAppear { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use .task, so that you don't have to manually create Task?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's simpler. Updated.
| components.month = earning.period.month | ||
| components.day = 1 | ||
|
|
||
| guard let date = Calendar.current.date(from: components) else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the earning.period in the site timezone?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The time zone is irrelevant. It only needs to display year and month. This code creates Date in your local timezone and formats it in your local timezone, so there is no drift.
| } | ||
|
|
||
| var formattedAmount: String { | ||
| earning.amount.formatted(.currency(code: "USD")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Looks like we can use the same code to replace the NumberFormatter code above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I switch to formatted in other places. It's clear and I think it's faster too.
|
Hey, thanks for the feedback. I addressed it, and I also slightly improved how the header card looks (see screenshot) and added analytics. It should be good now. |
|





Closes CMM-1132: Add WordAds revenue stats to Jetpack app.
This PR adds "Total Payment" and "Payment History" cards.