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

feat(pfFilter): Add filter options - inline, results count, items label #601

Merged
merged 1 commit into from
Aug 29, 2017

Conversation

jeff-phillips-18
Copy link
Member

Description

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

PR Checklist

  • Unit tests are included
  • Screenshots are attached (if there are visual changes in the UI)
  • A Designer (@beanh66) is assigned as a reviewer (if there are visual changes in the UI)
  • A CSS rep (@cshinn) is assigned as a reviewer (if there are visual changes in the UI)

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

@@ -1,3 +1,4 @@
@import "../node_modules/patternfly/node_modules/bootstrap/less/variables.less";
Copy link
Member

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

Copy link
Member Author

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.

@@ -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() {
Copy link
Member

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);

Copy link
Member Author

Choose a reason for hiding this comment

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

Added negative tests


.form-group {
margin-bottom: 0;
@media (min-width: 345px) {
Copy link
Member

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?

Copy link
Member

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.

Copy link
Member Author

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.

@dtaylor113
Copy link
Member

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
Copy link
Member

@dtaylor113 dtaylor113 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

Copy link
Member

@beanh66 beanh66 left a comment

Choose a reason for hiding this comment

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

Copy link
Member

@cshinn cshinn left a comment

Choose a reason for hiding this comment

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

Looks great

@dtaylor113
Copy link
Member

@cdcabrera, ok if I merge this or do you want a chance to review? -thanks

@cdcabrera
Copy link
Member

@dtaylor113 taking a look

Copy link
Member

@cdcabrera cdcabrera left a 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

@cdcabrera cdcabrera merged commit 1b20879 into patternfly:master Aug 29, 2017
@jeff-phillips-18 jeff-phillips-18 deleted the filter branch March 13, 2018 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants