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

Async API Studio should notify you that changes will be lost when selecting "New File" #724

Closed
rbhwellframe opened this issue Jul 5, 2023 · 6 comments · Fixed by #977
Closed
Labels
area/dx enhancement New feature or request good first issue Good for newcomers

Comments

@rbhwellframe
Copy link

Reason/Context

Please try answering few of those questions

  • Why we need this improvement?
    • Existing behavior is confusing / unexpected
  • How will this change help?
    • Users won't accidentally overwrite in progress async-api.yaml files
  • What is the motivation?
    • Users won't accidentally overwrite in progress async-api.yaml files

Description

Please try answering few of those questions

  • What changes have to be introduced?
    • Notification / confirmation dialogue on creating a new file
  • Will this be a breaking change?
    • Not sure
  • How could it be implemented/designed?
    • Notification / confirmation dialogue on creating a new file

Hi,
I wanted to suggest a pop-up dialogue when using AsyncAPI studio. I'm new to using the tool and just encountered something pretty unexpected (in my mind).

  1. User launches AsyncAPI studio via command line
    1a. (implied, selects a file using the cli like asyncapi start studio --file=async-api.yaml)
  2. User starts working on their new AsyncAPI file
  3. User realizes they want to start working on a new file
  4. User selects the "New file" pane from the left hand menu in Async API Studio
    4a.
    image
  5. User selects a template (kafka, in my case if it matters)
  6. Original file is updated to the template selected e.g. streelights example
  7. Control z etc do not work to bring back "original" file

Lost a couple hours of work due to 6. above, would like to try and prevent others from encountering the same! I understand now that by selecting the file via the cli means that it's really just going to be modifying that file. But the terminology "New File" made me think in the moment that it would be creating a new file. I think a pop up warning that you will lose current changes would be sufficient, since I'm not sure if it's possible to actually create + use a new file in the studio session.

Thanks!

@rbhwellframe rbhwellframe added the enhancement New feature or request label Jul 5, 2023
@github-actions
Copy link

github-actions bot commented Jul 5, 2023

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.

@nawed2611
Copy link
Contributor

Hey can i work on this?

@rbhwellframe
Copy link
Author

I wasn't planning on working on it - been using VSCode in the mean time. I'm not sure if there's a tag of people to "ask for permission" for, but sounds good to me :)

@KhudaDad414
Copy link
Member

@nawed2611 feel free to open a PR.

@Amzani Amzani added the area/dx label Feb 16, 2024
@Amzani Amzani added the good first issue Good for newcomers label Feb 26, 2024
@ashmit-coder
Copy link
Contributor

Hey @Amzani is this issue still open for PR's?

@ashmit-coder
Copy link
Contributor

ashmit-coder commented Feb 26, 2024

Hey @KhudaDad414 Will be helpfull if you look into the PR #977 :)

@github-project-automation github-project-automation bot moved this from Backlog to Done in Studio - Kanban Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dx enhancement New feature or request good first issue Good for newcomers
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants