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

feat: add share functionality #618

Merged
merged 6 commits into from
Oct 24, 2023

Conversation

Shurtu-gal
Copy link
Collaborator

@Shurtu-gal Shurtu-gal commented May 13, 2023

Description

  • A share functionality has been added to the toolbar.
  • It converts the file contents to Base64 format for ease of sharing

Related issue(s)

Fixes #463
Blocked by #807

@netlify
Copy link

netlify bot commented May 13, 2023

Deploy Preview for modest-rosalind-098b67 ready!

Name Link
🔨 Latest commit 611ed7e
🔍 Latest deploy log https://app.netlify.com/sites/modest-rosalind-098b67/deploys/6537d2d130c19600085b7a62
😎 Deploy Preview https://deploy-preview-618--modest-rosalind-098b67.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide 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.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Member

@fmvilas fmvilas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have concerns about building such long URLs. They may not work in all browsers. Not even in all the modern ones.

I just found the table below in the following Stack Overflow question: https://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers.

Browser     Address bar   document.location
                          or anchor tag
------------------------------------------
Chrome          32779           >64k
Android          8192           >64k
Firefox          >64k           >64k
Safari           >64k           >64k
IE11             2047           5120
Edge 16          2047          10240

Can I ask you what's your use case? Why do you want to copy and share a URL but you don't want to copy and share the document itself? Honest question, just want to understand as I'm working on drafting the future of Studio and want to understand the needs better.

@Shurtu-gal
Copy link
Collaborator Author

@fmvilas This was done as per this comment #463 (comment)

@Shurtu-gal
Copy link
Collaborator Author

If we don't want such long urls then we would have to use a storage. Either on our side or in their own Drives, dropboxes etc.

@Shurtu-gal Shurtu-gal requested a review from fmvilas May 29, 2023 06:17
@fmvilas
Copy link
Member

fmvilas commented May 29, 2023

If we don't want such long urls then we would have to use a storage. Either on our side or in their own Drives, dropboxes etc.

Yes, that's in my plans for the next Studio version: https://github.com/orgs/asyncapi/projects/16/views/1.


Look, what I'd do is to add this feature knowing that it may fail in certain cases. I think we can live with that. Some people may experience issues but others (the majority?) will not so let's not block something that may be useful for them.

Are you ok with that @magicmatatjahu @derberg?

Copy link
Member

derberg commented Jun 27, 2023

I use this feature in mermaid all the time https://mermaid.live/
and yeah, some huge files might fail 🤷 but probably only for Edge and IE 😃

@KhudaDad414
Copy link
Member

@Shurtu-gal let's merge this PR. can you resolve the conflicts please?

@changeset-bot
Copy link

changeset-bot bot commented Sep 26, 2023

⚠️ No Changeset found

Latest commit: 611ed7e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify
Copy link

netlify bot commented Sep 26, 2023

Deploy Preview for asyncapi-studio-design-system ready!

Name Link
🔨 Latest commit 611ed7e
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-studio-design-system/deploys/6537d2d0a26de80008a74d0f
😎 Deploy Preview https://deploy-preview-618--asyncapi-studio-design-system.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Shurtu-gal
Copy link
Collaborator Author

@KhudaDad414 done

@Amzani
Copy link
Collaborator

Amzani commented Sep 27, 2023

/rtm

@KhudaDad414
Copy link
Member

@jonaslagoni SonarCloud is complaining about the changes for #796 here. this is weird. 🤔

@jonaslagoni
Copy link
Member

Sonar cloud in a nut shell 🤷

@Shurtu-gal
Copy link
Collaborator Author

/rtm

@Shurtu-gal
Copy link
Collaborator Author

Sonar cloud in a nut shell 🤷

😆

@jonaslagoni
Copy link
Member

@KhudaDad414 I would just ignore sonar and force-push it manually.

@Amzani
Copy link
Collaborator

Amzani commented Oct 16, 2023

Agree with @jonaslagoni we will anyway have duplicated code during the transition period to V3.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@Amzani
Copy link
Collaborator

Amzani commented Oct 24, 2023

/rtm

@asyncapi-bot asyncapi-bot merged commit 31a972e into asyncapi:master Oct 24, 2023
18 checks passed
@Shurtu-gal Shurtu-gal deleted the feat/add-share branch October 24, 2023 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

update url of studio after making changes
7 participants