Conversation
Modelled on Visual Studio's options search, scoped to what fits the current page layout: the box narrows the page strip to pages with a hit, highlights the hits on the shown page and scrolls the first one into view, and the Decompiler page hides its non-matching items. VS's aggregated results page with breadcrumbs is deliberately not built; it would mean re-hosting controls from every page. Pages publish their labels through IOptionPage.SearchableText instead of the view indexing them, because a TabControl only materialises the selected page and an unattached panel never applies its templates, so an ItemsControl-driven page has nothing to walk. Both new interface members have defaults so plugin pages keep compiling; a page without labels stays listed rather than becoming unreachable. Assisted-by: Claude:claude-fable-5-1:Claude Code
The box started 4px left of the page titles and sat directly on the tab strip with no gap below it. Its left margin now equals the TabControl plus TabItem padding, and the top and bottom margins match. Assisted-by: Claude:claude-fable-5-1:Claude Code
The Tab options group and the Misc startup checkbox were the only Options labels still written inline in XAML, which also meant the search index and the tab-options test each carried their own copy of the same text. Assisted-by: Claude:claude-fable-5-1:Claude Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before a search, the Options tab looks as it did, plus the search box above the page strip:
Searching
tab strip: the strip narrows to the Display page, the hits are highlighted and the first one is scrolled into view.Searching
usingon the Decompiler page: non-matching items are hidden, matching ones highlighted.Summary
View > Options gets a Visual Studio style search box. Typing narrows the page strip to pages with a hit, highlights the hits on the shown page and scrolls the first one into view. The Decompiler page, the only one long enough to need it, additionally hides its non-matching items. Escape and an inline clear button reset the search; a search with no hits shows a "No settings match" message instead of an empty strip.
Pages publish their labels through two new default-implemented
IOptionPagemembers,SearchableTextandApplySearch. The Decompiler page derives its labels from the viewmodel it already binds to; Display, Misc and ReadyToRun list theirs by hand, and a test fails if a label is added to their XAML without an index entry. A page that publishes nothing stays listed, so a plugin page that predates the search box never becomes unreachable. TestPlugin is left on the defaults to exercise that path.Options considered
The reference is VS's options search (search box top left, tree narrows to pages with hits, right side shows the matching settings with breadcrumbs). The question was how much of that to build without turning the Options tab into a results aggregator.
Hybrid was recommended because it gets the VS feel where it matters (the long, data-driven page narrows; the strip narrows; hits are visible immediately) at a fraction of the code, and because it is the only option besides highlight-only that cannot break a plugin's layout. Hide-everywhere remains a possible follow-up if a real page shows highlighting is not enough.
A second design point was where the search index comes from. Walking the views was ruled out: a
TabControlmaterialises only the selected page, and an unattached panel never applies its templates, so anItemsControl-driven page has no containers to walk. Hence the viewmodel-levelSearchableText, with the label-coverage test keeping the hand-written lists honest.Implementation notes
AccessText, aTextBlocksubclass with its own style key, so the highlight style uses:is(TextBlock).search-hit; a plainTextBlockselector silently misses every checkbox.VisiblePagesis edited in place rather than replaced, so theTabControlkeeps the shown panel and its scroll position while the user types.PropertyChangedhandlers when replaced.Deliberately not built
The aggregated results page and breadcrumbs, hiding non-matches on the XAML pages, searching picker entries or setting values, and a keyboard shortcut to focus the box.
Testing
Six new headless tests in
OptionsTabTests: strip narrowing and restore order, selection fallback when the selected page drops out, Decompiler narrowing (including Reset while narrowed), label coverage for every in-repo page, the highlight class and renderedFontWeighton a hit versus a non-hit plus scroll-into-view, and the no-match state.OptionsPageScrollReachTestsnow scopes to the Display panel's ownScrollViewer, since the searchTextBoxcarries one in its template.Full
ILSpy.Testsrun: 1343 pass, 4 skipped, 5 fail. The 5 are pre-existing and environmental: the TestPlugin lookup and one process-explorer test hardcode the platform-lessbin/Debugpath, so they fail for any build made with-p:Platform=Any CPU(asbuild.ps1does). Against a platform-less build they pass, including the plugin composition tests that exercise the changedIOptionPage.Assisted-by: Claude:claude-fable-5-1:Claude Code
🤖 Generated with Claude Code