postmanlabs / postman-app-support

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
https://www.postman.com
5.85k stars 841 forks source link

Postman shouldn't save draft environment changes on close. #13189

Closed jssullivan closed 1 month ago

jssullivan commented 1 month ago

Is there an existing request for this feature?

Is your feature request related to a problem?

How Postman handles environments is confusing if you forget there is a save button. Especially when cloning an environment and seeing it hitting the wrong endpoint (or mistakenly think its hitting the correct new one).

This combines with: Postman lets you close it with changes in draft. So when you return to it with changes to an env they will reflect the saved copy, not what is shown in the UI. You have to notice the save button isn't grayed out

Postman lets you open an API request and environment at the same time, edit the environment but not save it and go back to the request and fire it using the old/saved envs. Intuitively this should use the new unsaved variables regardless similar to how unsaved requests work.

Describe the solution you'd like

There could be an alert when changing tabs on an environments specifically this modal. This modal should show up when closing Postman (more generalized to all unsaved tabs) Screenshot 2024-10-09 at 11 53 11 AM

Alternatively Postman could always use the newest environment variables regardless of saved status or when firing a request there should be a warning in the UI that you are using an unsaved ENV to make the request.

Describe alternatives you've considered

No alternatives once you understand the functionality you understand what went wrong.

Additional context

No response

ronork commented 1 month ago

Hey @jssullivan, have you checked out the auto-save feature? It saves your environment values automatically when you edit, which helps avoid confusion. You can find the toggle in the general settings.Read about it here

375046565-d6c4f996-a2ef-4440-bab5-c6ea5ac7e0f9

Also, the new variable pane, available in Postman v11.14 and upwards, allows you to edit existing environment variables without needing to navigate away from your current setup. This could streamline your workflow and minimize issues related to unsaved changes. You can learn more about it here!

Let me know if this doesn’t solve your problem or if you were looking for something different!

jssullivan commented 1 month ago

Autosave works for me! I'll enable it and encourage others to as well!