turbo icon indicating copy to clipboard operation
turbo copied to clipboard

Improve error readability.

Open anthonyshew opened this issue 1 year ago • 4 comments

Description

Currently in a sloppy state to get feedback.

Proposed improvements:

  • Bring link to the bottom of the message. My eye skips over the URL because it naturally jumps to the more verbose code output. With the URL at the bottom, I have the chance as a user to read the error and give it a fix. If I keep reading because I need more info, I make it to the link.
  • Remove the diagnostic code. It doesn't mean anything to me as a user (and I'd imagine those of us on core would be able to sort out the error's location in source using other heuristics?).

Things to fix:

  • The dangling (link) at the top needs to actually become the link at the bottom.
  • The custom miette handler I'm adding isn't in a good location. I only dropped it in the file to hear what folks think.
  • Tests.

Before: CleanShot 2024-06-14 at 19 45 05@2x

After: CleanShot 2024-06-14 at 19 44 48@2x

Testing Instructions

👀

anthonyshew avatar Jun 15 '24 01:06 anthonyshew

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

Name Status Preview Comments Updated (UTC)
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 15, 2024 1:46am
rust-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 15, 2024 1:46am
8 Ignored Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Visit Preview Jun 15, 2024 1:46am
examples-designsystem-docs ⬜️ Ignored (Inspect) Visit Preview Jun 15, 2024 1:46am
examples-gatsby-web ⬜️ Ignored (Inspect) Visit Preview Jun 15, 2024 1:46am
examples-kitchensink-blog ⬜️ Ignored (Inspect) Visit Preview Jun 15, 2024 1:46am
examples-native-web ⬜️ Ignored (Inspect) Visit Preview Jun 15, 2024 1:46am
examples-svelte-web ⬜️ Ignored (Inspect) Visit Preview Jun 15, 2024 1:46am
examples-tailwind-web ⬜️ Ignored (Inspect) Visit Preview Jun 15, 2024 1:46am
examples-vite-web ⬜️ Ignored (Inspect) Visit Preview Jun 15, 2024 1:46am

vercel[bot] avatar Jun 15 '24 01:06 vercel[bot]

🟢 CI successful 🟢

Thanks

github-actions[bot] avatar Jun 15 '24 01:06 github-actions[bot]

🟢 Turbopack Benchmark CI successful 🟢

Thanks

github-actions[bot] avatar Jun 15 '24 01:06 github-actions[bot]

After talking to @NicholasLYang, the (link) is possibly a bug in miette? https://github.com/zkat/miette/issues/383

anthonyshew avatar Jun 17 '24 16:06 anthonyshew