-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Implement search in Settings UI #19519
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
base: main
Are you sure you want to change the base?
Conversation
- SearchMetadata is unsused, but it is designed to hold information
so that we can navigate to a setting
- Updated all pages to...
- have an x:Name on relevant setting containers
- have a NavigateToXArgs used in the OnNavigatedTo() function
- update the NavigateToXArgs to include the name of an element
to scroll down to
- Add BringIntoViewWhenLoaded() to HasScrollViewer<T> which
scrolls down to the element with a given name
These components aren't fully hooked up together yet and there's a
few TODO CARLOS's throughout. Main upcoming work:
- indexing
- runtime indexing
- search box UI
- search results UI
based on https://github.com/microsoft/PowerToys/blob/079c69b8beced55211485c352f41308426930e47/doc/specs/settings-search.md
- Adds referential XAML names to components of interest. - Adds a script that generates the build time entries to be loaded - Invokes the script in Editor.vcxproj
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
lhecker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need multiple runtimeclass NavigateTo classes? Why not use one and it has an IInspectable navigate-to argument?
src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
Honestly, that's a good idea now that we need one of these for every page we navigate to. I'll add a |
Summary of the Pull Request
Adds search functionality to the settings UI. This is added to an
AutoSuggestBoxin the mainNavigationView. Invoking a result navigates to the proper location in the settings UI and focuses the setting, when possible.References and Relevant Issues
Based on microsoft/PowerToys#41285
Detailed Description of the Pull Request / Additional comments
x:Nameso that we can navigate to them and bring them into view.BringIntoViewWhenLoaded()which navigates to the relevant part of the UI. This is called inOnNavigatedTo()for each page.MainPage:_UpdateSearchIndex: loads the search index generated byGenerateSettingsIndex.ps1; provides additional localization, if neededSettingsSearchBox_TextChanged:_QuerySearchIndex()SettingsSearchBox_QuerySubmitted: extract the search index metadata and call the correct_Navigate()functionValidation Steps Performed
Search for...
PR Checklist
Closes #12949
Follow-ups
These are some additional features that may be added as a part of this PR or as a follow-up: