Commit 5bff16b
committed
Dashboard: Improved chart responsiveness, code cleanup (#7801)
<!--
## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"
If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):
## Notes for the reviewer
Anything important to call out? Be sure to also clarify these in your comments.
## How to test
Unit tests, playground, etc.
-->
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on enhancing the analytics components by improving the handling of date ranges, adding responsive search parameters, and refactoring several components for better performance and usability.
### Detailed summary
- Removed `range-selector.tsx` and refactored date handling.
- Updated `todayDate` calculation for timezone issues.
- Added `isPending` state to `EcosystemWalletsSummary` and other components.
- Converted several components to async functions.
- Introduced `ResponsiveTimeFilters` for better date range selection.
- Enhanced `TransactionsChartCard` and `TotalSponsoredChartCard` with chain mapping.
- Improved loading states using `ResponsiveSuspense`.
- Refactored `AppHighlightsCard` into `ProjectHighlightsCard` for better usability.
> The following files were skipped due to too many changes: `apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/page.tsx`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **New Features**
* Introduced responsive and modular time filter controls for analytics dashboards.
* Added new highlights cards for team and project analytics, providing aggregated metrics in a combined bar chart format.
* Added a new combined bar chart card for gas sponsorship data with dynamic chart selection.
* Added components that map transaction and sponsorship data with chain metadata for improved analytics detail.
* **Refactor**
* Replaced multiple analytics and chart components with streamlined, asynchronous, and responsive variants.
* Standardized date range and interval filtering using a centralized utility and responsive providers.
* Updated chart selection to use in-app state and callbacks instead of URL-based navigation.
* Simplified analytics page layouts by replacing Suspense with responsive suspense components.
* Externalized data processing and state management from several chart card components to improve modularity.
* Removed deprecated components and replaced them with updated responsive and async implementations.
* **Bug Fixes**
* Improved handling of date ranges and intervals, ensuring accurate and consistent filtering.
* **Chores**
* Removed unused or redundant components and consolidated stories for better maintainability.
* Cleaned up imports and type definitions across analytics and project overview pages.
* **Style**
* Enhanced button and layout styling for chart selection and analytics cards.
* **Documentation**
* Updated interactive stories for analytics components to improve clarity and usability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 8bb2b0a commit 5bff16b
File tree
23 files changed
+1102
-898
lines changed- apps/dashboard/src
- @/components/analytics
- app/(app)/team
- [team_slug]
- (team)
- _components
- ~
- analytics
- ecosystem/[slug]/(active)/analytics
- components
- [project_slug]/(sidebar)
- components
- EngineCloudChartCard
- RpcMethodBarChartCard
- Transactions
- overview
- wallets
- analytics/chart
- components/Analytics
23 files changed
+1102
-898
lines changedLines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
88 | | - | |
| 89 | + | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
| |||
Lines changed: 0 additions & 104 deletions
This file was deleted.
Lines changed: 55 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
Lines changed: 44 additions & 47 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
13 | 28 | | |
14 | 29 | | |
15 | 30 | | |
| 31 | + | |
| 32 | + | |
16 | 33 | | |
| 34 | + | |
17 | 35 | | |
18 | 36 | | |
19 | | - | |
20 | | - | |
| 37 | + | |
21 | 38 | | |
22 | 39 | | |
23 | 40 | | |
| 41 | + | |
24 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
25 | 49 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 50 | + | |
33 | 51 | | |
34 | 52 | | |
35 | 53 | | |
| |||
55 | 73 | | |
56 | 74 | | |
57 | 75 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | 76 | | |
88 | 77 | | |
89 | 78 | | |
| |||
106 | 95 | | |
107 | 96 | | |
108 | 97 | | |
109 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
110 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
111 | 110 | | |
112 | 111 | | |
113 | 112 | | |
114 | 113 | | |
115 | | - | |
116 | 114 | | |
117 | | - | |
118 | 115 | | |
119 | 116 | | |
120 | 117 | | |
| |||
0 commit comments