Skip to content
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

fetchLinkSuggestions: Allow for partial matching #62570

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

noisysocks
Copy link
Member

@noisysocks noisysocks commented Jun 14, 2024

What?

Follows #62397.

Really quick attempt at addressing @andrewserong's comment #62397 (review).

Why?

See #62397 (review).

How?

Update the scoring function added in #62397 to consider a title token as matching if it contains (str1.includes(str2), not str1 === str2) any of the search tokens.

Testing Instructions

Same as #62397, but search for something like "trave" instead of "travel".

@noisysocks noisysocks added [Type] Enhancement A suggestion for improvement. [Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) labels Jun 14, 2024
@noisysocks noisysocks requested a review from nerrad as a code owner June 14, 2024 06:32
Copy link

github-actions bot commented Jun 14, 2024

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: noisysocks <noisysocks@git.wordpress.org>
Co-authored-by: andrewserong <andrewserong@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@noisysocks noisysocks force-pushed the fix/link-suggestions-partial-matches branch from 60a6bc2 to 1a0fc6b Compare June 14, 2024 06:33
@noisysocks noisysocks changed the title Fix/link suggestions partial matches fetchLinkSuggestions: Allow for partial matching Jun 14, 2024
Copy link
Contributor

@andrewserong andrewserong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick follow-up! This is testing very nicely, too 👍

image image

LGTM! 🚀

@noisysocks noisysocks merged commit 4413591 into trunk Jun 17, 2024
62 checks passed
@noisysocks noisysocks deleted the fix/link-suggestions-partial-matches branch June 17, 2024 00:19
@github-actions github-actions bot added this to the Gutenberg 18.7 milestone Jun 17, 2024
patil-vipul pushed a commit to patil-vipul/gutenberg that referenced this pull request Jun 17, 2024
…#62570)

Co-authored-by: noisysocks <noisysocks@git.wordpress.org>
Co-authored-by: andrewserong <andrewserong@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants