Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: additional changes for implementation of new preview command #1167

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

neoandmatrix
Copy link

Description

This PR introduces the necessary changes for implementation of readOnly mode in studio when used with asyncapi start preview command.

Approach :-

An additional message can be sent through websocket upon initialization which will set the app state to readOnly. As this is being done internally only through the asyncapi start preview command hence in all other cases will remain as it is and if used outside the asyncapi start preview command the readOnly parameter will only work with either url or base64 string or share and no websocket connection will be established in those cases.

Related issue(s)

Resolves #1166

Copy link

changeset-bot bot commented Feb 28, 2025

⚠️ No Changeset found

Latest commit: 2d23320

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

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.

Copy link

netlify bot commented Feb 28, 2025

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

Name Link
🔨 Latest commit 2d23320
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-studio-design-system/deploys/67c1ac58c480e300081837f8
😎 Deploy Preview https://deploy-preview-1167--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.

Copy link

netlify bot commented Feb 28, 2025

Deploy Preview for modest-rosalind-098b67 ready!

Name Link
🔨 Latest commit 2d23320
🔍 Latest deploy log https://app.netlify.com/sites/modest-rosalind-098b67/deploys/67c1ac58e4e3db0008a515d2
😎 Deploy Preview https://deploy-preview-1167--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.

@neoandmatrix
Copy link
Author

@Shurtu-gal can you please have a look at the mentioned approach and changes.

If all good then will proceed with this.

Thanks.

@neoandmatrix
Copy link
Author

@Shurtu-gal any update on this?

@Shurtu-gal
Copy link
Collaborator

Some other things also maybe need to be changed, like removing other views etc.
This can be a good starting point though.

Have you tested it out?

@neoandmatrix
Copy link
Author

neoandmatrix commented Mar 2, 2025

Actually no i haven't tested it out yet but have below 2 approaches for the same:-

As mentioned this change will only affect the implementation of asyncapi start preview so to test this as per my understanding i might need to build this package locally and replace in cli codebase with the one installed via npm then test out the working of changes, right?.

Or one other way could be to test websockets via sending requests through postman or something.

@Shurtu-gal Let me know your thoughts on above mentioned approaches and would be testing based on that and if some other way is also possible please guide.

Thanks.

@Shurtu-gal
Copy link
Collaborator

The first one is preferable. You can change package json to point to locally changed repo and start from there.

@neoandmatrix
Copy link
Author

The first one is preferable. You can change package json to point to locally changed repo and start from there.

Okay, will proceed with same.

@neoandmatrix
Copy link
Author

@Shurtu-gal was trying to build the studio and linking it to cli for testing but after the build for studio is complete i am not able to understand which folder form studio/build to link to cli for testing this and also there seems to be some problem with build as it's only working once like for example if I do some changes and then build for first time build is successful and everything works , now but if i again just run the same build command pnpm run build the build fails with nothing changed since last command. Also pnpm run dev starts to fail also.

It would be very helpful to me if you could provide some guidance on these issues for me to test this implementation.

Thanks.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
Status: Backlog
Development

Successfully merging this pull request may close these issues.

Additional parameter to start studio using core package with readOnly parameter.
2 participants