Skip to content

Commit

Permalink
Fix perf regression, upgrade tanstack deps (#18)
Browse files Browse the repository at this point in the history
* upgrade tanstack deps, regen route tree

* refresh icon animation fixes for CPU usage
  • Loading branch information
bgentry authored Jun 11, 2024
1 parent 248fab1 commit 3411847
Show file tree
Hide file tree
Showing 5 changed files with 181 additions and 112 deletions.
172 changes: 77 additions & 95 deletions ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"@headlessui/tailwindcss": "^0.2.0",
"@heroicons/react": "^2.0.18",
"@tailwindcss/typography": "^0.5.10",
"@tanstack/react-query": "^5.8.7",
"@tanstack/react-router": "^1.16.6",
"@tanstack/react-query": "^5.40.1",
"@tanstack/react-router": "^1.35.6",
"clsx": "^2.0.0",
"date-fns": "^3.1.0",
"next-themes": "^0.3.0",
Expand All @@ -33,10 +33,10 @@
"@storybook/react-vite": "^8.0.10",
"@storybook/test": "^8.0.10",
"@tailwindcss/forms": "^0.5.7",
"@tanstack/eslint-plugin-query": "^5.8.4",
"@tanstack/react-query-devtools": "^5.8.8",
"@tanstack/router-devtools": "^1.16.6",
"@tanstack/router-vite-plugin": "^1.16.5",
"@tanstack/eslint-plugin-query": "^5.43.1",
"@tanstack/react-query-devtools": "^5.40.1",
"@tanstack/router-devtools": "^1.35.6",
"@tanstack/router-vite-plugin": "^1.35.4",
"@testing-library/react": "^15.0.7",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
Expand Down
12 changes: 8 additions & 4 deletions ui/src/components/RefreshPauser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,14 @@ export function RefreshPauser(
{disabled ? (
<PauseIcon className="size-6 text-slate-400" aria-hidden="true" />
) : (
<ArrowPathIcon
className="size-6 text-slate-400 motion-safe:animate-spin-50-50"
aria-hidden="true"
/>
// It's 2024 and this kind of div-wrapping hack is still necessary to get the
// spinner to animate without insane CPU usage:
<div className="size-6 overflow-hidden will-change-transform motion-safe:animate-spin-50-50">
<ArrowPathIcon
className="size-6 text-slate-400"
aria-hidden="true"
/>
</div>
)}
</ListboxButton>
<ListboxOptions className="absolute right-0 top-full mt-3 w-32 space-y-1 rounded-xl bg-white p-3 text-sm font-medium shadow-md shadow-black/5 ring-1 ring-black/5 dark:bg-slate-800 dark:ring-white/5">
Expand Down
Loading

0 comments on commit 3411847

Please sign in to comment.