Improve environment editor to show inherited values
Two things that would be nice to see on the environment editor is 1) automatically add an initially empty environment for each environment defined at a higher level and 2) show in a visually distinct way values defined at a higher level. The first would make it much simpler to keep environment names in sync across various levels of inheritance. E.G. if you have a parent folder with an environment called "Staging", it would prevent you accidentally creating an environment named "Stage" in a child folder. Additionally it would save some effort if the "color" settings were inherited automatically.
The second feature would make it easier to get a coherent view of what your actual final environment would end up looking like. Ideally these inherited settings should be shown in a visually distinct way that makes them stand out from the other key/value pairs (perhaps shown in a greyed out or bolder manner). Attempting to edit an inherited value should insert it into the current environment as an override. It would also be nice if there was some kind of tooltip shown on hover of any inherited value that tells you which parent environment defined that value, something like "Defined in folder /Foo/Bar" assuming in this example that the environment being edited is a child of the Bar folder in the Foo folder.
The first would make it much simpler to keep environment names in sync across various levels of inheritance. E.G. if you have a parent folder with an environment called "Staging", it would prevent you accidentally creating an environment named "Stage" in a child folder.
Just to clarify. Environment names don't have any connection to inheritance. Whichever is the active environment in the workspace or a folder is inherited. They're only there for you to label / differentiate your data.
The second feature would make it easier to get a coherent view of what your actual final environment would end up looking like. Ideally these inherited settings should be shown in a visually distinct way that makes them stand out from the other key/value pairs (perhaps shown in a greyed out or bolder manner). Attempting to edit an inherited value should insert it into the current environment as an override. It would also be nice if there was some kind of tooltip shown on hover of any inherited value that tells you which parent environment defined that value, something like "Defined in folder /Foo/Bar" assuming in this example that the environment being edited is a child of the Bar folder in the Foo folder.
I think the idea is good the implementation would be really complex as this would be in the editor. I don't know about this. Something simpler might have to do.
As an alternative, maybe we can show a preview of the final environment below or beside the env editor? Maybe with some hints of where each value is coming from, like you've mentioned.
The first would make it much simpler to keep environment names in sync across various levels of inheritance. E.G. if you have a parent folder with an environment called "Staging", it would prevent you accidentally creating an environment named "Stage" in a child folder.
Just to clarify. Environment names don't have any connection to inheritance. Whichever is the active environment in the workspace or a folder is inherited. They're only there for you to label / differentiate your data.
OK, apparently environment inheritance works very different from how I initially thought it did and makes the feature request in issue #312 very critical in my opinion. I had assumed (wrongly it seems) that the dropdown at the top switched the environment of all folders to ones named the same. It turns out that it only switches the global environment, and to switch the environment of folders you need to manually open each folders environment from its context menu and select the active environment. This is very non-intuitive for someone coming from one of the other REST clients like Insomnia, or Postman.
Based on this new understanding point 1 is invalid now, although I would instead encourage addressing issue #312 ASAP instead as switching environments in Restfox is currently something of a headache requiring dozens of clicks to change environments in more complicated setups with multiple nested folders each with their own environments.
I've implemented the mentioned feature now. Quick switching will be available in the next release.