Skip to content
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

"Save" button needs special handling because we embedded quiver as an iframe #4

Open
enjoysmath opened this issue Dec 4, 2023 · 0 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@enjoysmath
Copy link
Owner

See https://q.uiver.app to see how saving works. 1. Edit the diagram, add some objects / arrows. 2. Click save and watch the URL in the address bar change.

This works by encoding a JSON-string description of the diagram into standard base64 encoding. The base64 is then what you see after the ?q= in the URL. This is how users can paste the diagrams URL anywhere on the web, and when another person clicks on it, it will load the data from the URL starting out, instead of the default/blank diagram.

But we have currently quiver's index.html embedded as an iframe into our index.html, so the URL is changing as it should in the iframe, but we have to bring it up to the parent window's URL. And conversely, bring the parent window's URL into the iframe's, namely the base64 part.

If this does not work, ie. we can't figure out how to do it, then we'll have to for-go embedding as iframe and instead just massage the code in quiver's index.html until it plays well with bootstrap studio. I think though that the above should work based upon my experiments so far in JS.

That is why the save button requires special handling and not just copying code from existing user click actions in /src/ui.js.

@enjoysmath enjoysmath added bug Something isn't working enhancement New feature or request labels Dec 6, 2023
@enjoysmath enjoysmath self-assigned this Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant