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

Stop updating AutoSuggestBox on selection #17961

Merged
merged 1 commit into from
Sep 26, 2024
Merged

Conversation

lhecker
Copy link
Member

@lhecker lhecker commented Sep 25, 2024

AutoSuggestBox has a SuggestionChosen event and any reasonable
person would assume that this means one of the items was chosen.
But with WinUI it's raised whenever a suggestion is merely highlighted.
QuerySubmitted is the right event instead. Clearly that naming is
a lot better than SuggestionChosen, since the property to get the
chosen item is called ChosenSuggestion.
WinUI, like the unrelenting wilderness of a world indifferent to human
suffering, stands as a testament to the futility of human aspiration.

Closes #17916

Validation Steps Performed

  • Type "Casc"
  • Move up/down with the arrow keys
  • Neither the filtered list nor the text updates ✅
  • Press Enter on an item
  • Text updates ✅

Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

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

Thanks! Should we service this to 1.22 or 1.21?

@lhecker
Copy link
Member Author

lhecker commented Sep 26, 2024

Thanks! Should we service this to 1.22 or 1.21?

I don't think it's too critical. But if we're making a servicing release anyway, we may as well. This is a tiny change after all.

@lhecker lhecker added the AutoMerge Marked for automatic merge by the bot when requirements are met label Sep 26, 2024
@DHowett DHowett merged commit bcac999 into main Sep 26, 2024
20 checks passed
@DHowett DHowett deleted the dev/lhecker/17916-rm-rf-winui branch September 26, 2024 15:06
@microsoft-github-policy-service microsoft-github-policy-service bot added Issue-Bug It either shouldn't be doing this or needs an investigation. Area-Accessibility Issues related to accessibility Product-Terminal The new Windows Terminal. labels Sep 26, 2024
DHowett pushed a commit that referenced this pull request Sep 26, 2024
`AutoSuggestBox` has a `SuggestionChosen` event and any reasonable
person would assume that this means one of the items was chosen.
But with WinUI it's raised whenever a suggestion is merely highlighted.
`QuerySubmitted` is the right event instead. Clearly that naming is
a lot better than `SuggestionChosen`, since the property to get the
chosen item is called `ChosenSuggestion`.
WinUI, like the unrelenting wilderness of a world indifferent to human
suffering, stands as a testament to the futility of human aspiration.

Closes #17916

## Validation Steps Performed
* Type "Casc"
* Move up/down with the arrow keys
* Neither the filtered list nor the text updates ✅
* Press Enter on an item
* Text updates ✅

(cherry picked from commit bcac999)
Service-Card-Id: PVTI_lADOAF3p4s4AmhmszgTW9-g
Service-Version: 1.21
DHowett pushed a commit that referenced this pull request Sep 26, 2024
`AutoSuggestBox` has a `SuggestionChosen` event and any reasonable
person would assume that this means one of the items was chosen.
But with WinUI it's raised whenever a suggestion is merely highlighted.
`QuerySubmitted` is the right event instead. Clearly that naming is
a lot better than `SuggestionChosen`, since the property to get the
chosen item is called `ChosenSuggestion`.
WinUI, like the unrelenting wilderness of a world indifferent to human
suffering, stands as a testament to the futility of human aspiration.

Closes #17916

## Validation Steps Performed
* Type "Casc"
* Move up/down with the arrow keys
* Neither the filtered list nor the text updates ✅
* Press Enter on an item
* Text updates ✅

(cherry picked from commit bcac999)
Service-Card-Id: PVTI_lADOAF3p4s4AmhmQzgTW9-o
Service-Version: 1.22
@DHowett DHowett mentioned this pull request Oct 2, 2024
DHowett added a commit that referenced this pull request Oct 2, 2024
DHowett added a commit that referenced this pull request Oct 3, 2024
DHowett added a commit that referenced this pull request Oct 9, 2024
Reverts #17961
Closes #17987
Reopens #17916

(cherry picked from commit b715008)
Service-Card-Id: PVTI_lADOAF3p4s4AmhmszgTiWbM
Service-Version: 1.21
DHowett added a commit that referenced this pull request Oct 9, 2024
Reverts #17961
Closes #17987
Reopens #17916

(cherry picked from commit b715008)
Service-Card-Id: PVTI_lADOAF3p4s4AmhmQzgTiWbQ
Service-Version: 1.22
DHowett pushed a commit that referenced this pull request Oct 23, 2024
I wrote a big comment next to the changes I made.
This is a redo of #17961 which had various issues.

Closes #17916
Closes #18070 

## Validation Steps Performed
* Pressing Enter within the input line doesn't crash ✅
* Type "Cour" and pick Courier New, press Save = Saved ✅
* Pick any other font from the dropdown, press Save = Saved ✅
* Picking an option dismisses focus but not to the tab row ✅
* The first time after launching the SUI, when the setting is still
  unmodified, when you focus the box and pick an option,
  it'll unfocus the box ✅
* When the setting is unmodified, and you pick the default
  (Cascadia Mono), it'll still unfocus the box ✅
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Accessibility Issues related to accessibility AutoMerge Marked for automatic merge by the bot when requirements are met Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal.
Projects
3 participants