Personal libraries

Wouldn’t it be great if Snap! enabled personal libraries?

I guess many advanced users have developed “handy” blocks they like to reuse now and then - perhaps unplanned. Taking myself as an example: I developed a few specialized varieties of let, each offering a different advantage over the official library version; some debugging tools; improved Tunescope blocks; and more. I would like to group these blocks into a few (separate) personal libraries I could use at any time, regardless of the hardware platform I’m using.

I am aware of alternative solutions:

  1. Close the project I’m working on; open a project containing the required block; export the block; re-open the original project; import the block; or:
  2. Create a “library” project for all “handy” blocks. When required, open this library project, rename it while saving, then start coding the application within this project.

… neither of which I find particularly attractive.

Concerns
Complications may occur if a personal library bears the same name as an official library created eventually; or if a personal library block is same-named as a new primitive block. Resolving these potential issues may require some deep thought from the developers.

Simple, don't put the personal libraries in the current libraries dialog. Just make a new dialog for personal libraries.

As for blocks that have the same name name as new primitives, that's not a problem at all. Snap already allows you to create a custom block with the same name as a primitive. That's because primitives are stored with their identifiers instead of their spec.


I actually think this is a good idea, since I also have a few libraries that I tend to use in other projects.

selector, right?

yeah, same. I have needed this countless times. I second this, but with the inclusion of this suggestion:

Same thing

oh.

I... third? this idea. I have a bunch of blocks I use all the time, and having to find the scripts pic on my messy hard drive is annoying.

We almost already have this feature. Make a project with the blocks you want in a library, choose File > Export blocks. The only problem is that the resulting file is on your computer instead of in our cloud. I guess we could enable storing block libraries in your Snap! account, but don't you already have a general-purpose cloud account, from Google Drive or Apple or Dropbox or somebody?

So I think this is a good idea, but low priority. There are other cloud features I want first (e.g., better support for distinguished student accounts and teacher accounts).

I'm looking forward to suddenly finding it in some future Snap! release. :slightly_smiling_face:

I have a default project with all my "library blocks". When i start a new project, i open this default project and save as a new name

I recognize that: the second "alternative solution" in my OP.
However it is somewhat inconvenient, because:

  1. one is importing all personal library blocks one ever made, including the ones that are irrelevant to the appplication at hand; these may clutter up he palette area;
  2. one needs to decide one's personal library blocks are required before any coding - I, for one, tend to start coding and will pick any resources turning out to be useful along the way.

So you want every block to be a separate library?
Hosting a smart picture at any free cloud, say github.io is not an option for you?
I've made some experiments with importing the project/parts but it's now explicitly prohibited by a Snap TOS.

Also, there is remove an unused block option, so it seems simpler to load more blocks and remove them at a letter stage.

It's unclear to me whether your proposed approach works or is prohibited.

I made the feature request so as to have Snap! offer a maximally convenient way to access one's personal library blocks. No-hassle, so to speak. :smirk:

Yeah, but that tends to be a bit... overzealous and ends up breaking a tonne of blocks. I still can't figure out why, though.

I confirm ... from my own experience, alas.

I misinterpreted that. I tend personally to find the shortest paths, and I assumed that selecting a script from a html page of smart pics is quite hassle-free, compared to import library dialog.
Sorry, my bad.

np

A post was split to a new topic: Personal Libraries Dev-log

I'd say they're pretty close. One requires you to actually set up an html page of library images with the libraries embedded, and one allows you to find your libraries in snap easier. If you think about it, an html page with your personal libraries is actually pretty similar to what it would be in snap.

I made a chrome extension that has a dialog that pops up when clicked with script pics of blocks I use, so i can just drag it in. I'll share the code when I'm home if you want

15 posts were merged into an existing topic: Personal Libraries Dev-log