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
fix: show current context in quick pick #2920
Conversation
Even when the quick pick is fixed to show which items are pre-selected (issue containers#2754 item 2) it is not really clear to the user why one row is highlighted. This adds the text " (current)" to the current Kube context to make this obvious. Signed-off-by: Tim deBoer <git@tdeboer.ca>
shouldn't we fix the quickpick component instead ? |
We should fix the quick pick too, but to me it's still not obvious why one item is selected by default. e.g. in the image if kind-kind-cluster-5 was selected I still need to think for a second to realize that's because it's the current context. I'm not sure how else to show this, especially for new users. |
@deboer-tim should we put the current item as the first item of the list ? |
I mean, the extension could always set as current value the one being selected (independent of the quickpick) |
@@ -110,7 +110,7 @@ export async function updateContext( | |||
|
|||
quickPicks = contexts.map(context => { | |||
return { | |||
label: context.name, | |||
label: context.name === currentContext ? context.name + ' (current)' : context.name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
label: context.name === currentContext ? context.name + ' (current)' : context.name, | |
label: context.name === currentContext ? `${context.name} (current)` : context.name, |
Jeff's suggestion is better. Signed-off-by: Tim deBoer <git@tdeboer.ca>
What does this PR do?
Even when the quick pick is fixed to show which items are pre-selected (issue #2754 item 2) it is not really clear to the user why one row is highlighted. This adds the text " (current)" to the current Kube context to make this obvious.
Screenshot/screencast of this PR
What issues does this PR fix or reference?
N/A
How to test this PR?
Click on the context status bar to see the quick pick.