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.84k stars 839 forks source link

Variable autocomplete dropdown doesn't show up when cursor is not at the end of the value field #5067

Open davidmichaelkarr opened 6 years ago

davidmichaelkarr commented 6 years ago

A large enterprise using Postman extensively will end up with many variables. The more variables you have, the longer the variable names are, and the harder it is to remember the exact names.

I suggest you make the URL fields, or wherever variables are referenced, into an "intelligent" field, such that the area within "{{ }}" strings, or perhaps just the opening "{{", should be treated specially, allowing for dynamic completion of matching variable names. As soon as a character is typed, and a reasonable delay expires (milliseconds), a dropdown should display the matching variable names, and allow selection of same.

This set of changes will make variables much more powerful and useful.

vkaegis commented 6 years ago

@davidmichaelkarr Thanks for writing in! Could you tell me which version of Postman you're currently using? We already have a variable autocomplete dropdown which should show up when you start typing "{{". If this isn't working for you, could you show us a small video or GIF to help us understand how the experience is for you?

davidmichaelkarr commented 6 years ago

Uh, how do I tell what version I have? There is no standard "About" in the Help menu.

vkaegis commented 6 years ago

@davidmichaelkarr If you go to the "Wrench" icon in the top right of the app, you will see a Settings option. This will open up a modal which has an About section.

screenshot 2018-08-25 10 30 20
davidmichaelkarr commented 6 years ago

Postman for Windows Version 6.2.5 win32 6.1.7601 / x64

vkaegis commented 6 years ago

@davidmichaelkarr Just checked, this should be working fine in 6.2.5. Can you check if you have an environment selected? The autocomplete list is populated with variables from the current active environment, global variables your active workspace and any collection variables (if your request is saved in a collection.

https://www.getpostman.com/docs/v6/postman/environments_and_globals/variables#autocomplete-and-tooltips-for-variables

If you're still unable to get it working, could you send over a small video or GIF to help us understand how the experience is for you?

vkaegis commented 6 years ago

Additionally, in the General tab of your Settings modal, could you check if you have the variable autocomplete option turned on?

screenshot 2018-08-27 13 28 55

davidmichaelkarr commented 6 years ago

I had autocomplete turned on, but this is the first I've heard of environments. What's the difference between variables in the environment and variables in the collection? I've only defined variables in the collection. Are you saying that autocomplete only works for variables in the environment?

davidmichaelkarr commented 6 years ago

Ah, and now I see a non-obvious limitation of this interface. Completion appears to only work if the field is otherwise empty, besides the opening "{{". If I duplicate a request, I want to be able to edit the url to reference a different variable. It appears I have to completely empty the url, then enter the "{{", select the variable I want, and then reenter the rest of the url. That's not very convenient.

vkaegis commented 6 years ago

@davidmichaelkarr Hah, now that you mention it, I do find some very inconsistent behavior here. I'm going to change this request to a bug. Will get back to you once I have more information.

Also, environments are like hot-swappable sets of variables, so you can switch between multiple sets of values for the same collection. A common use case for this is for using different values for different development, staging and production environments.

You can learn more about the different kinds of variables here: https://www.getpostman.com/docs/v5/postman/environments_and_globals/variables

VaishnaviChallaPostman commented 3 years ago

@Padmahas - https://github.com/postmanlabs/postman-app-support/issues/9948

AlvinLaiPro commented 2 years ago

Are there any updates on this bug?

WendySclerandi commented 2 years ago

Any updates on this bug?