-
Notifications
You must be signed in to change notification settings - Fork 90
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
feat(pfFilter): Add filter options - inline, results count, items label #601
Conversation
styles/angular-patternfly.less
Outdated
@@ -1,3 +1,4 @@ | |||
@import "../node_modules/patternfly/node_modules/bootstrap/less/variables.less"; |
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.
What?! Didn't you stop me from adding bootstrap variables? #543
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.
LOL, right... I will remove.
test/filters/filter.spec.js
Outdated
@@ -207,4 +207,51 @@ describe('Directive: pfFilter', function () { | |||
|
|||
expect(element.find('.pf-table-view-selected-label').text()).toContain('0 of 10 selected'); | |||
}); | |||
|
|||
it('should show results inline when specified', function() { |
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.
To be truly well rounded, each of these three tests need a negative test. Ex: "should not show results inline when not specified" expect(element.find('.filter-pf.inline-filter-pf').length).toBe(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.
Added negative tests
src/filters/filters.less
Outdated
|
||
.form-group { | ||
margin-bottom: 0; | ||
@media (min-width: 345px) { |
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.
Is there a variable for this? Thought this would be why you @imported bootstrap variables.less?
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.
Are there no patternfly variables which denote the min-widths at diff screen sizes? If not, we should file an issue and add our own, then we don't have to worry about bootstrap variables being overwritten.
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.
Removing as this is unnecessary. Thanks.
Other than the minor issues I raised, LGTM |
Provides options to: display filter and result on a single line show the total count in the results label (i.e. 5 of 10 Results) change the label from Results to a passed in string
4bd1cbe
to
a1c44d9
Compare
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.
LGTM, thanks
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.
LGTM @jeff-phillips-18
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 great
@cdcabrera, ok if I merge this or do you want a chance to review? -thanks |
@dtaylor113 taking a look |
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.
Technical wise lgtm
Behavior feels a little funky around having the field populated then switching to a dropdown filtering method, though that may be just me.
Edit: And so I don't sound like a crazy person... clarification:
I had entered text in the input field then flipped to the month selector not realizing it was a drop down with the associated icon and kept trying to type
Description
Provides options to:
PR Checklist
Rawgit Link (in lieu of screen shots)
https://rawgit.com/jeff-phillips-18/angular-patternfly/filter-docs/dist/docs/index.html#/api/patternfly.filters.component:pfFilter