srcbookdev / srcbook

TypeScript-centric app development platform
https://srcbook.com
Apache License 2.0
2.6k stars 101 forks source link

Remove sidebar auto close and add errors panel #365

Closed 1egoman closed 1 month ago

1egoman commented 1 month ago

Does a few things:

  1. Removes the sidebar auto closing behavior I thought was indicated in the mockups. Now, the sidebar being opened / closed is unrelated to the current tab (code/preview).
  2. Updates the loading and error states of the preview panel to be closer in line with the figma designs
  3. Add a new "errors" pane to the bottom of the screen, in a status bar. When opened, this errors panel shows a list of errors that have occurred for a user to browse. Clicking a "trash" icon in the upper left sweeps away all errors. If an error occurs and the panel is not open, a small badge is shown next to the errors button letting the user know.
  4. Added a new error that shows up when vite crashes / stops unexpectedly (defined as exiting with a status code != 0). Right now this shows a generic message, and when expanded, shows all stdout / stderr logs for the process from when it was started until it crashed. This was built with a "npm install failed" error state in mind as well - this is called out in a few places in the code but the infrastructure to power this hasn't been built out yet.
Screenshot 2024-10-16 at 3 53 19 PM Screenshot 2024-10-16 at 3 53 27 PM Screenshot 2024-10-16 at 3 53 38 PM Screenshot 2024-10-16 at 3 54 02 PM