update url of studio after making changes
Reason/Context
Please try answering few of those questions
- Why we need this improvement? It helps to share the document with others after someone makes changes to the document. Currently the link we share does not direct others to the same document and they still see the unchanged document.
- How will this change help? This will make sharing easier with doing the base64 encoding and pasting it in url to make it work.
- What is the motivation? This idea came when I was on call with lukasz and I am also working on a tutorial using studio.
Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
Can you describe it more? Has base64 to be created and added to the url every time something changes or what?
@magicmatatjahu it's about adding ?base64=VALUE by default to URL, and refresh this value on every change, so anyone can easily copy URL and send it to someone. Just like with https://mermaid-js.github.io/mermaid-live-editor/
yes, asyncapi files are sometimes too large, but then, just detect it and do not do it for large files. Makes sense?
@derberg question if anyone would like to have automatic base64 creation. this could be added as an option to the Studio and someone could enable it.
The logic should not be difficult, but the most difficult will probably be with determining whether a given url is the right length because we also have the option of adding to the url the hash of a given element from the template (like https://studio.asyncapi.com/#server-scram-connections), and this case would also have to be handled here.
@magicmatatjahu sure, just remember Studio is in beta. So nothing blocks us from having base64 by default.
although better might be to add share icon next to ... menu.
The logic should not be difficult, but the most difficult will probably be with determining whether a given url is the right length because we also have the option of adding to the url the hash of a given element from the template (like https://studio.asyncapi.com/#server-scram-connections), and this case would also have to be handled here.
I think that it should be simple, and when # is there, base64 should not work. Or, when base64 is added, # is removed. Simple steps, one by one
Can I work on this issue?
@nawed2611 Sure, but please make as Łukasz described his solution in this https://github.com/asyncapi/studio/issues/463#issuecomment-1289032605, ok? :)
@derberg @magicmatatjahu Hey, I would like to work on this. Below is the flow that I've understood by going through the above thread, let me know if I'm missing something.
- We will have
?base64=VALUEby default in the URL, which will keep changing when the user changes the Async API document. - If the user navigates through different sections using the sidebar,
#will be added to the URL, and base64 will be removed. If the user again edits the document, we can add?base64=VALUEagain to the URL. - At any time, the user can share the document by using the share icon next to
...icon, which will copy the URL of typehttps://studio.asyncapi.com?base64=VALUE(removing hash if present) to the clipboard. Then, maybe we can have a toast ofURL copied to clipboard
Then, maybe we can have a toast of URL copied to clipboard
yes we need something like this, or like it is on YT, that you click Copy video URL and link icon flashes in the background to indicate it was copied.
so it is either a link icon next to ... or maybe share that opens a dialog with the link URL with base64 (like it was in YT in past) 🤔
wdyt folks? instead of refreshing URL in address bar, have share -> modal with link (and in case we know base64 will be to long and not working in studio, we can show info to the user)
thoughts?
wdyt folks? instead of refreshing URL in address bar, have share -> modal with link (and in case we know base64 will be to long and not working in studio, we can show info to the user)
Yeah it will be better :)
This issue has been automatically marked as stale because it has not had recent activity :sleeping:
It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.
There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.
Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.
Thank you for your patience :heart:
Hey @magicmatatjahu @derberg Can I work upon this?
@magicmatatjahu @derberg What I have basically done is copy url on clicking share button with base64 converted from content.
Should I also make a modal for ease of sharing as well as add verious social media as options?
This issue has been automatically marked as stale because it has not had recent activity :sleeping:
It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.
There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.
Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.
Thank you for your patience :heart: