-
Notifications
You must be signed in to change notification settings - Fork 418
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
fix(search): prioritize start of word and exact match more #953
Conversation
I added the |
lib/features/search/search.js
Outdated
? 131.9 | ||
: 7.87 | ||
) | ||
: ( | ||
token.wordStart | ||
? 2.19 | ||
: 1 |
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.
What magic is this? :) Why such values?
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.
Standard magic values, call them temperature 🥵
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.
Gives me AI engineer vibes :D
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.
You gotta tune it some times. Though we have test coverage, which is good. 😉
I can reproduce camunda/camunda-modeler#4711 (comment) in this PR too. |
@@ -253,6 +253,32 @@ describe('features/search', function() { | |||
})); | |||
|
|||
|
|||
it('should prioritize longest match', inject(function(search) { |
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.
Good one!
@barmac Thanks for your tests! I think we get to something reasonable, one test at a time. Check my latest updates on this branch out or the following capture that shows this is fixed: We now score tokens by length, too, to prioritize longest matches. Also we de-prioritize non-matches: |
This gives longer matches precedence. chore(search): penalize unmatched tokens This ensures we score "most relevant" results higher.
Great improvement |
This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [bpmn-js](https://redirect.github.com/bpmn-io/bpmn-js) | [`17.11.1` -> `18.1.1`](https://renovatebot.com/diffs/npm/bpmn-js/17.11.1/18.1.1) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>bpmn-io/bpmn-js (bpmn-js)</summary> ### [`v18.1.1`](https://redirect.github.com/bpmn-io/bpmn-js/blob/HEAD/CHANGELOG.md#1811) [Compare Source](https://redirect.github.com/bpmn-io/bpmn-js/compare/v18.1.0...v18.1.1) - `FIX`: adjust search to prioritize start of word and exact matches ([bpmn-io/diagram-js#953](https://redirect.github.com/bpmn-io/diagram-js/pull/953)) - `FIX`: ignore whitespace when searching ([bpmn-io/diagram-js#954](https://redirect.github.com/bpmn-io/diagram-js/pull/954)) ### [`v18.1.0`](https://redirect.github.com/bpmn-io/bpmn-js/blob/HEAD/CHANGELOG.md#1810) [Compare Source](https://redirect.github.com/bpmn-io/bpmn-js/compare/v18.0.0...v18.1.0) - `FIX`: clear selection when opening search pad ([bpmn-io/diagram-js#947](https://redirect.github.com/bpmn-io/diagram-js/pull/947)) - `FIX`: correct dangling selection after search pad interaction ([bpmn-io/diagram-js#947](https://redirect.github.com/bpmn-io/diagram-js/pull/947)) - `DEPS`: update to `diagram-js@15.2.2` ### [`v18.0.0`](https://redirect.github.com/bpmn-io/bpmn-js/blob/HEAD/CHANGELOG.md#1800) [Compare Source](https://redirect.github.com/bpmn-io/bpmn-js/compare/v17.11.1...v18.0.0) - `FEAT`: remove `outline` from `Viewer` modules ([#​2135](https://redirect.github.com/bpmn-io/bpmn-js/issues/2135)) - `FEAT`: make `Canvas` a focusable element ([bpmn-io/diagram-js#662](https://redirect.github.com/bpmn-io/diagram-js/pull/662)) - `FEAT`: implicit keyboard binding ([bpmn-io/diagram-js#662](https://redirect.github.com/bpmn-io/diagram-js/pull/662)) - `FEAT`: integrate with global `search` ([#​2235](https://redirect.github.com/bpmn-io/bpmn-js/pull/2235)) - `FEAT`: integrate `popup-menu` with `search` ([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932)) - `FEAT`: recognize modern `search` tokens in `search-pad` ([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932)) - `FIX`: correctly handle duplicate entries and whitespace in `search` ([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932)) - `FIX`: find `search` terms across all keys ([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932)) - `FIX`: `search` always returns tokens for matched items ([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932)) - `FIX`: prevent crash during label adjustment ([#​2239](https://redirect.github.com/bpmn-io/bpmn-js/issues/2239)) - `FIX`: keep existing loop characteristics when toggling through the replace menu ([#​2251](https://redirect.github.com/bpmn-io/bpmn-js/pull/2251)) - `FIX`: prevent covering multi selection with black box in `Viewer` ([#​2135](https://redirect.github.com/bpmn-io/bpmn-js/issues/2135)) - `FIX`: generate types for main entry ([`986e2bb`](https://redirect.github.com/bpmn-io/bpmn-js/commit/986e2bb51ea301e6e0df56f3606a27424fb90179)) - `FIX`: correct handling of group name with whitespace only ([#​2231](https://redirect.github.com/bpmn-io/bpmn-js/issues/2231)) - `DEPS`: update to `bpmn-moddle@9` ([#​2114](https://redirect.github.com/bpmn-io/bpmn-js/pull/2114)) - `DEPS`: update to `diagram-js@15.1.0` - `DEPS`: update to `diagram-js-direct-editing@3.2.0` ##### Breaking Changes - Require `Node >= 20` - `Canvas` is now a focusable element and provides better support for native browser behaviors. Focus can be controlled with new `focus` and `restoreFocus` APIs. - Keyboard is now implicitly bound to canvas SVG element. Calls to `keyboard.bind` and `keyboard.bindTo` now result with a descriptive console error and have no effect. </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/camunda/camunda). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xOS4wIiwidXBkYXRlZEluVmVyIjoiMzkuMTkuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiYXV0b21lcmdlIl19-->
This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [bpmn-js](https://redirect.github.com/bpmn-io/bpmn-js) | [`17.11.1` -> `18.1.2`](https://renovatebot.com/diffs/npm/bpmn-js/17.11.1/18.1.2) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>bpmn-io/bpmn-js (bpmn-js)</summary> ### [`v18.1.2`](https://redirect.github.com/bpmn-io/bpmn-js/blob/HEAD/CHANGELOG.md#1812) [Compare Source](https://redirect.github.com/bpmn-io/bpmn-js/compare/v18.1.1...v18.1.2) - `FIX`: canvas `autoFocus` must explicitly be enabled ([bpmn-io/diagram-js#956](https://redirect.github.com/bpmn-io/diagram-js/pull/956)) - `FIX`: properly integrate `zoomscroll` with canvas focus ([bpmn-io/diagram-js#956](https://redirect.github.com/bpmn-io/diagram-js/pull/956)) - `FIX`: properly integrate `movecanvas` with canvas focus ([bpmn-io/diagram-js#956](https://redirect.github.com/bpmn-io/diagram-js/pull/956)) ### [`v18.1.1`](https://redirect.github.com/bpmn-io/bpmn-js/blob/HEAD/CHANGELOG.md#1811) [Compare Source](https://redirect.github.com/bpmn-io/bpmn-js/compare/v18.1.0...v18.1.1) - `FIX`: adjust search to prioritize start of word and exact matches ([bpmn-io/diagram-js#953](https://redirect.github.com/bpmn-io/diagram-js/pull/953)) - `FIX`: ignore whitespace when searching ([bpmn-io/diagram-js#954](https://redirect.github.com/bpmn-io/diagram-js/pull/954)) ### [`v18.1.0`](https://redirect.github.com/bpmn-io/bpmn-js/blob/HEAD/CHANGELOG.md#1810) [Compare Source](https://redirect.github.com/bpmn-io/bpmn-js/compare/v18.0.0...v18.1.0) - `FIX`: clear selection when opening search pad ([bpmn-io/diagram-js#947](https://redirect.github.com/bpmn-io/diagram-js/pull/947)) - `FIX`: correct dangling selection after search pad interaction ([bpmn-io/diagram-js#947](https://redirect.github.com/bpmn-io/diagram-js/pull/947)) - `DEPS`: update to `diagram-js@15.2.2` ### [`v18.0.0`](https://redirect.github.com/bpmn-io/bpmn-js/blob/HEAD/CHANGELOG.md#1800) [Compare Source](https://redirect.github.com/bpmn-io/bpmn-js/compare/v17.11.1...v18.0.0) - `FEAT`: remove `outline` from `Viewer` modules ([#​2135](https://redirect.github.com/bpmn-io/bpmn-js/issues/2135)) - `FEAT`: make `Canvas` a focusable element ([bpmn-io/diagram-js#662](https://redirect.github.com/bpmn-io/diagram-js/pull/662)) - `FEAT`: implicit keyboard binding ([bpmn-io/diagram-js#662](https://redirect.github.com/bpmn-io/diagram-js/pull/662)) - `FEAT`: integrate with global `search` ([#​2235](https://redirect.github.com/bpmn-io/bpmn-js/pull/2235)) - `FEAT`: integrate `popup-menu` with `search` ([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932)) - `FEAT`: recognize modern `search` tokens in `search-pad` ([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932)) - `FIX`: correctly handle duplicate entries and whitespace in `search` ([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932)) - `FIX`: find `search` terms across all keys ([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932)) - `FIX`: `search` always returns tokens for matched items ([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932)) - `FIX`: prevent crash during label adjustment ([#​2239](https://redirect.github.com/bpmn-io/bpmn-js/issues/2239)) - `FIX`: keep existing loop characteristics when toggling through the replace menu ([#​2251](https://redirect.github.com/bpmn-io/bpmn-js/pull/2251)) - `FIX`: prevent covering multi selection with black box in `Viewer` ([#​2135](https://redirect.github.com/bpmn-io/bpmn-js/issues/2135)) - `FIX`: generate types for main entry ([`986e2bb`](https://redirect.github.com/bpmn-io/bpmn-js/commit/986e2bb51ea301e6e0df56f3606a27424fb90179)) - `FIX`: correct handling of group name with whitespace only ([#​2231](https://redirect.github.com/bpmn-io/bpmn-js/issues/2231)) - `DEPS`: update to `bpmn-moddle@9` ([#​2114](https://redirect.github.com/bpmn-io/bpmn-js/pull/2114)) - `DEPS`: update to `diagram-js@15.1.0` - `DEPS`: update to `diagram-js-direct-editing@3.2.0` ##### Breaking Changes - Require `Node >= 20` - `Canvas` is now a focusable element and provides better support for native browser behaviors. Focus can be controlled with new `focus` and `restoreFocus` APIs. - Keyboard is now implicitly bound to canvas SVG element. Calls to `keyboard.bind` and `keyboard.bindTo` now result with a descriptive console error and have no effect. </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled because a matching PR was automerged previously. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/camunda/camunda). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS42OS4zIiwidXBkYXRlZEluVmVyIjoiMzkuNzIuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiYXV0b21lcmdlIl19-->
This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [bpmn-js](https://redirect.github.com/bpmn-io/bpmn-js) | [`17.11.1` -> `18.1.2`](https://renovatebot.com/diffs/npm/bpmn-js/17.11.1/18.1.2) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>bpmn-io/bpmn-js (bpmn-js)</summary> ### [`v18.1.2`](https://redirect.github.com/bpmn-io/bpmn-js/blob/HEAD/CHANGELOG.md#1812) [Compare Source](https://redirect.github.com/bpmn-io/bpmn-js/compare/v18.1.1...v18.1.2) - `FIX`: canvas `autoFocus` must explicitly be enabled ([bpmn-io/diagram-js#956](https://redirect.github.com/bpmn-io/diagram-js/pull/956)) - `FIX`: properly integrate `zoomscroll` with canvas focus ([bpmn-io/diagram-js#956](https://redirect.github.com/bpmn-io/diagram-js/pull/956)) - `FIX`: properly integrate `movecanvas` with canvas focus ([bpmn-io/diagram-js#956](https://redirect.github.com/bpmn-io/diagram-js/pull/956)) ### [`v18.1.1`](https://redirect.github.com/bpmn-io/bpmn-js/blob/HEAD/CHANGELOG.md#1811) [Compare Source](https://redirect.github.com/bpmn-io/bpmn-js/compare/v18.1.0...v18.1.1) - `FIX`: adjust search to prioritize start of word and exact matches ([bpmn-io/diagram-js#953](https://redirect.github.com/bpmn-io/diagram-js/pull/953)) - `FIX`: ignore whitespace when searching ([bpmn-io/diagram-js#954](https://redirect.github.com/bpmn-io/diagram-js/pull/954)) ### [`v18.1.0`](https://redirect.github.com/bpmn-io/bpmn-js/blob/HEAD/CHANGELOG.md#1810) [Compare Source](https://redirect.github.com/bpmn-io/bpmn-js/compare/v18.0.0...v18.1.0) - `FIX`: clear selection when opening search pad ([bpmn-io/diagram-js#947](https://redirect.github.com/bpmn-io/diagram-js/pull/947)) - `FIX`: correct dangling selection after search pad interaction ([bpmn-io/diagram-js#947](https://redirect.github.com/bpmn-io/diagram-js/pull/947)) - `DEPS`: update to `diagram-js@15.2.2` ### [`v18.0.0`](https://redirect.github.com/bpmn-io/bpmn-js/blob/HEAD/CHANGELOG.md#1800) [Compare Source](https://redirect.github.com/bpmn-io/bpmn-js/compare/v17.11.1...v18.0.0) - `FEAT`: remove `outline` from `Viewer` modules ([#​2135](https://redirect.github.com/bpmn-io/bpmn-js/issues/2135)) - `FEAT`: make `Canvas` a focusable element ([bpmn-io/diagram-js#662](https://redirect.github.com/bpmn-io/diagram-js/pull/662)) - `FEAT`: implicit keyboard binding ([bpmn-io/diagram-js#662](https://redirect.github.com/bpmn-io/diagram-js/pull/662)) - `FEAT`: integrate with global `search` ([#​2235](https://redirect.github.com/bpmn-io/bpmn-js/pull/2235)) - `FEAT`: integrate `popup-menu` with `search` ([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932)) - `FEAT`: recognize modern `search` tokens in `search-pad` ([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932)) - `FIX`: correctly handle duplicate entries and whitespace in `search` ([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932)) - `FIX`: find `search` terms across all keys ([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932)) - `FIX`: `search` always returns tokens for matched items ([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932)) - `FIX`: prevent crash during label adjustment ([#​2239](https://redirect.github.com/bpmn-io/bpmn-js/issues/2239)) - `FIX`: keep existing loop characteristics when toggling through the replace menu ([#​2251](https://redirect.github.com/bpmn-io/bpmn-js/pull/2251)) - `FIX`: prevent covering multi selection with black box in `Viewer` ([#​2135](https://redirect.github.com/bpmn-io/bpmn-js/issues/2135)) - `FIX`: generate types for main entry ([`986e2bb`](https://redirect.github.com/bpmn-io/bpmn-js/commit/986e2bb51ea301e6e0df56f3606a27424fb90179)) - `FIX`: correct handling of group name with whitespace only ([#​2231](https://redirect.github.com/bpmn-io/bpmn-js/issues/2231)) - `DEPS`: update to `bpmn-moddle@9` ([#​2114](https://redirect.github.com/bpmn-io/bpmn-js/pull/2114)) - `DEPS`: update to `diagram-js@15.1.0` - `DEPS`: update to `diagram-js-direct-editing@3.2.0` ##### Breaking Changes - Require `Node >= 20` - `Canvas` is now a focusable element and provides better support for native browser behaviors. Focus can be controlled with new `focus` and `restoreFocus` APIs. - Keyboard is now implicitly bound to canvas SVG element. Calls to `keyboard.bind` and `keyboard.bindTo` now result with a descriptive console error and have no effect. </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled because a matching PR was automerged previously. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/camunda/camunda). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS42OS4zIiwidXBkYXRlZEluVmVyIjoiMzkuNzIuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiYXV0b21lcmdlIl19-->
# Changes Siehe Changelog: https://github.com/bpmn-io/bpmn-js/blob/develop/CHANGELOG.md ## 18.1.2 * `FIX`: canvas `autoFocus` must explicitly be enabled ([bpmn-io/diagram-js#956](bpmn-io/diagram-js#956)) * `FIX`: properly integrate `zoomscroll` with canvas focus ([bpmn-io/diagram-js#956](bpmn-io/diagram-js#956)) * `FIX`: properly integrate `movecanvas` with canvas focus ([bpmn-io/diagram-js#956](bpmn-io/diagram-js#956)) ## 18.1.1 * `FIX`: adjust search to prioritize start of word and exact matches ([bpmn-io/diagram-js#953](bpmn-io/diagram-js#953)) * `FIX`: ignore whitespace when searching ([bpmn-io/diagram-js#954](bpmn-io/diagram-js#954)) ## 18.1.0 * `FIX`: clear selection when opening search pad ([bpmn-io/diagram-js#947](bpmn-io/diagram-js#947)) * `FIX`: correct dangling selection after search pad interaction ([bpmn-io/diagram-js#947](bpmn-io/diagram-js#947)) * `DEPS`: update to `diagram-js@15.2.2` ## 18.0.0 * `FEAT`: remove `outline` from `Viewer` modules ([bpmn-io#2135](bpmn-io#2135)) * `FEAT`: make `Canvas` a focusable element ([bpmn-io/diagram-js#662](bpmn-io/diagram-js#662)) * `FEAT`: implicit keyboard binding ([bpmn-io/diagram-js#662](bpmn-io/diagram-js#662)) * `FEAT`: integrate with global `search` ([bpmn-io#2235](bpmn-io#2235)) * `FEAT`: integrate `popup-menu` with `search` ([bpmn-io/diagram-js#932](bpmn-io/diagram-js#932)) * `FEAT`: recognize modern `search` tokens in `search-pad` ([bpmn-io/diagram-js#932](bpmn-io/diagram-js#932)) * `FIX`: correctly handle duplicate entries and whitespace in `search` ([bpmn-io/diagram-js#932](bpmn-io/diagram-js#932)) * `FIX`: find `search` terms across all keys ([bpmn-io/diagram-js#932](bpmn-io/diagram-js#932)) * `FIX`: `search` always returns tokens for matched items ([bpmn-io/diagram-js#932](bpmn-io/diagram-js#932)) * `FIX`: prevent crash during label adjustment ([bpmn-io#2239](bpmn-io#2239)) * `FIX`: keep existing loop characteristics when toggling through the replace menu ([bpmn-io#2251](bpmn-io#2251)) * `FIX`: prevent covering multi selection with black box in `Viewer` ([bpmn-io#2135](bpmn-io#2135)) * `FIX`: generate types for main entry ([`986e2bb`](bpmn-io@986e2bb)) * `FIX`: correct handling of group name with whitespace only ([bpmn-io#2231](bpmn-io#2231)) * `DEPS`: update to `bpmn-moddle@9` ([bpmn-io#2114](bpmn-io#2114)) * `DEPS`: update to `diagram-js@15.1.0` * `DEPS`: update to `diagram-js-direct-editing@3.2.0` ### Breaking Changes * Require `Node >= 20` * `Canvas` is now a focusable element and provides better support for native browser behaviors. Focus can be controlled with new `focus` and `restoreFocus` APIs ([bpmn-io/diagram-js#662](bpmn-io/diagram-js#662)). * Keyboard is now implicitly bound to canvas SVG element. Calls to `keyboard.bind` and `keyboard.bindTo` now result with a descriptive console error and have no effect ([bpmn-io/diagram-js#662](bpmn-io/diagram-js#662)). ## 17.11.1 * `FIX`: handle searching elements without labels ([bpmn-io#2232](bpmn-io#2232), [bpmn-io#2234](bpmn-io#2234)) ## 17.11.0 * `FEAT`: align search styles with other popups ([bpmn-io#2187](bpmn-io#2187)) * `FEAT`: prioritize start of tokens in search results ([bpmn-io#2187](bpmn-io#2187)) * `FIX`: do not commit viewport changes on `ESC` ([bpmn-io#2189](bpmn-io#2189), [bpmn-io#2187](bpmn-io#2187)) * `DEPS`: update to `diagram-js@14.10.0` ## 17.10.0 * `CHORE`: correct various type hints ([bpmn-io#2228](bpmn-io#2228)) * `FIX`: pasting compensation activity without boundary event ([bpmn-io#2070](bpmn-io#2070)) * `FIX`: lane resize constraints for se and nw direction ([bpmn-io#2209](bpmn-io#2209)) * `FIX`: auto place elements vertically in sub-processes ([bpmn-io#2127](bpmn-io#2127)) * `FIX`: hide lane label during direct editing * `DEPS`: update to `diagram-js@14.9.0` ## 17.9.2 * `FIX`: keep direction when collapsing pools ([bpmn-io#2208](bpmn-io#2208))
# Changes Siehe Changelog: https://github.com/bpmn-io/diagram-js/blob/develop/CHANGELOG.md ## 15.2.4 * `FIX`: canvas `autoFocus` must explicitly be enabled ([bpmn-io#956](bpmn-io#956)) * `FIX`: properly integrate `zoomscroll` with canvas focus ([bpmn-io#956](bpmn-io#956)) * `FIX`: properly integrate `movecanvas` with canvas focus ([bpmn-io#956](bpmn-io#956)) ## 15.2.3 * `FIX`: adjust search to prioritize start of word and exact matches ([bpmn-io#953](bpmn-io#953)) * `FIX`: ignore whitespace when searching ([bpmn-io#954](bpmn-io#954)) ## 15.2.2 * `FIX`: correct `Keyboard#bind` and config types ([bpmn-io#948](bpmn-io#948)) ## 15.2.1 * `FIX`: limit overly permissive regex ([bpmn-io#949](bpmn-io#949)) ## 15.2.0 * `FIX`: clear selection when opening search pad ([bpmn-io#947](bpmn-io#947)) * `FIX`: correct dangling selection after search pad interaction ([bpmn-io#947](bpmn-io#947)) * `CHORE`: simplify search pad pre-selection behavior ([bpmn-io#947](bpmn-io#947)) ## 15.1.0 * `FEAT`: integrate `popup-menu` with `search` ([bpmn-io#932](bpmn-io#932)) * `FEAT`: recognize modern `search` tokens in `search-pad` ([bpmn-io#932](bpmn-io#932)) * `FEAT`: improve `search` types ([bpmn-io#932](bpmn-io#932)) * `FIX`: correctly handle duplicate entries and whitespace in `search` ([bpmn-io#932](bpmn-io#932)) * `FIX`: find `search` terms across all keys ([bpmn-io#932](bpmn-io#932)) * `FIX`: `search` always returns tokens for matched items ([bpmn-io#932](bpmn-io#932)) ## 15.0.0 * `FEAT`: make canvas browser selectable ([bpmn-io#659](bpmn-io#659)) * `FEAT`: make keyboard binding implicit ([bpmn-io#661](bpmn-io#661)) * `FEAT`: make multi-selection outline an outline concern ([bpmn-io#944](bpmn-io#944)) ### Breaking Changes * `Keyboard` binding target can no longer be chosen. Configure keyboard binding via the `keyboard.bind` configuration and rely on keybindings to work if the canvas has browser focus. ([bpmn-io#661](bpmn-io#661)) * The `Canvas` is now a focusable component, that is recognized accordingly by the browser, with all benefits for UX and interaction. Components that pull focus from the `Canvas` during modeling must ensure to restore the focus (if intended), via `Canvas#restoreFocus`. ([bpmn-io#661](bpmn-io#661)) * The `selection` feature does not provide visual outline by default anymore. Use the `outline` feature to re-enable it. ([bpmn-io#944](bpmn-io#944)) ## 14.11.3 * `CHORE`: simplify viewbox cloning ([bpmn-io#935](bpmn-io#935)) ## 14.11.2 * `FIX`: restore search result highlight ([bpmn-io#931](bpmn-io#931)) * `FIX`: correct search result highlight not being removed ([bpmn-io#931](bpmn-io#931)) * `FIX`: do not change zoom when search openes ([bpmn-io#931](bpmn-io#931)) ## 14.11.1 _Partially reverts v14.11.0._ * `FIX`: revert `search` integration into popup menu ## 14.11.0 * `FEAT`: add `search` utility * `FEAT`: sort popup entry search results semantically ([bpmn-io#916](bpmn-io#916)) ## 14.10.0 * `FEAT`: align search styling with other popups ([bpmn-io#913](bpmn-io#913)) * `CHORE`: use existing outline in search ([bpmn-io#913](bpmn-io#913)) * `FIX`: only commit search viewport changes on `ENTER` ([bpmn-io#913](bpmn-io#913)) ## 14.9.0 * `CHORE`: export types compatible with `verbatimModuleSyntax` ([bpmn-io#927](bpmn-io#927), [bpmn-io#864](bpmn-io#864)) * `CHORE`: re-compute context pad position next frame ([bpmn-io#920](bpmn-io#920))
Test via
npx @bpmn-io/sr bpmn-io/bpmn-js -l bpmn-io/diagram-js#search-start
Proposed Changes
This prioritizes start of term and exact matches more aggressively.
This yields more substantial results in large popup (append) menus:
This yields better search results when querying larger data pools, where exact matches would otherwise de-prioritized:
Related to camunda/camunda-modeler#4122, camunda/camunda-modeler#3439.
Checklist
To ensure you provided everything we need to look at your PR:
@bpmn-io/sr
toolCloses {LINK_TO_ISSUE}
orRelated to {LINK_TO_ISSUE}