Update Rename UI to accommodate for getting suggestions automatically#72790
Conversation
|
Do you want to target release/dev17.10? |
yes, thank you! |
| {"dotnet_rename_use_inline_adornment", new RoamingProfileStorage("TextEditor.RenameUseInlineAdornment")}, | ||
| {"dotnet_preview_inline_rename_changes", new RoamingProfileStorage("TextEditor.Specific.PreviewRename")}, | ||
| {"dotnet_collapse_suggestions_in_inline_rename_ui", new RoamingProfileStorage("TextEditor.CollapseRenameSuggestionsUI")}, | ||
| {"dotnet_rename_get_suggestions_automatically", new FeatureFlagStorage(@"Editor.AutoSmartRenameSuggestions")}, |
There was a problem hiding this comment.
The feature flag is defined as follows in the .pkgdef file:
[$RootKey$\FeatureFlags\Editor\AutoSmartRenameSuggestions]
"Value"=dword:00000000
|
Adding @romalpani and @verautia_microsoft for UX review |
src/EditorFeatures/Core.Wpf/InlineRename/UI/SmartRename/SmartRenameUserInputComboBox.xaml
Outdated
Show resolved
Hide resolved
Track the telemetry of rename
|
|
||
| GetSuggestionsCommand = new DelegateCommand(OnGetSuggestionsCommandExecute, null, threadingContext.JoinableTaskFactory); | ||
|
|
||
| var getSuggestionsAutomatically = _globalOptionService.GetOption(InlineRenameUIOptionsStorage.GetSuggestionsAutomatically); |
There was a problem hiding this comment.
should InlineRenameUIOptionsStorage.GetSuggestionsAutomatically be called nlineRenameUIOptionsStorage.UseSuggestionsPanel? I was confused when looking at this.
There was a problem hiding this comment.
Also InlineRenameUIOptionsStorage.CollapseSuggestionsPanel seems like controlling the GetSuggestionsAutomatically behavior. So I guess they might need a better name
|
|
||
| var getSuggestionsAutomatically = _globalOptionService.GetOption(InlineRenameUIOptionsStorage.GetSuggestionsAutomatically); | ||
| IsUsingResultPanel = getSuggestionsAutomatically; | ||
| IsUsingDropdown = !IsUsingResultPanel; |
There was a problem hiding this comment.
Maybe just use one bool value, or enum. I feel tracking two mutual exclusive states are quite confusing..
src/EditorFeatures/Core.Wpf/InlineRename/UI/SmartRename/SmartRenameViewModel_Telemetry.cs
Outdated
Show resolved
Hide resolved
|
Overall lgtm, we might want to
cc @dibarbet this is another QB PR. |






We're introducing an experiment to automatically request Rename suggestions.
We don't want to automatically obstruct the Rename options with suggested names, so we've worked with PMs and designers to come up with a UI that always accommodates for 3 results, and gets them automatically.
User may opt out of this behavior by toggling the Copilot button (via mouse or hitting Ctrl+Space), which would restore the default UI.
Screenshots and Gifs
Inline rename with Copilot, suggestions are obtained automatically
✨ this is the new scenario

Ctrl+Space works to toggle whether suggestions are obtained automatically. If they were off, hitting Ctrl+Space will request suggestions. This state is saved for next time when the rename dialog opens.

String changes:
For reference: Inline rename with Copilot, existing behavior
where Ctrl+Space or button press gets suggestions

Here, the copilot button is a bit smaller (and chevron is larger) so that buttons line up. Additionally, the progress bar does not have a light gray background that it had before.
For reference: Inline rename without Copilot
Here, the chevron button is a bit larger. I had to make this change so that the buttons line up in all 3 scenarios. This increased height of the textbox by 2px, which I believe looks better.
