thunderclient / thunder-client-support

Thunder Client is a lightweight Rest API Client Extension for VS Code.
https://www.thunderclient.com
Other
3.62k stars 128 forks source link

Don't lose environment variable edits when switching between environments to check variable names. #461

Open tomwitt2 opened 2 years ago

tomwitt2 commented 2 years ago

Is your feature request related to a problem? Please describe.

While switching between environments tabs to see what the name of the variables were used in a different environment, any edits made in the current environment tab are lost unless the user explicitly clicks the 'Save' button. It's natural to do back and forth switching between, to assure variables are named identically. Losing edits because of a failure to click 'save' is painful.

Another option would be to "import" the variable names from a different environment with the option to clear their values to assure that the variable names are similarly named

Describe the solution you'd like

  1. Don't lose the edits already made when switching between environments.
  2. Allow an import from another environment of the variable names that exist in that environment (optionally keeping the values)

Describe alternatives you've considered

Screen shots of the environment with the variable names for reference while editing the new environment.

Implementation:

tomwitt2 commented 2 years ago

I wish I would've known this 180 seconds ago.

Right clicking the Environment label in the Env tab allows a JSON export of that environment. This halfway solves the import issue and does give me copy and paste-able variable names from the JSON file, without having to switch environments to do variable name lookups.

rangav commented 2 years ago

Hi @tomwitt2 you can also duplicate Env from the menu

I will look into this issue