Commit 17b8368
committed
Dashboard: Improve Progress bar implmentation with useTransition hook (#6769)
<!--
## 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 refines the `useDashboardRouter` functionality by implementing a progress bar during route transitions and removing the use of `LoadingRouteHref`. It introduces `RouteStartTransitionFn` for managing transition states and modifies the `DashboardRouterTopProgressBar` to reflect these changes.
### Detailed summary
- Removed `usePathname` and `useSearchParams` from `useRouterLoadingStatus`.
- Replaced `LoadingRouteHref` with `RouteStartTransitionFn` for managing transition states.
- Updated `replace` and `push` methods in `useDashboardRouter` to use `startTransition`.
- Refactored `DashboardRouterTopProgressBarInner` to use `isRouteLoading`.
- Adjusted progress bar visibility and state management based on `isRouteLoading`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->1 parent 8ee427d commit 17b8368
1 file changed
+29
-49
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | | - | |
18 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
21 | 29 | | |
22 | 30 | | |
23 | 31 | | |
24 | 32 | | |
25 | 33 | | |
26 | | - | |
27 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
28 | 37 | | |
29 | 38 | | |
30 | | - | |
31 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
32 | 42 | | |
33 | 43 | | |
34 | | - | |
| 44 | + | |
35 | 45 | | |
36 | 46 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 47 | + | |
49 | 48 | | |
50 | | - | |
| 49 | + | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
| 53 | + | |
| 54 | + | |
60 | 55 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | 56 | | |
67 | | - | |
68 | 57 | | |
69 | 58 | | |
70 | 59 | | |
71 | 60 | | |
72 | | - | |
| 61 | + | |
73 | 62 | | |
74 | 63 | | |
75 | 64 | | |
| |||
85 | 74 | | |
86 | 75 | | |
87 | 76 | | |
88 | | - | |
| 77 | + | |
89 | 78 | | |
90 | 79 | | |
91 | 80 | | |
| |||
112 | 101 | | |
113 | 102 | | |
114 | 103 | | |
115 | | - | |
| 104 | + | |
116 | 105 | | |
117 | | - | |
| 106 | + | |
118 | 107 | | |
119 | 108 | | |
120 | 109 | | |
121 | 110 | | |
122 | | - | |
| 111 | + | |
123 | 112 | | |
124 | 113 | | |
125 | 114 | | |
| |||
128 | 117 | | |
129 | 118 | | |
130 | 119 | | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
0 commit comments