ui icon indicating copy to clipboard operation
ui copied to clipboard

refactor(charts): slow single page to fast multiple tabs (solve: #4308)

Open Henry-Hong opened this issue 1 year ago • 4 comments
trafficstars

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

스크린샷 2024-07-29 오후 10 04 34

To-Be

스크린샷 2024-07-29 오후 10 01 10 - The reason accessibility dropped from 100 to 96 is that the default color set of the is not very accessibility-friendly. image

Henry-Hong avatar Jul 29 '24 13:07 Henry-Hong

@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.

vercel[bot] avatar Jul 29 '24 13:07 vercel[bot]

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.

devymarry avatar Aug 02 '24 15:08 devymarry

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)

shadcn avatar Aug 05 '24 11:08 shadcn

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!

Henry-Hong avatar Aug 05 '24 14:08 Henry-Hong

any update please?

sovetski avatar Dec 31 '24 09:12 sovetski

any update please?

I think maintainer is so busy that can't handle with this problem. 😭

Henry-Hong avatar Dec 31 '24 09:12 Henry-Hong

@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.

shadcn avatar Jul 01 '25 12:07 shadcn