-
Notifications
You must be signed in to change notification settings - Fork 4k
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
ComboboxControl: Normalize hyphen-like unicode characters to ASCII hyphens when matching search queries #42942
ComboboxControl: Normalize hyphen-like unicode characters to ASCII hyphens when matching search queries #42942
Conversation
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @markbiek! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
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.
Thank you, this is working very nicely!
I just had some stylistic thoughts, but feature-wise I think this is good to go 👍 If you could also add a quick changelog, that'd be great.
34e17a9
to
26a919d
Compare
This removes accents, sets to locale-specific lowercase, and replaced hyphen-like unicode characters with an ASCII hyphen
…n-like characters
26a919d
to
f26e37d
Compare
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.
Looking good! Thank you so much for this solid improvement 🚀
Congratulations on your first merged pull request, @markbiek! We'd like to credit you for your contribution in the post announcing the next WordPress release, but we can't find a WordPress.org profile associated with your GitHub account. When you have a moment, visit the following URL and click "link your GitHub account" under "GitHub Username" to link your accounts: https://profiles.wordpress.org/me/profile/edit/ And if you don't have a WordPress.org account, you can create one on this page: https://login.wordpress.org/register Kudos! |
What?
When searching, treat hyphen-like characters as an ASCII hyphen (%2D).
Why?
This is the implementation agreed upon in discussions on #41952. This improves the search but doesn't affect search result highlighting or cause any other accessibility regressions.
How?
Following the example outlined by @ciampo , we have a list of hyphen-like characters that are replaced with an ASCII
-
when looking for search matches.Testing Instructions
Run
to verify string normalization is functioning properly.
Screenshots or screencast