ResultadosDigitais / matrix

#matrix is the online open-source workplace inspired in sococo.com for distributed teams to have the experience of work together each day, side-by-side. No matter where team members might be. Working in an online workplace is even more productive when people are feeling in the same space.
MIT License
901 stars 238 forks source link

User and room search should ignore accents. #343

Closed phiter closed 4 years ago

phiter commented 4 years ago

Subject of the issue

When searching for a User in the sidebar, or a Room in the appbar, the search won't bring users if you don't include accents in the name.

Steps to reproduce

  1. Have a user or room with an accent somewhere in the name (eg: José/Café)
  2. Search for their name without including an accent (jose)

Example:

matrix

Expected behaviour

The filter function should ignore accents when searching for users.

Actual behaviour

It doesn't, and those users won't show up.

Possible Solution

Just make it so the filter ignores accents.

For ES6, String.prototype.normalize can be used, as recommended by this stack overflow answer.