Skip to content

Improve Docker Hub login experience#819

Merged
StephenWeatherford merged 3 commits intomasterfrom
saw/login
Mar 8, 2019
Merged

Improve Docker Hub login experience#819
StephenWeatherford merged 3 commits intomasterfrom
saw/login

Conversation

@StephenWeatherford
Copy link
Contributor

Fixes #429, fixes #375, fixes #817

The current experience only allows you to log in when you try to expand the Docker Hub tree. I changed it to instead mimic the Azure experience...
image

@StephenWeatherford StephenWeatherford requested a review from a team as a code owner March 5, 2019 00:12
@StephenWeatherford
Copy link
Contributor Author

ping

if (password) {
_token = await login(username, password);
if (_token) {
ext.dockerExplorerProvider.refreshRegistries();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you call refreshRegistries before you set the keytar passwords in dockerHubLogin. I think you need to switch that order?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't matter - key tar might not even be there. It's _token that matters for the refresh.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see _token passed in to refreshRegistries, though. How is _token used in the refresh?

In getDockerHubOrgs, I only see us getting a token directly from keytar https://github.com/Microsoft/vscode-docker/blob/master/explorer/models/registryRootNode.ts#L73

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, looks like you're right. At the moment it doesn't matter because the refresh is asynchronous. I have to rework this anyway as part of #722.

private _containerCache: Docker.ContainerDesc[] | undefined;
private _containerDebounceTimer: NodeJS.Timer | undefined;
private _containersNode: RootNode | undefined;
private _dockerHubNode: RegistryRootNode = new RegistryRootNode('Docker Hub', "dockerHubRootNode", undefined, undefined);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see this used

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoops thanks

@StephenWeatherford StephenWeatherford merged commit 167889a into master Mar 8, 2019
@StephenWeatherford StephenWeatherford deleted the saw/login branch March 8, 2019 03:05
@microsoft microsoft locked and limited conversation to collaborators Oct 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

2 participants