-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
fixes bug in tag search feature #4222
fixes bug in tag search feature #4222
Conversation
now allows user to type in full name of tag and it does not disappear makes other changes to pass eslint failing tests moves methods around according to eslint tests makes use of prevState callback method due to eslint tests
removes complex logical expression comparison from !== to != changes made due to failing task in pull request
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.
Great job @torianne02 and great catch!
I've added some notes and a question but I've also tested it locally and it looks okay.
I'll wait for your feedback and then approve it!
updates logic to fix searchResults removes .filter()
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.
Great job @torianne02,
It works perfectly!
* fixes bug in tag search feature now allows user to type in full name of tag and it does not disappear makes other changes to pass eslint failing tests moves methods around according to eslint tests makes use of prevState callback method due to eslint tests * updates handleKeyDown method removes complex logical expression comparison from !== to != changes made due to failing task in pull request * removes commented out code that I added to test code updates logic to fix searchResults removes .filter() * adds comments to fixed code for clarification
What type of PR is this? (check all applicable)
Description
When typing in tags using the v2 editor, the tag disappears once you've typed in the full word. For example, if you want to type in
javascript
it will appear as a choice all the way up until you add thet
at the end of the word which causes it to disappear from the choice list.In order to fix this functionality I added an
OR
statement to the search method in the app/javascript/shared/components/tags.jsx file.I also made a few fixes to this file according to the eslint recommendations. They were minor changes, such as using
prevState
callback and reordering methods. Another suggestion from eslint that I implemented was to change all!=
comparison to!==
.A possible future edit could be to make sure a tag doesn't appear once it's already been chosen when searching. I'd be glad to work on that logic as well if needed.
Related Tickets & Documents
Someone reported the bug as a triage issue. The link to this is here.
Mobile & Desktop Screenshots/Recordings (if there are UI changes)
N/A
Added to documentation?
[optional] What gif best describes this PR or how it makes you feel?
My first open source pull request!!!!