youknowriad / codevitals

https://codevitals.run
3 stars 2 forks source link

Add support for selecting metric via query param #28

Closed WunderBart closed 2 months ago

WunderBart commented 2 months ago

What?

This PR adds support for selecting an active metric via URL param, for example:

http://localhost:3000/project/gutenberg/block-theme-timeToFirstByte

Apart from the above, this PR does the following:

How to test

  1. Make sure setting the metric query param works both ways:
    • it should select the metric when passed in the URL and
    • it should update the URL when a metric is clicked.
  2. Ensure the default metric query param is set when a dashboard opens. For example, clicking http://localhost:3000/project/gutenberg should update the URL to http://localhost:3000/project/gutenberg/firstBlock.
  3. Make sure the graph canvas renders as expected when metrics change.
  4. Make sure the background color for an active metric is set as expected.
vercel[bot] commented 2 months ago

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

Name Status Preview Comments Updated (UTC)
codehealth ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 21, 2024 1:55pm