-
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: Replaces Service listing filterbar with a phrase-editor search #5507
ui: Replaces Service listing filterbar with a phrase-editor search #5507
Conversation
1. New phrase-editor restricting search to whole phrases (acts on enter key). Allows removal of previously entered phrases 2. Searching now allows arrays of terms, multiple terms work via AND
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.
Nothing blocking.
} | ||
searchable.forEach(item => { | ||
item.search(get(this, 'items')); | ||
}); |
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.
I would normally expect this component to accept an action as an argument and call it rather than requiring a searchable as an interface. It limits its reusability.
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.
Yep agree, this will eventually move up into a wrapping component when we compose more functionality here and wrap it up in a final reusable component.
ui-v2/app/search/filters/service.js
Outdated
); | ||
let status; | ||
switch (true) { | ||
case term.indexOf('service:') === 0: |
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.
For what it's worth, Ember has had term.startsWith('service:')
for ages and startsWith
has been standard lib as of ES2015.
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.
Ah yeah, nice, thankyou! Will sort in a sec.
Hey thanks for this! I switched out the |
…5507) 1. New phrase-editor restricting search to whole phrases (acts on enter key). Allows removal of previously entered phrases 2. Searching now allows arrays of terms, multiple terms work via AND
…5507) 1. New phrase-editor restricting search to whole phrases (acts on enter key). Allows removal of previously entered phrases 2. Searching now allows arrays of terms, multiple terms work via AND
* ui: Replaces Service listing filterbar with a phrase-editor search (#5507) 1. New phrase-editor restricting search to whole phrases (acts on enter key). Allows removal of previously entered phrases 2. Searching now allows arrays of terms, multiple terms work via AND
* ui: Replaces Service listing filterbar with a phrase-editor search (#5507) 1. New phrase-editor restricting search to whole phrases (acts on enter key). Allows removal of previously entered phrases 2. Searching now allows arrays of terms, multiple terms work via AND
This PR marks the beginning of work towards new improved search functionality. Specifically this PR introduces a new
phrase-editor
component that looks like:Currently this work is only present on the Services Listing page.
Changes to previous search:
field:term
syntax on specific fields. Here for example you can useservice:name
,tag:name
,status:critical
. This means you have much more control over what you are searching for.Technically:
%0A
) as a separator in the URL, ideally I'd like to usefilter[]=service:name&filter[]=tag:name
but it looks like this is problematic so we avoided that rabbit hole by using 'return'/'0A'Ignored the previous tests for this as they now break. But we are shelving this work for the moment to come back at a later date.