ui
ui copied to clipboard
refactor(charts): slow single page to fast multiple tabs (solve: #4308)
Description
- #4308
- I refactored slow single page using
<Tabs />component supported by shadcn/ui. - The result is pretty remarkable. See the following benchmark results.
- Total Blocking Time :
2720ms -> 1020ms(62.5% Improved) - Speed Index :
2.7s -> 1.3s(51.8% Improved)
System
- Google Chrome | 126.0.6478.185 (arm64)
- OS | macOS Version 14.5(Build 23F79)
- JavaScript | V8 12.6.228.28
- User Agent | Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Additional
- The only difference is you can't share the link with selected tab.
- related issue: #414
- I'm willing to contribute! Let me know if it's worth doing so.
As-Is
To-Be
@Henry-Hong is attempting to deploy a commit to the shadcn-pro Team on Vercel.
A member of the Team first needs to authorize it.
The only difference is you can't share the link with selected tab.
I agree. The tab component from Shadcn doesn’t support preserving the active tab, so using query parameters might be a great solution.
Woah! This is something I planned to do. Thanks for starting the work on this. I'll review and merge your PR (might push a few updates to it)
Thanks! I’m excited to contribute to this project—I’m a big fan of it. If there’s anything else I can help with, just let me know.
I’m happy to put together an additional PR to handle preserving the active tab using query parameters if that would be useful. Just let me know if you’d like me to take that on.
Thanks again!
any update please?
any update please?
I think maintainer is so busy that can't handle with this problem. 😭
@Henry-Hong We finally got to this during the Tailwind v4 upgrade. Charts now span several pages. I'm closing this one. Thanks for your work. Appreciate it.