Skip to content
This repository was archived by the owner on Oct 22, 2021. It is now read-only.

As a user I want to be notified by the IDE when saving the editor content has failed. #380

Closed
kittaakos opened this issue Nov 2, 2020 · 11 comments
Assignees
Labels
type: imperfection Something isn't working

Comments

@kittaakos
Copy link
Contributor

kittaakos commented Nov 2, 2020

This is a follow-up task of #379

@DeeEmm wrote here:

the bar is actually yellow as predicted and if I save the document (CMD-S) the file modified date does not change

On macOS (maybe other OSs are also affected), the backend process could crash after waking up the system from sleep. This issue has been identified and fixed in the Theia IDE framework and the new IDE's nightly build also contains this fix. However, it is not always obvious to the users what has happened and what to do.

@kittaakos kittaakos added the type: imperfection Something isn't working label Nov 2, 2020
@kittaakos kittaakos self-assigned this Nov 2, 2020
@kittaakos
Copy link
Contributor Author

Depends on #315.

@kittaakos
Copy link
Contributor Author

I have some updates on this issue. (Please also check the work in progress screencast. I've forcefully killed the process that does the file system save.)

  • We show a warning status bar, plus the Offline status.
  • We show the dirty indicator () in the editor if it contains unsaved changes.
  • We toast an error message; saving the sketch has failed.

screencast 2020-11-06 14-33-29

@DeeEmm
Copy link

DeeEmm commented Nov 6, 2020

Awesome work @kittaakos

@ubidefeo
Copy link

ubidefeo commented Nov 9, 2020

good one, @kittaakos

let's reword that message to make sure the user understand that it's a bug.
Also can we intercept the user closing the window/IDE and do something about it?
Just asking for a friend 👍

@kittaakos
Copy link
Contributor Author

let's reword that message to make sure the user understand that it's a bug.

Sure. What kind of message do you want to see? Please advise.

Also can we intercept the user closing the window/IDE and do something about it?

Sorry, I do not understand it; can you please clarify? Thank you!

@ubidefeo
Copy link

Also can we intercept the user closing the window/IDE and do something about it?
Sorry, I do not understand it; can you please clarify? Thank you!

we should prevent the user from quitting the IDE without notifying that current content will be lost.
Even better would be to handle this like Sublime Text does, it keeps files in a temporary state until properly saved, but maybe it's convoluted

@kittaakos
Copy link
Contributor Author

Even better would be to handle this like Sublime Text does, it keeps files in a temporary state until properly saved, but maybe it's convoluted

I cannot much more agree. That is exactly how the Theia framework should behave. VS Code switched to that behavior as well. unload and beforeunload events are deprecated and do not work reliably in the browser window: https://developers.google.com/web/updates/2018/07/page-lifecycle-api#events

@kittaakos
Copy link
Contributor Author

VS Code switched to that behavior as well.

Interesting, the VS Code guys just revived this feature in the 1.51.0 release: https://code.visualstudio.com/updates/v1_51#_prevent-accidental-close

@ubidefeo
Copy link

Interesting, the VS Code guys just revived this feature in the 1.51.0 release: https://code.visualstudio.com/updates/v1_51#_prevent-accidental-close

boom!

@kittaakos
Copy link
Contributor Author

we should prevent the user from quitting the IDE without notifying that current content will be lost.

We will show a different dialog detail when quitting the app, and closing the app after an unrecoverable error:
Screen Shot 2020-12-01 at 09 39 59
Screen Shot 2020-12-01 at 09 39 22

Even better would be to handle this like Sublime Text does, it keeps files in a temporary state until properly saved, but maybe it's convoluted

It's a brilliant idea but is a giant feature and should be handled by the Theia framework.

@kittaakos
Copy link
Contributor Author

It's done.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: imperfection Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants