-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Desktop: Resolves: #13804: Change search Resources feature to case insensitive #13824
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
base: dev
Are you sure you want to change the base?
Conversation
…o case insensitive
| const filterLowerCase = props.filter.toLowerCase(); | ||
| return resource.title?.toLocaleLowerCase().includes(filterLowerCase) || resource.id.toLowerCase().includes(filterLowerCase); |
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.
Be sure to match the .toLowerCase and .toLocaleLowerCase uses. For certain system locales, .toLocaleLowerCase gives different output from .toLowerCase for the same input. For example, if the system locale is tr and props.filter is 'İ', then filterLowerCase would be 'i̇' and resource.title?.toLocaleLowerCase() would be 'i'. See also: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLocaleLowerCase.
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.
Fixed 🙈 Updated the code to use toLowerCase only.
|
Just wondering, why was there a need to move the search box to the left? The ask on the issue raised was just to add a bit of space below it |
|
|
Oh I see, that last requirement merged with the image to my eyes... |
Fixes #13804
Summary
This PR changes search functionality in Resources screen to case insensitive, adds a margin below the search field and align the search field to the left with CSS fixes for loading indicator.
Testing
resources_search_case_insensitive.mp4