Giter Club home page Giter Club logo

Comments (7)

TehShrike avatar TehShrike commented on July 21, 2024 1

It would take a decent amount of work to implement version-awareness with a decent UI in the REPL. I suspect that if it were well-implemented, that functionality would be accepted, but I think you'd have to be the one to implement it.

Things to consider:

  • you would want to show "there's a newer version of this code" to someone viewing an older version
  • you would need to list all versions/changes to a given REPL app somewhere

In the meantime, the way that I personally mitigate that kind of risk is by giving my REPL apps a name before linking to them from somewhere else. That way you have a clue as to whether or not an old REPL might be risky to change.

from sites.

Conduitry avatar Conduitry commented on July 21, 2024 1

I'd definitely be into that if we can come up with a good way to convey 'copy this link to share this version, copy this link to share whatever future versions you might make'.

from sites.

chapmanjacobd avatar chapmanjacobd commented on July 21, 2024 1

maybe you could just have a lock button ("lock this code") and when you click on it the code will be saved in a different place and the "locked" pages will still be editable but they won't auto-save.

because this is different behavior you could do

// Enable navigation prompt
window.onbeforeunload = function() {
    return true;
};
// Remove navigation prompt
window.onbeforeunload = null;

to make sure people know that the code is read only

from sites.

KennethKinLum avatar KennethKinLum commented on July 21, 2024

it is true that I can fork another page B and just work on that page B. But there are times I have bookmarks in my browser, or that I kept a code sample and its REPL URL in my Google docs. So I might re-visit a page without knowing that I should not modify it because 12 days ago, I sent it to somebody.

from sites.

rixo avatar rixo commented on July 21, 2024

Couldn't this be solved with a permalink to a REPL for this precise version of the code?

You use this for sharing and no problem if you break everything afterward.

Indeed, a notification that a newer version of the code exists would be a nice to have ("it might be better, worse, or completely different ¯\_(ツ)_/¯").

from sites.

TehShrike avatar TehShrike commented on July 21, 2024

The REPL used to have every saved version be a permalink. The behavior changed when the REPL switched from storing code on Gist to storing it in a database. Some people seemed fairly happy with the change in behavior, so it would probably be tough to convince everyone to switch back to the all-permalink-all-the-time implementation.

But like I said, if you're willing to implement a multiple-version-aware version of the REPL with good UI, you could probably get folks on board.

from sites.

tomByrer avatar tomByrer commented on July 21, 2024

I've seen various editors use an URL like: https://host/slug/version
So:
https://svelte.dev/repl/15200f778a624c66b59dc53b6d8f3b3c/0?version=3.20.0
is the original save,
https://svelte.dev/repl/15200f778a624c66b59dc53b6d8f3b3c/1?version=3.20.0
will be the second save
https://svelte.dev/repl/15200f778a624c66b59dc53b6d8f3b3c/2?version=3.20.0
is the next save, etc.

multiple-version-aware version of the REPL with good UI,

Just a dropdown of all the save versions would be the first round IMHO.

from sites.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.