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

Tag suggestions: Matches should be case insensitive #1905

Merged
merged 1 commit into from Feb 13, 2020

Conversation

codebykat
Copy link
Member

Fix

Tag suggestions should be case insensitive. Quick fix by lowercasing all the comparison strings before comparing (since startsWith doesn't have a flag for case sensitivity and moving to regex seemed overly complex). Added a test for this too.

Test

  1. Search for the name of a tag but with different case.
  2. Verify tag suggestions suggest the tag.
  3. Smoke test for other regressions involving search and tag suggestions.

Release

RELEASE-NOTES.txt was updated in TBD with:

Fixed tag suggestions to be case insensitive

@codebykat codebykat requested a review from a team February 13, 2020 08:35
@codebykat codebykat added [feature] search Anything related to searching. bug Something isn't working labels Feb 13, 2020
@codebykat codebykat self-assigned this Feb 13, 2020
Copy link
Contributor

@belcherj belcherj left a comment

Choose a reason for hiding this comment

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

Looks good. I was trying to think of a way to pull out name into a variable and lowercase it only once but nothing I thought of made it any cleaner.

@codebykat codebykat merged commit 2f33deb into develop Feb 13, 2020
@codebykat codebykat deleted the fix/case-insensitive-tag-suggestions branch February 13, 2020 19:06
@dmsnell
Copy link
Contributor

dmsnell commented Feb 13, 2020

For the time being I don't see it being a problem to call toLowerCase() on every tag because we're going to have to do some kind of string op on every one each time we change the search field text.

if/when we move searching into a WebWorker this will all change. see #1835 for an example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working [feature] search Anything related to searching.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants