scastie icon indicating copy to clipboard operation
scastie copied to clipboard

file management

Open jimka2001 opened this issue 3 years ago • 5 comments
trafficstars

When I press save in the scastie, tool where does it save to? Can it look at a list of things I've saved? If I loose the url to a page, can I find it again? I see there's a snippits list, but I don't see the relation the entries in this list, and the states of my window after pressing the save button, so I am guessing that Save does not create a snippit. Can someone help me with the use model here?

Screenshot 2022-01-23 at 00 45 45

jimka2001 avatar Jan 22 '22 23:01 jimka2001

Hello @jimka2001 ! Scastie saves snippets to a MongoDB server managed by the Scala Center. The code related to storage is in the package com.olegych.scastie.storage in the storage module. For testing, an in-memory implementation is provided too.

If you log in when using Scastie, it will be able to remember your snippets: image

What do you mean by:

I don't see the relation the entries in this list

Would you like to contribute to Scastie?

vincenzobaz avatar Jan 23 '22 19:01 vincenzobaz

It could be that this is a bug, because I am indeed logged in. Yet when I Save, I don't see any updates to the snippits list. Screenshot 2022-01-23 at 20 44 20

jimka2001 avatar Jan 23 '22 19:01 jimka2001

Experimenting a bit more, it behaves a bit differently than it did earlier. If I change the code in the editor, and press save, then activates the snippits menu item, I don't see the new snippit listed. However, if I press the reload button on the web browser, I DO SEE the new snippit listed.

Could this just be a bug in the Safari support? I tried in Chrome, and the same update issue is repeatable.

  1. Change the text in the editor, I.e., change the first line in a visible way
  2. press Save
  3. press </> snippits
  4. see that the line displayed in the snippit DOES NOT correspond to the text you entered in the editor window.
  5. press the window refresh icon on browser, which takes you back to the editor window
  6. again press </> snippits
  7. see the new snippit in the list with the correct text

jimka2001 avatar Jan 23 '22 19:01 jimka2001

Would it be possible to annotate the snippit list a bit? Either some user text? or at least the date/time/time-zone the snippit was saved?

jimka2001 avatar Jan 23 '22 19:01 jimka2001

@jimka2001 right, we should reload snippet list after save automatically and add some more info in the list

OlegYch avatar Jan 23 '22 22:01 OlegYch