Repository navigation
feat(popup-menu): add forceOrderMinScore to data-first node defs - #602
Merged
kianbazza merged 1 commit intoOct 28, 2026
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Summary
forceOrderis compared before score, so a row withforceOrder: -1leads any search it matches at all, even weakly. In a command menu where the theme options Light, Dark and System carryforceOrder: -1, typing "sett" puts System (score 0.14, through its keywords) above Settle (0.99).The new
forceOrderMinScoreon node defs keepsforceOrderfor good matches only:It's on every def that has
forceOrder: items, link items, tree items, radio and checkbox items, submenus and subpages. Every data-first sort uses the same helper: ungrouped rows, the order inside groups, radio groups and checkbox groups, the order of those groups, and the items-before-branches buckets.forceScore, when set, is the score compared. A row below the minimum still shows.Evidence
filterNodesfor "sett" over Settle and System (forceOrder: -1) returns[System, Settle].After: with
forceOrderMinScore: 0.5it returns[Settle, System]. For "s", where both score 0.99, System still leads.stateful-items.test.ts›forceOrderMinScorecover the preserve and flatten group behaviours, a strong match, the default,forceScoreon either side of the minimum, a radio group, and a submenu trigger. Five of the eight fail when the minimum is ignored.bun run check,bun run type-check,bun run test --filter @bazza-ui/react(1540 passed),bun run docs:type-gen.Merge Danger
Door: two-way
Blast Radius: none
Opt-in prop. Without it, sorting doesn't change.