varkor / quiver

A modern commutative diagram editor for the web.
https://q.uiver.app
MIT License
2.41k stars 79 forks source link

Make a copy of a diagram #112

Closed clemmrich closed 2 years ago

clemmrich commented 3 years ago

Often in one publication seeveral very similar diagrams with only minor mofifications are needed. Hence, it would be extremely helpfull and time saving to have the option to save a copy, so that the original diagram is kept, but the copy can be modified.

varkor commented 3 years ago

If you want to make changes to an existing diagram, you can open the diagram you want to modify (using its URL), make the changes, and then export the new diagram. If you want to make changes to a subdiagram which is repeated in a single larger diagram, I think what you're asking for is covered by #21.

clemmrich commented 3 years ago

Hello, this is not what I meant, #21 would not solve the problem unless allowing copy & paste between completely different, separtely stored diagrams. What I want is simply a copy of the entire diagram, accessible under a new URL, so that I can make changes to the copy while retaining the original diagram in case any modifications become necessary while working on a paper. Right now, with two similar diagrams, I either have to overwrite the first one, or to start from scratch again.

varkor commented 3 years ago

The URL points to a specific diagram, not a "file". That is, if you save the current diagram (with the save button, or keyboard shortcut), the URL will update to capture the current diagram. Therefore, that URL is a permanent record of the diagram at that point in time. If you modify the diagram afterwards, the original URL will point to the original, unmodified diagram. If you save the modified diagram, you will get a new URL that points to the modified diagram.

Am I right in understanding that this already provides the functionality you are looking for?

clemmrich commented 3 years ago

Yes, indeed. Just for curiosity: Does that mean that the whole content of the diagram is contained in the URL? (Which would be good, since I was wondering how long you can store a copy of the diagram, which would not be needed in this case). Anyway, a short hint on this behaviour in the help would be helpful for others with the same questions,. Thanks!

enjoysmath commented 3 years ago

@clemmrich Don't quote me but I believe the URL is the entire graph encoded in JSON and then to Base64 encoding and yes, is the whole content.

varkor commented 3 years ago

@clemmrich: sorry, I missed the notification for your comment. @enjoysmath is right: the entire diagram is stored in the URL. I will think about how to make this more evident.

enjoysmath commented 3 years ago

@clemmrich

Making copies of these CD's (commutative diagrams) is what I'm all about. The format we chose to store the CD is in the native graph database format of Neo4j. What better database to store these essentially graphs than to a graph database. Now I've got subgraph isomorphism search working as well, that respects variable substitutions whatever they may be, so that the user may transform a diagram to some logical consequence diagram at the click of a button. Eventually I'm going to have in my URL's lists of variables like ?a=b & alpha=beta & C = D and so on... So the user can change what variables are used in the display of a diagram of interest via the URL parameters. That seems like a good use of that for what I'm doing and here is a video: Quiver Database YT video

I am renaming the project to Abstract Spacecraft, so also watch that repostitory which is also on github but currently bare. To view how I did the two-way Quiver <-> Neo4j interface, check out the old repo: Quiver Database repo

I am going to go with digital ocean hosting so will probably have a site up in 1-2 months perhaps. You may not be making proofs right at that point, but you will be able to search for rule inputs and apply the rules to your drawn diagram. Imagine, the words \text{rows exact} appearing in a node in a diagram, which is like a remark. Anything inside a \text{} block is not considered a variable. Then a 1 by 3 square grid of commuting arrows. You then can take the line of kernels together with their associated commuting squares that glue to your first diagram. The button click will create a new diagram instance, so you don't overwrite your drawn diagram, but instead you've created a proof step. Now this isn't 100% formally rigorous, the final check is up the human community that edits the diagrams, but isn't the final check of any formal system always up to a human, and isn't the bottleneck in proof assistants the huge learning curve and us understanding the code? Well this is the trade off. Human-checked, a currated database like the database of math questions on MSE or the integer sequences on OEIS. But this is a more modern site, and it's geared toward category theory and homological algebra, not usually with elements. But maybe elements could be attached to nodes as well as long as they're not too long texts. E.g. Example quiver diagram.

As you can see lots to think about and to code. But yes, we're copying diagrams as a side effect.

varkor commented 2 years ago

I'm going to close the issue because I'm not sure how to make this more evident at the moment (eventually I'd like to have proper documentation). But I'll reopen if others report the same issue, or if anyone has an idea of how to improve the situation.