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

Added new button to save request modal #3976

Merged
merged 4 commits into from May 9, 2024

Conversation

shipko
Copy link
Contributor

@shipko shipko commented Apr 14, 2024

Description

I noticed that you can't cancel modal window when saving a request.
Снимок экрана 2024-04-14 в 08 53 29

  • Not Completed
  • Completed

I suggest adding a third "cancel" button, which will close the window without performing an action.
Снимок экрана 2024-04-14 в 09 08 40

Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

@click="onCloseConfirmSaveTab"
/>
</span>
<span class="flex space-x-2">
Copy link
Contributor

Choose a reason for hiding this comment

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

An extra cancel button is not required. Let the cross icon on the top right of the modal handle the cancellation case. So you can remove the entire span container

Copy link
Contributor Author

@shipko shipko Apr 24, 2024

Choose a reason for hiding this comment

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

Thanks for review!
Maybe you're right. I thought the user might have doubts about the action of the upper right cross. Adding a new button will add clarity. If your position remains unchanged, then I will correct it

Copy link
Contributor

Choose a reason for hiding this comment

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

@shipko The cross button inherently means to cancel the action. The same design and implementation is followed for most modals in the app. So we will follow the same. Let's remove the cancel button as it's redundant.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@JoelJacobStephen JoelJacobStephen left a comment

Choose a reason for hiding this comment

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

@shipko After having an internal discussion regarding this PR, we have decided to go with the following approach:

  1. Yes Button - Opens the save dialog modal and closes the tab
  2. No Button - Doesn't save and closes the tab
  3. Cancel Icon - (Present at the top right of the modal) - Neither saves nor closes the tab

Based on the above approach, I have suggested few changes to your implementation. Please go through the review comments and then we can go ahead with this PR.

@shipko shipko changed the base branch from release/2024.3.0 to main April 24, 2024 07:10
Copy link
Contributor

@JoelJacobStephen JoelJacobStephen left a comment

Choose a reason for hiding this comment

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

LGTM 💯

nivedin
nivedin previously approved these changes May 6, 2024
Copy link
Member

@nivedin nivedin left a comment

Choose a reason for hiding this comment

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

Just this minor addition, LGTM 💯

packages/hoppscotch-common/src/pages/index.vue Outdated Show resolved Hide resolved
@shipko shipko dismissed stale reviews from nivedin and JoelJacobStephen via c1fe26f May 6, 2024 16:07
@AndrewBastin AndrewBastin changed the base branch from main to release/2024.3.3 May 9, 2024 15:00
@AndrewBastin AndrewBastin merged commit 6c29961 into hoppscotch:release/2024.3.3 May 9, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants