Components: Fix autocomplete overlapping trigger matching#77018
Components: Fix autocomplete overlapping trigger matching#77018
Conversation
dbbe0dd to
c713540
Compare
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
c713540 to
d552a14
Compare
|
Size Change: +37 B (0%) Total Size: 7.74 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in d552a14. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/23937674107
|
There was a problem hiding this comment.
There's a test in this file called "should select the completer with the latest trigger index" that might now be better phrased as "should prefer the rightmost matching trigger when multiple completers match", or something like that, to match the new logic. (You have better context on this though)
What?
Closes #61919.
The approach is mostly similar to #70400, but it's a post-refactoring PR with unit tests.
PR fixes the autocomplete matcher logic and now handles overlapping triggers.
Why?
This was working, but regressed as noted in the issue.
Testing Instructions
@helloand@@helloin a paragraph block.@hello->@completer@@hello->@@completerSnippet
Use of AI Tools
Used Claude to double-check the fix.