-
Notifications
You must be signed in to change notification settings - Fork 69
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
Reporting: Preset date range selector for payment gateway widget #8910
Reporting: Preset date range selector for payment gateway widget #8910
Conversation
Test the buildOption 1. Jetpack Beta
Option 2. Jurassic Ninja - available for logged-in A12s🚀 Launch a JN site with this branch 🚀 ℹ️ Install this Tampermonkey script to get more options. Build info:
Note: the build is updated when a new commit is pushed to this PR. |
Size Change: +610 B (0%) Total Size: 1.25 MB
ℹ️ View Unchanged
|
…te-selector-for-payment-widget
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.
While we can integrate the selector implemented as part of #8896 in a separate PR, can we align this PR to the design more closely?
At present this PR appears to have two components, a selector and a label
Many date related functions and logic have been added to the Payment Activity Component.
Could we instead have a single selector component with the following options:
- Today: June 6, 2024
- Last 7 days: May 30 - June 5, 2024
- Last 4 weeks: May 9 - June 5, 2024
- Last 3 months: March 6 - June 5, 2024
- Last 12 months: June 6, 2023 - June 5, 2024
- Month to date: June 1 - June 6, 2024
- Quarter to date: April 1 - June 6, 2024
- Year to date: January 1 - June 6, 2024
- All time: Jan 1, 2024 - June 6, 2024
In this PR we could do it this way:
All date related functionality should be encapsulated in the date related component.
Using the selector from #8896 can be added in a separate PR.
Marking blocked, I think we're getting bogged down here and should focus on merging ⇒ adopting the new component (e.g. rework this PR or start new PR). |
We'll need a tracks event for when user changes the time period. Here's my proposal:
Feel free to iterate on the name & props, and update the registration if needed. I have work-in-progress event name & props in registration repo. |
Closing in favor of #8927 , where we have reworked and implemented this using the new |
Closing this in favor of #8927 |
Fixes part of #8734
Changes proposed in this Pull Request
What is not covered
Testing instructions
_wcpay_feature_payment_overview_widget
is enabledToday
should show only today's date and no end date ( check screenshot )Last 12 months
- It should show the year on both start and end date, since the years are differentScreenshots
Today
Different year for start and end
Same year for start and end
npm run changelog
to add a changelog file, choosepatch
to leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.Post merge