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

Enable text search on combo boxes #9206

Merged
3 commits merged into from
Feb 19, 2021
Merged

Enable text search on combo boxes #9206

3 commits merged into from
Feb 19, 2021

Conversation

carlos-zamora
Copy link
Member

ComboBox has a text search function that allows users to type letters, and the ComboBoxItem starting with those letters is shown. In order to enable this functionality, the underlying items must be IStringable. This exposes a ToString() function and fixes all of our issues.

This PR adds the IStringable interface to ColorScheme, Profile, and EnumEntry.

References

#6800 - Settings UI Epic
#8768 - Keyboard Navigation
microsoft/microsoft-ui-xaml#4182 - discussion with WinUI about how to overcome this issue

Validation Steps Performed

Tested...

  • Launch > Default Profile
  • Color Schemes > Name
  • Profile > Appearance > Color scheme
  • Profile > Appearance > Font weight

Also tested radio buttons, but those still don't work, unfortunately. Looks like they don't have the same underlying mechanism.

@github-actions

This comment has been minimized.

@carlos-zamora
Copy link
Member Author

Filed #9207 as a follow-up task. Settings model objects should not be IStringable. Instead, the view model should be.

@DHowett DHowett added the AutoMerge Marked for automatic merge by the bot when requirements are met label Feb 18, 2021
@ghost
Copy link

ghost commented Feb 18, 2021

Hello @DHowett!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

Do note that I've been instructed to only help merge pull requests of this repository that have been opened for at least 8 hours, a condition that will be fulfilled in about 6 hours 15 minutes. No worries though, I will be back when the time is right! 😉

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@carlos-zamora carlos-zamora added the Needs-Second It's a PR that needs another sign-off label Feb 18, 2021
Copy link
Member

@zadjii-msft zadjii-msft left a comment

Choose a reason for hiding this comment

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

Okay I hate to block over just a trivial nit. So I won't block but I won't ✔️

src/cascadia/TerminalSettingsEditor/EnumEntry.idl Outdated Show resolved Hide resolved
src/cascadia/TerminalSettingsModel/ColorScheme.idl Outdated Show resolved Hide resolved
@ghost ghost merged commit 2c22b68 into main Feb 19, 2021
@ghost ghost deleted the dev/cazamor/sui/to-string branch February 19, 2021 18:11
@ghost
Copy link

ghost commented Mar 1, 2021

🎉Windows Terminal Preview v1.7.572.0 has been released which incorporates this pull request.:tada:

Handy links:

@JeffJefferson
Copy link

Is it possible to change the behaviour: "ComboBoxItem starting with those letters is shown" ? I want to type in only a part of the displayed value like the ending letters.

@zadjii-msft
Copy link
Member

@JeffJefferson I don't believe that's possible with a stock ComboBox. We'd need to entirely roll a forked version to support fuzzy matching. Maybe a good request for https://github.com/microsoft/microsoft-ui-xaml? Though, I'm not sure that fuzzy matching like that is common on most combobox UX's in any UI framework. Like, on the web, I'm pretty sure the matching is exclusive to the start of the string.

(happy to be proven wrong)

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AutoMerge Marked for automatic merge by the bot when requirements are met Needs-Second It's a PR that needs another sign-off
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants