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

Org Picker UI #623

Open
ntotten opened this Issue Sep 7, 2018 · 10 comments

Comments

Projects
None yet
6 participants
@ntotten
Copy link
Member

ntotten commented Sep 7, 2018

A developer will be working with two different orgs for development. This means that they will have to switch the org they are running commands against. In the CLI this is already easily done by specifying the targetUsername argument, however, there is no such capability in VS Code. As such, we should allow a developer to specify a default org to run commands against, similar to the above proposal about default package directory.

The bottom toolbar would show the currently selected org that operations are performed against.

image

Clicking on the org name would bring up a selection dialog that would present the user with the following options:

  • Authorize new Org
  • Create new Scratch Org
  • List of the rest of the authorized orgs...

image

They could then either select an org they have already authorized or authorize a new org or create a scratch org. The results of all of these operations would change the currently selected org.

Similar to the default package directory setting for VS Code, we would not want to store this in a file that is stored in source control (i.e. sfdx-project.json). This is a setting specific to the local developer and as such, the currently selected org would be stored in the .sfdx directory.

VS Code Command
In addition to allowing users to set the current org via UI we should expose the same functionality via the command “SFDX: Set Default Org”

Doc Impact
Current functionality opens the org in the browser. Make sure to alert the user of the new functionality & properly deprecate/remove current behavior from docs.

@andrewhorwood

This comment has been minimized.

Copy link

andrewhorwood commented Sep 7, 2018

This looks good. It would be very helpful to me and others

@ntotten ntotten added this to the Spring '19 (218) milestone Sep 7, 2018

@ntotten

This comment has been minimized.

Copy link
Member

ntotten commented Sep 7, 2018

Note: we will likely have to implement something like sfdx force:orgs:list --norefresh to use when displaying the list as the contents take a long time to load.

This also means though that we will need to have some capability of refreshing the org list such as a command SFDX: Refresh Org List

@ntotten ntotten removed the planned label Sep 7, 2018

@vmarasow

This comment has been minimized.

Copy link

vmarasow commented Sep 13, 2018

Would it be possible to implement the list functionality but leave the refresh functionality to be manually run via the CLI?

@ntotten

This comment has been minimized.

Copy link
Member

ntotten commented Sep 13, 2018

@vmarasow You will be able to refresh via the CLI, we will also add a command in VSCode.

@ChuckJonas

This comment has been minimized.

Copy link

ChuckJonas commented Sep 14, 2018

@ntotten I've done something similar for a desktop app to manage sfdx users. Instead of sfdx force:orgs:list --norefresh I just run once at activation and then cache the results. There is an option to manually refresh.

I think something similar would work (although the --norefresh flag would be nice for more than just this).

@venkatpolisetti

This comment has been minimized.

Copy link

venkatpolisetti commented Oct 15, 2018

@ntotten,

Is this feature coming anytime soon?

With 'develop against any org feature', I think this makes more sense now.

Thank you for thinking about all the devops headaches ahead of us.

@ntotten

This comment has been minimized.

Copy link
Member

ntotten commented Oct 22, 2018

@venkatpolisetti It's on our roadmap

@ntotten ntotten removed this from the Spring '19 (218) milestone Nov 7, 2018

@JimBTek

This comment has been minimized.

Copy link

JimBTek commented Dec 7, 2018

@ntotten could this functionality be when the user Right Clicks? and keep standard left click functionality? Clicking the org to launch it is a lovely convenience, and saves a lot of time. Thanks for writing this up.

@ntotten

This comment has been minimized.

Copy link
Member

ntotten commented Dec 7, 2018

I don't believe the extensibility allows right/left clicks on that area. We could consider keeping both options, but I am inclined to change this behavior as it aligns with what vscode does for git branches. We could maybe add a new button specifically for "open org". But there is a command "SFDX: Open Default Org", its a few extra clicks. You can also map a keyboard shortcut for this command.

@JimBTek

This comment has been minimized.

Copy link

JimBTek commented Dec 7, 2018

both are not things i seem to have to change frequently. Every morning to start work I click on the org to launch it. and i wouldn't frequently change orgs unless doing some deploying. So maybe it doesn't matter. Have Org management be intuitive in vscode would certainly be great, and is probably harder to learn on the CLI than launching the default org.

Extra Buttons might be better spent for frequent things like force:source:push

@ntotten ntotten added this to the Winter `19 milestone Jan 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment