weixin_39625864
weixin_39625864
2021-01-06 10:00

Editing and closing a file without saving doesn't discard the changes

If it's build.ts, then there'll also be warnings in the output window that the file hasn't been saved yet, even though it isn't opened anymore. As an indicator, the file also keeps showing the new "M" symbol.

I expected a prompt asking whether I'd like to discard the changes or save, when closing.

open

该提问来源于开源项目:wasdk/WebAssemblyStudio

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

4条回答

  • weixin_39625864 weixin_39625864 4月前

    Somewhat related: https://github.com/wasdk/WebAssemblyStudio/issues/66

    点赞 评论 复制链接分享
  • weixin_39753260 weixin_39753260 4月前

    I think the new M indicator is doing better work. If someone doesn't want to keep its newly edited changes he can see which file has been changed and unsaved, then he can open then undo it if he wants the saved state back. Basically, M is working like a "this file is minimized, and it is unsaved". On the top of current "M", solution for #101(Add a prompt when closing WebAssembly Studio) will work perfectly. No need for showing prompt while closing the unsaved file.

    What if the screen is small and user has opened too many junky tabs(in the case in future user plays with game, physics environment, or user is on a handy device), he won't be able to close the tab without saving it (yeah I know even after saving, he can undo it back but still....saving feels like unnecessary in such scenario).

    点赞 评论 复制链接分享
  • weixin_39625864 weixin_39625864 4月前

    New users might get used to it this way, that's true, but as a user of VSCode (there might be other editors doing it this way, maybe Atom), it feels unintuitive to me. Ultimately, I can live with it as I know how it works, but doing it like other editors would help to reduce friction.

    点赞 评论 复制链接分享
  • weixin_39753260 weixin_39753260 4月前

    Hmm contemplating

    点赞 评论 复制链接分享

相关推荐