Improve Docker Hub login experience#819
Conversation
|
ping |
| if (password) { | ||
| _token = await login(username, password); | ||
| if (_token) { | ||
| ext.dockerExplorerProvider.refreshRegistries(); |
There was a problem hiding this comment.
It looks like you call refreshRegistries before you set the keytar passwords in dockerHubLogin. I think you need to switch that order?
There was a problem hiding this comment.
Doesn't matter - key tar might not even be there. It's _token that matters for the refresh.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
explorer/models/rootNode.ts
Outdated
| private _containerCache: Docker.ContainerDesc[] | undefined; | ||
| private _containerDebounceTimer: NodeJS.Timer | undefined; | ||
| private _containersNode: RootNode | undefined; | ||
| private _dockerHubNode: RegistryRootNode = new RegistryRootNode('Docker Hub', "dockerHubRootNode", undefined, undefined); |
There was a problem hiding this comment.
whoops thanks
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...
