Repository navigation
feat(settings): narrow search results to matching fields - #106
Merged
Merged
Conversation
The sidebar search only filtered the menu, so opening a matched page showed every field on it. Search now narrows the content to matching settings, shows per-page and per-tab match counts, opens the first page with a match, and explains matches hidden by a dependency. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kzamanbd
approved these changes
Nov 26, 2026
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.
Changes proposed in this Pull Request
Closes getdokan/dokan-pro#6226
The settings sidebar search only filtered the menu. Opening a matched page showed every field on it, so the setting you searched for was still hard to find. Search now narrows the content too.
Behaviour
settings-search.ts): the query is split into words. A field matches when every word appears in its label, title, description, placeholder, tooltip, options (lists of 8 or fewer), or the labels of the page/subpage/tab/section above it.search-match-style.ts). A results bar offers "Show all settings" (full page, matches still marked) and "Clear search".search-dependency-hint.tsx): a match hidden by a dependency is replaced by a row saying what reveals it, e.g. "Turn on “Connect to X” above to show this setting."confirmOnLeaveis on. Enter jumps to the first match (with the usual unsaved-changes prompt); Escape clears.aria-expanded="true", tab badges read as ", N matches", and marked rows start with a visually hidden "Search match:".Behaviour changes for consumers
<Settings>gets the new search when it bumps plugin-ui.onNavigatelike a menu click, so consumers that sync the URL will see it change while searching.API
LayoutMenu: new optionalexpandAllprop; sub-items now rendersecondaryLabel.useSettings(): new search members (searchQuery,searchIndex,isSearchVisible, …). Additive only.Settings.mdx: new Search section and selectors (settings-search-results-bar,settings-search-show-all,settings-search-clear,settings-search-empty,settings-tab-count-{id},settings-search-hidden-{id},settings-search-hidden-group-{id},[data-settings-search-match]).Follow-ups (not in this PR)
expandAlldoesn't reach nested subpage groups inLayoutMenu.How to test
npm run typecheck,npm run lint,npx wp-scripts test-unit-js(newsettings-search.test.ts, 11 tests).🤖 Generated with Claude Code