-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Editor buttons #733
Editor buttons #733
Conversation
btw, for the share functionality, we can only share gists/web pages? new script for example cannot be shared. |
What do you mean? Here's a new script example from the share button: http://localhost:5173/?script=const+result+%3D+Manifold.cube%28%29%3B%0A#New%20Script%202 |
Oh, sorry I overlooked that, I was creating a new empty script and look at the url. This should be fine then. |
So, I am getting "Error: URI too long" with larger shares. Apparently this is server config, so my best guess is Github pages goes with the Apache default max of 8190 characters. I can't think of a way around that, but at least this works for medium-sized scripts. |
we implemented gzip just recently for data url hrgdavor/jscadui#76 |
|
Agreed, though didn't @hrgdavor just say that the way jscad does it is with base64+gzip? On text that might give ~10x compression, which would probably be plenty. |
Actually I did not explore it too much, we had an eager user that wanted to squeeze max into url, and since I already have fflate as a dependency it was a simple thing to add. Also maybe limit is different fro server url like |
I just took a script from jscad examples (gears)
I was surprised to see urlencoding original script (7.9) is more overhead than base64 and then urlencode (7.1 k) gzip+b64 is not 10x, but looks worth it |
@hrgdavor Thanks for that bit about the hash not getting sent to the server. @pca006132 It looks like I was exactly wrong. So, if we switch back from query params to hashes, then it probably doesn't matter whether it's zipped or not. I'll take a look. |
* added undo, redo, format * share button works * cleanup * reset scroll * addressing feedback
Follow-up to #643
Adds undo, redo, format, and share buttons to ManifoldCAD UI.