-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
UI - Tag Text Search #4383
UI - Tag Text Search #4383
Conversation
@@ -23,6 +23,10 @@ export default Controller.extend(WithFiltering, { | |||
get(item, 'Service') | |||
.toLowerCase() | |||
.indexOf(term) !== -1 || | |||
(get(item, 'Tags') || []) | |||
.join('') |
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.
Probably an edge case, but would it be weird if the match here is where two tags get elided? Would it be better to join on space instead of empty string?
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.
Hmmm yeah, so I suppose with tags like 'httpd, db' a search for 'pddb' would hit, will turn this into a some
or something 👍
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.
@meirish went for a some
for the moment at least, gonna merge but feel free to yell if something looks off with this, I added a couple more tests also, so should be good.
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.
👍 Looks good! Commented on a possible edge case, but I do think it's very edge case-y.
12107f7
to
e7a3235
Compare
Hi @Cricket007 I think there is a case to be said for either way for this (add to history/don't add to history). I actually fall down on the same side as you for this, I don't think typing into the search field should add to the history, but I'm guessing there are opinions that fall on the other side also. Happy for you to file an issue for this so we can discuss and track it, or I can do it for you? Would be nicer to get your user against a new issue though. Up to you, let me know. Thanks, John |
@johncowen I would be interested in hearing why that feature could be wanted. #4614 |
This PR adds simple text based searching by tag.
You can now enter a tag name in the service listing pages/tabs and the result will include services with that tag.
This is a temporary text search for tags before looking into something more complex.
I've split the tests off into the first commit so if you wan to go back a commit to see it breaking you can.