anyboxhq / everything-okjson

Submit your feature requests or bug reports here.
https://docs.okjson.app
Apache License 2.0
10 stars 0 forks source link

Opening a file with: File -> Open replaces current window content causing loss of data #19

Closed shames0 closed 1 year ago

shames0 commented 1 year ago

Describe the bug After loading content into an OK JSON window, when using "File -> Open" from the menu-bar to open another JSON document, the content I've already loaded is replaced with the opened document. This causes an unexpected loss of data.

To Reproduce Steps to reproduce the behavior:

  1. Open OK JSON
  2. Paste content into the window
  3. Click "File" -> "Open", and select a different JSON document to open
  4. See that the previous un-saved content was replaced unexpectedly by the newly opened file with no way to get the previous data back.

Expected behavior One of two things should happen instead of replacing the unsaved data

  1. The new document should be opened in a new tab
  2. The user should be notified that the existing window content is about to be replaced, and options should be given to either continue, or cancel.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

francisfeng commented 1 year ago

This is intended.

You can choose to open file in new window with Shift + CMD + O. But I do understand it could be unexpected when you lost your data with it.

So in 2.0 you will be able to store the viewing history in your local machine.

shames0 commented 1 year ago

Thank you @francisfeng for the info on this and the other issues I opened last week. I'll patiently look forward to 2.0! 🙂