Skip to content

Conversation

@david-crespo
Copy link
Collaborator

@david-crespo david-crespo commented Jan 19, 2023

This is mostly uncommenting or redoing stuff that was already here from #1214. This PR includes:

  • Bump API to latest omicron main
  • Turn back on system-level and silo-level utilization pages
  • Ben's polish in Metrics design touchup #1331
  • Prefetch instance disks in a loader so the disk metrics tab thing works better
  • Change the way we're doing code splitting (see below)

Note on code splitting

We were doing code splitting by dynamically importing page components for pages with large libraries (in this case Recharts). When there was only one (the instance metrics tab) this had a reasonable result: a decent-sized MetricsTab.js file split out from the main app.js

However, it turns out Vite is smarter than I thought, and once I added two more pages using Recharts, we got this: Vite knows all the pages have TimeSeriesChart in common, so it automatically extracts that into its own separate file, leaving all the page-specific files very small, like 1-2 KB. There's no point in having separate files for them if they're small!

image

So, I changed it so the pages are regular imports and inside they import TimeSeriesChart dynamically, which means only TimeSeriesChart gets its own file.

image

@vercel
Copy link

vercel bot commented Jan 19, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
console-ui-storybook ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 20, 2023 at 5:58PM (UTC)

* Metrics design improvements

- Area chart -> Line chart
- Shorter day format for same day metrics
- Tweak colours
- Tweak spacing
- Wrapper with border
- Separating/styling title and unit

* Round the tooltip corners

* Cleanup

* Unify props for both charts

* Add elevation to tooltip

* Tweak chart padding and height
@david-crespo david-crespo marked this pull request as ready for review January 20, 2023 19:42
@david-crespo david-crespo merged commit a237967 into main Jan 20, 2023
@david-crespo david-crespo deleted the metrics-again branch January 20, 2023 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants