bruno icon indicating copy to clipboard operation
bruno copied to clipboard

Changes discarded without warning when clicking off a tab

Open VictorioBerra opened this issue 1 year ago • 7 comments

Open a new script, add some changes, click off the script, click back, CHANGES GONE!!!

Same with environments: open configure environment. Create an environment "prod", add some variables, create a new environment "test", click back to "prod" CHANGES GONE!!!

No warnings, no prompts, nothing. Really frustrating.

VictorioBerra avatar Apr 03 '24 15:04 VictorioBerra

It has happend to me

tlaloc911 avatar Apr 03 '24 15:04 tlaloc911

Hi, I tried following the instructions @VictorioBerra wrote in the original comment, but it seemed like the variable names were saving fine. Is there another way to reproduce the bug?

AngelaSYuan avatar Apr 07 '24 04:04 AngelaSYuan

@AngelaSYuan I will upload a video tonight or tomorrow

VictorioBerra avatar Apr 07 '24 13:04 VictorioBerra

By the way, I would like to take on this bug! For context, this would be part of a school project that has a near deadline.

Also @VictorioBerra, I seemed to be able to replicate the bug for environment variables: when modifying variables, switching environments without clicking the "Save" button loses progress. The scripts part seems to work fine still though, but I will look out for your video.

I'm thinking of adding a short text warning near the blue Save button, and preventing the user from switching environments before saving. That way, their changes aren't unexpectedly lost. Would be open to hearing others' thoughts!

AngelaSYuan avatar Apr 07 '24 18:04 AngelaSYuan

@AngelaSYuan Yes the environment variables bug is correct. Regarding the save dialog, there is already a warning dialog, I would replicate it exactly to maintain consistency throughout Bruno:

image

To see this dialog, open a saved request, edit it (like headers or something), and then click close without saving.

Regarding the other bug:

Bruno_0ySRZJHwDF

VictorioBerra avatar Apr 07 '24 22:04 VictorioBerra

@VictorioBerra Got it! For some reason, I don't see a "New Script" option in the choices.

Screen Shot 2024-04-07 at 10 39 43 PM

However, I believe I fixed the bug for the environment variables bug! Just opened a PR here: https://github.com/usebruno/bruno/pull/2034

AngelaSYuan avatar Apr 08 '24 02:04 AngelaSYuan

@AngelaSYuan That is probably a Golden Edition only feature.

VictorioBerra avatar Apr 08 '24 13:04 VictorioBerra