-
Notifications
You must be signed in to change notification settings - Fork 4.2k
UI improvements for the Copilot rename feature #74149
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
UI improvements for the Copilot rename feature #74149
Conversation
ecda856
to
b0456ab
Compare
src/EditorFeatures/Core.Wpf/InlineRename/UI/Adornment/RenameFlyout.xaml.cs
Outdated
Show resolved
Hide resolved
src/EditorFeatures/Core.Wpf/InlineRename/UI/Adornment/RenameFlyout.xaml.cs
Outdated
Show resolved
Hide resolved
src/EditorFeatures/Core.Wpf/InlineRename/UI/Adornment/RenameFlyout.xaml.cs
Show resolved
Hide resolved
<Setter Property="Padding" Value="4,1,24,1" /> <!-- Add 20px to the right over the default template to prevent popup from changing size --> | ||
</Style> | ||
</ComboBox.ItemContainerStyle> | ||
</ComboBox> |
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.
skipping all the xaml. maybe @ryzngard can look at this part.
src/EditorFeatures/Core.Wpf/InlineRename/UI/SmartRename/SmartRenameUserInputComboBox.xaml.cs
Show resolved
Hide resolved
src/EditorFeatures/Core.Wpf/InlineRename/UI/SmartRename/SmartRenameUserInputComboBox.xaml.cs
Show resolved
Hide resolved
src/EditorFeatures/Core.Wpf/InlineRename/UI/SmartRename/SmartRenameUserInputComboBox.xaml.cs
Outdated
Show resolved
Hide resolved
src/EditorFeatures/Core.Wpf/InlineRename/UI/SmartRename/SmartRenameViewModel.cs
Outdated
Show resolved
Hide resolved
|
||
public bool SupportsAutomaticSuggestions { get; } | ||
|
||
public bool IsAutomaticSuggestionsEnabled { get; private set; } |
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.
doc what thread we can call these on.
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
For UI changes please make sure the following happens:
|
Sorry, I rebased to integrate with another PR |
|
Merge commits still work fine for that :-) |
{ | ||
if (this.SupportsAutomaticSuggestions) | ||
{ | ||
this.IsAutomaticSuggestionsEnabled = !this.IsAutomaticSuggestionsEnabled; |
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.
🤔Could you explain about this? why it needs to be flipped?
Also, target release/dev17.11 if you want to make it into 17.11. |
done, thank you! |
Ah I retarget the PR. Seems like the base is based on the main branch after the snap. So we need to manually pick change into 17.11 |
* simplify the rename UI * minor changes to textbox * restore the ComboBox * simplify the ComboBox * alignment, double click * partially implement the delay * implement the delay * fix layout, button highlight * fix strings * button highlight now indicates whether suggestions are obtained automatically * remove unused field * revert * add comments * revert unnecessary change * remove ICommand and use explicit, documented methods for fetching suggestions and toggling the behavior * simplify logic * indent * PR feedback * comments * fix cancellation token, add isDisposed flag * remove unused property * revert diagnostic values * address AccInsights issue * update accessible name to address a warning * fix warning * undo diagnostic change
This PR makes UI changes to the Copilot powered inline rename feature
Pictured below: Keyboard shortcut or button mouse click triggers rename and, if applicable (because of Feature Flag), records that from now on suggestions should be retrieved automatically. Next time rename UI opens, suggestions are obtained automatically.
Specifically, this PR brings the following changes:
Use the results panel (instead of the dropdown) in both automatic and explicit modes
Mouse double click to commit rename (from user feedback)
Fix issue where selecting rename suggestions may change width of the popup
Fix strings (hint and tooltip) that were swapped for automatic and explicit modes
Add delay prior to making the request
The button gets purple highlight only to designate its toggled state, i.e. rename is in automatic mode (through feature flag), and user opted into automatic suggestions (through button click or Ctrl+Space)