Background:
Currently snippet (saved playground code) is saved on server, and version controlled with a version number, but there is currently no way to see what changed between versions. It should be helpful that users can see what has been changed between versions, especally when asking questions here with a playground.
Proposal:
A version list for each snippet, with title and description from here when a playground being saved:
Yes. Kind of relates to some of my comments and the discussion around the new version snippet.
I also think a way to relate to changes and a version history would be good. But may be needs to be restricted to âregistered playgroundsâ (see topic and my suggestions). Some of these playgrounds have thousands of iteration (mostly all clumsy attempts) - or even, non-related to the original, serving just as a base from something completely different. You wouldnât want to go through the list of changes in this case, would you?
Let me link this to:
âŚand add a +1 to your suggestion. TBD how to implementâŚ
It sounds cool in theory.
But the playground is an open space for everyone.
And often they go in different directions, different people make new versions, and not always from the latest version, so it would end up being one big mess
At the very least, itâd require a full rework of how the snippets and versions are handled
I believe thatâs the plan as per the link I added. Thereâs this project initiated by @RaananW which I believe is ongoing (is it?). Though, we are mostly inline here. Same as you, I couldnât help but realize that this will not work without adding another âtypeâ of playground with a number of requirements and conditions to follow.
I thought a little about it last night, and it could be done by adding a âlastVersionâ property, creating a hierarchy / multiple âbranchesâ per playgroundâŚ
All existing playgrounds would still look like spaghetti though, or blank if the diff is created at save-time.
the protential structure would look something like this.
0
1 - version #1, spawned from version #0
2 - version #2, spawned from version #1
10 - version #10, spawned from version #2
50 - version #50, spawned from version #2
3 - version #3, spawned from version #1
5 - version #5, spawned from version #3
4 - version #4, spawned from version #0
etc
Yes, but Iâm afraid that this alone will only solve part of the problem. The version hierarchy tells from which PG/sub-version it is based on BUT⌠it doesnât tell about the content being still relevant towards the objective of the initial PG. So, in the end the âlatestâ version PG is not necessarly the last improved version of the original. Could be something completely different. In this case (when searching for something in particular) the hierarchy/version history becomes useless.
Reason why I think it would be great to have another âtypeâ or âclassâ of PGs. Registered, official, âŚ? call it the way you want⌠Basically, the idea is that this type of PG could only be saved when logged-in, need to fill-in the information/description for update and as a rule/requirement would need to update or enhance the original PG for the purpose it has been created⌠In any case, this entire thingy will require
Edit: I was thinking we could have may be something like this when saving a PGâŚ
Sub-section Title: Publish to official PG
Add a checkbox to âPublish to officialâ (off by default)
When checking âofficialâ - - >
Alert_: You need to be registered to publish to the official channel.
Section title:
You are publishing a new version of âPG NAMEâ - âPG snippetâ
Select:
Title: What is the Purpose of this new release ?
Itâs a fix/update of the original
It features enhancements/new parts (â> add tags)
Itâs an alternate version (â> new branch)
Description title:
Please make a description of changes (will be published in version history)
#Tags: (displays original tag(s) - add, remove)
Add/remove #tags (required for enhancement or alternate only)
Confirm and save as⌠:
Save to official (only if you are certain this is a distributable - creates new version distributed)
or - -
Save as a draft (creates a subversion tagged as âofficialâ but not distributed; you may edit from this sub-branch and save the last version for distribution)
My post was purely from a technical standpoint,
E.g. how a hierarchy and version diff viewer could be implemented with the current snippet/version setup, no regards to actual content of the PG.
Posts like these pop up once in a while.
As far as i recall, itâs been stated several times over the years, on different occasions, that there wonât be any kind of login system (nor file hosting for that matter) on the playground.
The team does not want to maintain or deal with issues related to these features.
They want to focus work on BabylonJs to keep making it better and stronger.
Everything surrounding it is kept as simple and as close to maintenance free as possible
Fair enough, I can appreciate that. Actually, I do
Yes, thatâs true and I know that. But the purpose was to discuss new. You cannot exclude it right from the start or certain possible improvement will also âgo with the wind â before they have even been stated. (My opinion only).
The history of a snippet has been keeping me occupied as well for quite some time.
I did reference it quickly in the blog post (point 10), and someone in the comments added the suggestion to create a diff, which makes perfect sense.
The playground improvement project is âon-goingâ, but is sadly lower priority to many other issues I want to tackle before the next major version is out.
One thing we wonât implement is a log-in system where people have their own snippets. this has many different reasons which we discussed many times before. However, we should be able to provide an âeditorâ hash to the original snippet creator, to prevent people from saving on top of an existing snippet, making the changes hard to follow. So it will be very similar to a git repository in that sense - you can fork and create your own snipept ID, but not save on top of an older existing snippet. This is âcoming soonâ, as all other playground improvements. So little time, so much to do