-
Notifications
You must be signed in to change notification settings - Fork 619
Add Date Range and Interval Selector on Connect Analytics page #4988
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
Add Date Range and Interval Selector on Connect Analytics page #4988
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
|
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @MananTank and the rest of your teammates on |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4988 +/- ##
=======================================
Coverage 47.74% 47.74%
=======================================
Files 1059 1059
Lines 57328 57328
Branches 3944 3944
=======================================
Hits 27369 27369
Misses 29268 29268
Partials 691 691
*This pull request uses carry forward flags. Click here to find out more. |
size-limit report 📦
|
...oard/src/app/team/[team_slug]/[project_slug]/connect/analytics/ConnectAnalyticsDashboard.tsx
Outdated
Show resolved
Hide resolved
...oard/src/app/team/[team_slug]/[project_slug]/connect/analytics/ConnectAnalyticsDashboard.tsx
Outdated
Show resolved
Hide resolved
0fd4f70 to
ebeb42f
Compare
ebeb42f to
ef393ad
Compare
Merge activity
|
## Problem solved
Short description of the bug fixed or feature added
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on enhancing the date range selection functionality in the `PayAnalytics` and `ConnectAnalyticsDashboard` components by incorporating the `subDays` function and restructuring the date range handling.
### Detailed summary
- Added `subDays` import from `date-fns` for date calculations.
- Refactored `getLastNDaysRange` to use `subDays` for calculating past dates.
- Moved and restructured the `presets` rendering logic in `Filters` for clarity.
- Introduced `DateRangeSelector` and `IntervalSelector` components in `ConnectAnalyticsDashboard`.
- Replaced `useMemo` with `useState` for managing date ranges in `ConnectAnalyticsDashboard`.
- Simplified date range handling and interval type selection.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
ef393ad to
d7e34f2
Compare

Problem solved
Short description of the bug fixed or feature added
PR-Codex overview
This PR focuses on enhancing the
PayAnalyticsandConnectAnalyticsDashboardcomponents by improving date handling and adding new date range selection features.Detailed summary
subDaysimport fromdate-fnsfor date calculations.getLastNDaysRangeto usesubDaysfor calculating past dates.Filterscomponent to include a header with aSelectfor date presets.DateRangeSelectorandIntervalSelectorcomponents inConnectAnalyticsDashboard.ConnectAnalyticsDashboard.