-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[Feature] Default environment #303
Comments
In the desktop app, as a user, I expect the most recently selected env to remain unchanged. |
This has nothing to do with it. When you open collection, there is no environment set. It should only affect that case. Any explicit selection, either manually or via cmd line param should not be touched. |
I would like to tackle this feature request because its annoying to have to remember to select an environment when first opening up a request. This just seems like a very nice QOL feature. As I have looked into this, it seems like we need a vars {
name: value
} I propose adding a group of values called I guess the alternative would be to add |
I just merged a PR that supports presets/defaults for request url and type. (#718) Here is my proposal. {
"version": "1",
"name": "bruno-testbench",
"type": "collection",
"presets": {
"requestType": "http",
"requestUrl": "http://localhost:6000",
"environment": "local"
}
} In the UI, the label will be
Similar logic applies to the main collection dropdown in the top right corner
|
@FedericoBiccheddu I agree with this. So when the
I think it makes sense to support option # 2 by default, and then provide a toggle in "App Level Settings" to choose # 1. @Its-treason @mirkogolze @martinsefcik Let me know if you have additional feedback on this issue. |
Add environment to the presets tab which will set the default environment on opening a collection. Show default environment inside of environment selector. Also add cli support for default environments.
I am testing a branch for default environments for both the UI and CLI. If you have the time, @majkinetor test it out and see if this is what you are looking for. Here: To set a default environment go to: Not sure how to best format the UI so feel free to offer suggestions if you have them. |
Hey @n00o I tried it, and it looks good to me, and works as expected. I didn't try CLI app with environment override but only GUI options. Presets should probably be renamed to Defaults IMO. |
Regarding #303 (comment) about App level settings, I agree, however, keep in mind that:
|
To test the dev CLI app, I had to use a command like this in node bru.js run 'filename.bru' Making sure to place these files in
If you want to test the CLI using this method, let me know if it works too @majkinetor. |
Add environment to the presets tab which will set the default environment on opening a collection. Show default environment inside of environment selector. Also add cli support for default environments.
Add environment to the presets tab which will set the default environment on opening a collection. Show default environment inside of environment selector. Also add cli support for default environments.
I would expect that it will be configurable in environments dialog. I don't want to configure two closely related things (default environment and environments itself) in two places in application. Also wouldn't it be better to store default environment flag directly in environment bru file ? |
I initially wrote that but deleted it. It makes sense, but there are other defaults, all available in single place under Presets, so it makes sense to have environment there too. Perhaps we could have it on both places - single checkbox in environment detail and combo box under Presets. |
I can add a default checkbox inside of the environment settings tab but I still think its best to only have the preset in the main
If we store it on an individual environment |
Yeah, less maintenance and single place of truth. Also, environment name is colored so you know even without looking at presets. |
@majkinetor did someone work on "colored environment"? I don't have this feature, I only found this issue, i added a draft PR. #304 I vote in favor of bruno.json instead of env.bru |
@n00o colored it, in dark theme default was yellow (or green :)) But this has nothing to do with colored environment, its only for the default |
But, if both are present we will have a problem as we won't be able to tell what is environment color and what is default. Probably something else than should be used to mark environment as default, such as bold or italic font, some symbol etc. |
Just a bit of feedback: I'm moving my team from Postman to Bruno atm and hving to select the environment each time the app is opened was confusing for the junior dev. Personally I think remembering the last set environment would be more helpful than a default, but having both would be better of course! Some kind of error message when a request is made and no environment is set would be helpful too. |
yeah resetting the environment everytime is not helping migrating from others api client to bruno. However great work / product on every other aspect, thanks 🙏 |
I opened a PR that maybe fix this issue |
Currently, when you open a request for collection, you always have to first set the environment.
I suggest we have a default environment that will be used upon opening a request collection if user didn't set anything. It can be settable either in collection properties (selecting existing environment) or in environment config (ticking a default checkbox).
This way, executing requests can be made to work immediately upon opening them and CLI will work without mandatory
--env
parameter.The text was updated successfully, but these errors were encountered: