Sharing a brand new project

Every time I save a brand new project, I find it hard to share it. Eighter I need to go back to My projects or hit Save as … then search for my project in the list and press Share. I have 195 projects. It is hard to scroll that much. Same happens when I create a copy of an existing project trough Save as. In the first case the Open is Community site option is missing, in the second case it points to the old project. So when you hit the browser’s refresh you loose the project.

It seems that having a valid url after save/save as would solve my issue and at the same time bring consistency.

I wrote few lines of code to fix this and this is how it works.

If the new behaviour is fine you can take a look at the code: Comparing jmoenig:master...cvetelinandreev:master · jmoenig/Snap · GitHub

URL’s come when you share a project.

Just use the search bar. I have way more projects, but I’m able to find project easily just by searching their name in the search bar.

I think the current URL policy is broken. (It’s one of the things I keep bringing up at staff meetings.) You should get a predictable URL only if/when you publish your projects. Projects that are private or shared should have randomly generated URLs, just like Google Docs.

As for the search bar, for some reason I seem to have a million projects named math+C2 numberline project* and if we used the filesystem as the database (which, unlike the other issue, they keep explaining to me why it’s a bad idea, but not so I understand; it seems to me that a database is just a filesystem with an index) then I could use the whole range of shell commands, including find for a pretty much arbitrary query, but more to the point rm!

(Why yes, I did just say that unpublished projects should have random URLs, but through the miracle of Unix (or any decent operating system), each file can have two names with different lookup permissions!)

I like that I can change my Snap bookmark to be any unshared project of my choice as my default project. With a randomly generated URL, would the URL show up right away like in Scratch? If it would that’d be fine, but otherwise it would be a hassle trying to figure out what the URL is.

You mean show up in the URL bar? Of course, why not?

I honestly hate how scratch does it. When you go into the editor, it creates and saves a new project. This means that you can build up a ton of empty test projects really quickly. I would much rather have it generate the url when you save or open a project (the url would be unique to a project, and it would stay the same between saves).

I honestly hate how scratch does it. When you go into the editor, it creates and saves a new project.

Oh. Yes, I hate that too. I thought Mark meant showed up right away on saving. At least they should have a big “delete empty unnamed projects” button!

It seems to me that the URL comes when I save a project. E.g Snap! Build Your Own Blocks

I don’t see any search bar in the editor. I want to share my project in edito mode right away and send a link to a friend. I don’t want to share the community project page.

that does not seem correct.

share to a project page is “publish”.
share to create a link is “share”.

file → open → project name → share

I think they’re talking about the URL bar above the whole Snap! window.

The fact that you can’t share an unsaved project isn’t an arbitrary UI decision; if the project isn’t saved, we don’t have it to respond to a URL. Scratch, like Google Docs, wants to eliminate the entire concept of saving; they want users to think there is only one document, and it’s automatically the same everywhere, just as, for example, when you change your password on a web page, if you use a password manager the change automatically appears in any other browser or other computer you might use. It’s a simple idea, arguably the best choice for Scratch’s target eight year old nonprogrammer audience. (If a project does have nontrivial code, I would argue that the cognitive load avoided by not saving comes back to haunt you in the form of reversion to a version from before you introduced some bug.)

But if something is the right choice for Scratch, that doesn’t automatically make it the best choice for Snap!. Our target audience of teenage apprentice computer scientists can handle the concept of saving a file, and having a small skew between the local version and the last saved version. In this way of thinking, saving a file is like giving it a new sub-sub-minor version number.

And you can have the best of both worlds by autosaving to a file separate from the official saved file. Since it’s best, naturally it’s how Emacs does things. :~) There’s a sort of implicit warranty that the official file is in an internally consistent state, whereas while you’re in the process of making a change to the code there’s no such guarantee about the current state, even if that state has been autosaved.

Yeah, I hate it too - every time I want to test something I have to go back into My Stuff and delete the project afterwards. When I wrote my previous post, I didn’t really think about that part, but of course what you suggest is how it should work!

Here is a URL of a project that is saved but not shared.

https://snap.berkeley.edu/snap/snap.html#present:Username=tsvetelin&ProjectName=Untitled&editMode&noRun

if you open it you should see

How am I supposed to live with a workaround by searching for the currently opened project?

It seems to me that you don’t think it is an issue that “Open in Community site” option is missing or points to the wrong place.

I don’t mind hitting Save. There is a nice reminder for unsaved changes if I accidently try to close a project bot being saved.

All I want is to be able to share a project faster from the Snap! editor. I believe these few lines of code I propose do the job short-term.

Please stick to 1 reply at a time.

it takes 10 seconds.

I think you can live :slight_smile:

I’m wondering why not share it?

They have a search bar for a reason?

Unless you have a ton of unnamed or unorganized project names, you should be able to find it (the project you want to find) easily. If everything is not named or organized, that’s your fault, not snaps. They organize everything in alphabetical order as well, so all of your “unnamed” saves will be easy to find.

You can share and publish a project from your projects page:

Then:

It’s that easy!

This does, however, seem like a decent idea for efficiency.

If you’re experienced enough to write code and implement it into snap*!* then you should have no problem just using the code you wrote to share/publish as a mod or add on to solve your terribly difficult and overwhelming problem.

@sathvikrias @mrace0 It seems I have offended you, for which I apologize.

@mrace0 How do I do an ‘add on’ to fix the bug that loads for me everytime I use Snap! ?

I’m not seeing a bug.

I’m not entirely sure how to do this for I have never done this myself, but I’ve read a lot about these on mod forums like Split! - Snap! but Scratch (Part 4) - #197 by d016

GitHub and javascript could likely help!

PS. no i was NEVER offended, sorry that it came off that way.