observablehq / feedback

Customer submitted bugs and feature requests
42 stars 3 forks source link

Dismiss the "Unable to save changes" error toast after successfully reconnecting and saving changes #474

Closed visnup closed 1 year ago

visnup commented 2 years ago

Describe the bug If the socket disconnects and you have pending changes, and the notebook can't save them for over 30s, you get an error toast the says "Unable to save changes." The notebook will keep trying to reconnect and save, and if it's successful, everything will be fine again. But, the error toast doesn't go away and the page still feels broken since it's still there.

To Reproduce Steps to reproduce the behavior:

  1. Make an edit to a notebook you own.
  2. Get the notebook to not save somehow (in development, add an artificial delay to save events).
  3. See the Unable to save changes error toast.
  4. Wait for save/saveconfirm to complete successfully.
  5. See toast not go away.

Expected behavior After a successful save, it's confusing to leave the toast visible as it seems like something is still broken.

Screenshots

image

Desktop (please complete the following information): macOS Safari 15.6.1

mootari commented 2 years ago

Get the notebook to not save somehow (in development, add an artificial delay to save events).

Alternative repro steps:

  1. Go offline:
    • Firefox: Select "File" > "Work Offline".
    • Chrome: Open the Network tab in the developer tools and select the preset "Offline".
    • Safari: Disable WiFi or use a 3rd party app like Charles Proxy.
  2. Make (and submit) an edit.
  3. Wait 30 seconds for the spinner to stop and the message to appear.
  4. Go back online.