Skip to content
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

Add "Configure Intellisense" Status Bar Item #10690

Merged
merged 35 commits into from
Mar 24, 2023
Merged

Conversation

browntarik
Copy link
Contributor

@browntarik browntarik commented Mar 16, 2023

Work item reference (GitHub issue link, etc.): #10685

Problem:
• Users are having trouble configuring a compiler for IntelliSense even with our notification on startup
Fix:
• Add a persistent status bar item that will let the user know they do not have a compiler selected. This status bar item will call the Select Default Compiler command

How tested:
• Manual Testing

Implementation Summary:
• Added compilerStatusBarItem to UI along with corresponding member variables which are set in client.ts

@browntarik browntarik enabled auto-merge (squash) March 16, 2023 17:15
Extension/src/LanguageServer/ui_new.ts Outdated Show resolved Hide resolved
Extension/src/LanguageServer/ui_new.ts Outdated Show resolved Hide resolved
Extension/src/LanguageServer/ui_new.ts Outdated Show resolved Hide resolved
Extension/src/LanguageServer/ui.ts Outdated Show resolved Hide resolved
Extension/src/LanguageServer/ui.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@sean-mcmanus sean-mcmanus left a comment

Choose a reason for hiding this comment

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

It still pops up the "You do not have IntelliSense configured" 2nd prompt if it gets configured from the Status Bar item (or some other means) -- is that fixable? I was thinking maybe it could check if the setting had gotten set already. Or maybe we could file another issue to track that.

Copy link
Collaborator

@sean-mcmanus sean-mcmanus left a comment

Choose a reason for hiding this comment

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

The status UI doesn't disappear after I set the C_Cpp.default.compilerPath in the settings.json

Copy link
Collaborator

@sean-mcmanus sean-mcmanus left a comment

Choose a reason for hiding this comment

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

Can we use a timer to delay showing the Status Bar item till the prompt has appeared for 15 seconds (when the auto-hide will occur) so they don't both appear at the same time?

image

You can use the setTimeout function (there are examples in the code).

Copy link
Collaborator

@sean-mcmanus sean-mcmanus left a comment

Choose a reason for hiding this comment

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

I think we need to fix the bug #10691 before adding this status bar UI.

Copy link
Collaborator

@sean-mcmanus sean-mcmanus left a comment

Choose a reason for hiding this comment

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

@bobbrow @browntarik Should the status bar item open the original info prompt instead of the Select Compiler dropdown if a potential compiler is found? That would make it easier to click the Yes button.

@browntarik
Copy link
Contributor Author

@bobbrow @browntarik Should the status bar item open the original info prompt instead of the Select Compiler dropdown if a potential compiler is found? That would make it easier to click the Yes button.

This is an interesting idea. @AlexandraKemperMS what do you think?

@AlexandraKemperMS
Copy link

@bobbrow @browntarik Should the status bar item open the original info prompt instead of the Select Compiler dropdown if a potential compiler is found? That would make it easier to click the Yes button.

This is an interesting idea. @AlexandraKemperMS what do you think?

I like this idea, but I think for a lot of users the quickpick will be much more noticeable - around half of users dismiss the notification, and that's the ones who respond at all/see it in the first place. Also, the compiler we would normally recommend in the notification would be at the top of the list in the quickpick, so also the first thing to select.

@sean-mcmanus
Copy link
Collaborator

I like this idea, but I think for a lot of users the quickpick will be much more noticeable - around half of users dismiss the notification, and that's the ones who respond at all/see it in the first place. Also, the compiler we would normally recommend in the notification would be at the top of the list in the quickpick, so also the first thing to select.

Ok, that makes sense to me.

@sean-mcmanus
Copy link
Collaborator

I think we need to fix the bug #10691 before adding this status bar UI.

Bob says this can be fixed afterwards.

Extension/src/LanguageServer/ui.ts Outdated Show resolved Hide resolved
Extension/src/LanguageServer/ui.ts Outdated Show resolved Hide resolved
Extension/src/LanguageServer/ui_new.ts Outdated Show resolved Hide resolved
Extension/src/LanguageServer/ui_new.ts Outdated Show resolved Hide resolved
Extension/src/telemetry.ts Outdated Show resolved Hide resolved
Extension/src/telemetry.ts Outdated Show resolved Hide resolved
Extension/src/LanguageServer/ui_new.ts Show resolved Hide resolved
@browntarik browntarik merged commit c417da6 into main Mar 24, 2023
@browntarik browntarik deleted the browntarik/compilerWarning branch March 24, 2023 00:22
@github-actions github-actions bot locked and limited conversation to collaborators May 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants