Add lodash deburr to autocomplete so that is works with diacritics#10770
Conversation
…ing starts with an Umlaut
…re run through lodash's deburr function to allow using characters with diacrytics
|
Do we have any e2e tests that could cover this change, either in this PR or a follow-up PR? |
|
I'm pretty new to working on Gutenberg so I'm not too familiar with the e2e tests, but I will try to look into it and add one this week if I can. |
|
This could also be just a unit test, I think. |
|
Hmm, so I had hoped there would be some existing unit tests for the autocomplete component that I could work off of, but I'm not seeing any. I spent some time on this, but I'm afraid that creating these tests might be a bit beyond me at this point. I could get the autocomplete component loaded in with a completer and verify the options were set in the AutoCompleter component, but I couldn't figure out interacting with it to generate a list of the options bosed on input, unless someone could point me in the right direction? |
|
@brentswisher It's fine we can get it in without tests or someone else could chime in. |
youknowriad
left a comment
There was a problem hiding this comment.
Too bad it works only for latin languages though.
I can't search for صُورَ to get the image block for instance in arabic.
Description
Added lodash's deburr function to the autocomplete so that when searching in a language that has diacritics it will find them both with and without the diacrytic. For example now both "/U" and "/Ü" will find the "Überschrift" block in the German language.
How has this been tested?
Type /U and /Ü and verify that they both return the expected result block in the German Language. FIxes #10489
Screenshots
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist: