Skip to content

Enable text search on combo boxes - #9206

Merged
3 commits merged into
mainfrom
dev/cazamor/sui/to-string
Feb 19, 2021
Merged

3 commits merged into
mainfrom
dev/cazamor/sui/to-string

Conversation

@carlos-zamora

Copy link
Copy Markdown

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
Copy Markdown
Author

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

@DHowett Dustin L. Howett (DHowett) added the AutoMerge Marked for automatic merge by the bot when requirements are met label Feb 18, 2021
@ghost

Copy link
Copy Markdown

Hello Dustin L. Howett (@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.

@zadjii-msft Mike Griese (zadjii-msft) left a comment

Copy link
Copy Markdown
Member

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 ✔️

@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
Copy Markdown

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

Handy links:

@JeffJefferson

Copy link
Copy Markdown

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
Copy Markdown
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