-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Update the Copilot powered Inline Rename UX #76001
Update the Copilot powered Inline Rename UX #76001
Conversation
src/EditorFeatures/Core.Wpf/InlineRename/UI/SmartRename/SmartRenameViewModel.cs
Outdated
Show resolved
Hide resolved
src/EditorFeatures/Core.Wpf/InlineRename/UI/SmartRename/SmartRenameViewModel.cs
Outdated
Show resolved
Hide resolved
src/EditorFeatures/Core.Wpf/InlineRename/UI/SmartRename/SmartRenameViewModel.cs
Show resolved
Hide resolved
src/EditorFeatures/Core.Wpf/InlineRename/UI/SmartRename/SmartRenameViewModel.cs
Show resolved
Hide resolved
_cancellationTokenSource = new CancellationTokenSource(); | ||
_getSuggestionsTask = GetSuggestionsTaskAsync(isAutomaticOnInitialization, _cancellationTokenSource.Token).CompletesAsyncOperation(listenerToken); | ||
} | ||
} | ||
|
||
private async Task GetSuggestionsTaskAsync(bool isAutomaticOnInitialization, CancellationToken cancellationToken) | ||
{ | ||
if (isAutomaticOnInitialization) | ||
_threadingContext.ThrowIfNotOnUIThread(); |
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.
note: if thsi is already an async method, don't assert this, use a JTF switch to the actual main thread. it will be a no-op if not on the main thread.
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.
done
src/EditorFeatures/Core.Wpf/InlineRename/UI/SmartRename/SmartRenameViewModel.cs
Outdated
Show resolved
Hide resolved
src/EditorFeatures/Core.Wpf/InlineRename/UI/SmartRename/SmartRenameViewModel.cs
Outdated
Show resolved
Hide resolved
src/EditorFeatures/Core.Wpf/InlineRename/UI/SmartRename/SmartRenameViewModel.cs
Outdated
Show resolved
Hide resolved
Ping me tomorrow and I can finish this :-) |
5019067
to
2d29d0c
Compare
There is a slight delay prior to making Copilot request. Additionally, Roslyn might be gathering references and definition to add semantic context to the prompt.
Our UX designer recommended that we should be showing the progress bar while this is happening.
Before:
After:
Additionally, I saw that pressing Ctrl+Space to cancel ongoing request did not work, so I fixed it. In the "before" screenshot, I hit Ctrl+Space to cancel the request, then arrow down to scroll through suggestions, which were not visible
Before:
After: