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

Fix need for redundant enter when rename suggestions are not available #73247

Closed

Conversation

AmadeusW
Copy link
Contributor

@AmadeusW AmadeusW commented Apr 26, 2024

Context

In the current AI rename experience, developer needs to hit Enter twice to complete the rename.

Rename is completed only when user pressed enter and there is no popup with suggestions. Before suggestions were acquired automatically, first enter would close the popup and second enter would complete the rename.

When suggestions are acquired automatically, there is no popup but a list of suggestions. First enter "confirms" selection from the list and selects all text in the textbox. Second enter completes the rename. (We are deciding whether this is a good UX or if we'd like to change it).

Problem

The bug was that we required two enters even if the suggestions were hidden. i.e. user opted out from automatic rename suggestions, and we still required the first enter to "confirm"

in the gif, I'm hitting enter twice. first enter selects the content of the text box
smart rename double enter bug

Solution

When suggestions are not visible, don't require second enter
in the gif, I'm hitting enter just once
smart rename double enter fixed

Notes on commit 1

Currently, we keep two enter behavior when suggestions are visible

in the gif, I'm hitting enter twice. first enter selects the content of the text box
smart rename double enter expected

Notes on commit 2

I really don't like the double enter behavior, and the fact that the rename text box content gets selected when suggestions arrive. I made changes in commit 2 to address these. With commit 2, the only time user hits enter twice is when the dropdown is visible (Smart Rename is ON, Automatically getting suggestions is OFF)

in the gif, I'm hitting enter once. when suggestions arrive, there is no select-all that'd cause me to overwrite what I typed so far
smart rename selection and enter fixed

in the gif, I'm hitting enter twice because dropdown is used (Automatically getting suggestions is OFF). But notice there is no select-all
smart rename dropdown still needs double enter but selection fixed

@AmadeusW AmadeusW requested a review from a team as a code owner April 26, 2024 19:29
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Apr 26, 2024
@dotnet-policy-service dotnet-policy-service bot added the Community The pull request was submitted by a contributor who is not a Microsoft employee. label Apr 26, 2024
@AmadeusW AmadeusW force-pushed the dev/amwieczo/fixSmartRenameDoubleEnter branch from 59cbfe5 to 88d1e7f Compare April 26, 2024 22:37
@AmadeusW
Copy link
Contributor Author

@Cosifne please review :)

@Cosifne
Copy link
Member

Cosifne commented Apr 30, 2024

Close this as bot will flow the change to main

@Cosifne Cosifne closed this Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Community The pull request was submitted by a contributor who is not a Microsoft employee. untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants