Skip to content

Add pfSimpleFilter directive with ngDocs/Example and Unit Tests (PF 2.2 Dependent) #67

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

Merged
merged 1 commit into from
Sep 4, 2015

Conversation

jeff-phillips-18
Copy link
Member

Adds a simple filter bar directive.

@jeff-phillips-18 jeff-phillips-18 force-pushed the filter branch 2 times, most recently from 59c99ca to f02f971 Compare September 3, 2015 18:25
* @name patternfly card
*
* @description
* Card module for patternfly.

Choose a reason for hiding this comment

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

Need to update this post copy/paste.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

scope.config.appliedFilters.forEach(function (nextFilter) {
if (nextFilter.title === filter.title && nextFilter.value === filter.value) {
found = true;
return found;

Choose a reason for hiding this comment

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

Is this return just to get out of the forEach()? If so, maybe use break;? Although I'm not sure if there would be much of a performance hit looping over the entire set of filters?

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed the return

@erundle
Copy link

erundle commented Sep 3, 2015

Is there any reason why we aren't leveraging any of the built in angular filtering capabilities?

</button>
<ul class="dropdown-menu">
<li ng-repeat="item in config.fields">
<a class="filter-field" role="menuitem" tabindex="-1" ng-click="selectField(item)">

Choose a reason for hiding this comment

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

Why the tabindex="-1" here?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a copy of HTML from the Patternfly toolbar example.

@waldenraines
Copy link

These filters are currently case sensitive, should they be?

@jeff-phillips-18
Copy link
Member Author

The are case sensitive on the app side, nothing here does the filter. though we could have two matching fitlers in the active filters list. We can fix that in the future if need be.

@jeff-phillips-18 jeff-phillips-18 force-pushed the filter branch 4 times, most recently from 5c7d374 to f25355d Compare September 4, 2015 11:10
@jeff-phillips-18
Copy link
Member Author

@erundle re: "Is there any reason why we aren't leveraging any of the built in angular filtering capabilities?"

This is just the components necessary to provide a filter bar. The directive does not filter it simply adds/removes filters in a way that the application can filter its data.

@jeff-phillips-18
Copy link
Member Author

I believe all issues have been addressed

@jeff-phillips-18
Copy link
Member Author

@dtaylor113 Shouldn't matter with these particular functions but best practice would be to put them in controller so I have moved them.

@jeff-phillips-18
Copy link
Member Author

Also, PF 2.2 has been released so this PR is OK to merge from that standpoint

@dtaylor113
Copy link
Member

Hi, so where did the requirements for the simple filter come from? Is
there a PF 'pattern'? Concerned that we are putting something in
angular-patternfly without proper 'vetting', feedback from designers -thanks
On Sep 4, 2015 10:39 AM, "Jeffrey Phillips" notifications@github.com
wrote:

Also, PF 2.2 has been released so this PR is OK to merge from that
standpoint


Reply to this email directly or view it on GitHub
#67 (comment)
.

@jeff-phillips-18
Copy link
Member Author

@dtaylor113 Not sure what you mean?? This is part of the toolbar requirements. The toolbar pattern was added in PF 2.2.

The rest of the Toolbar is coming shortly (if this ever gets in).

I don't put stuff in without direction from the PF product owner (Serena Doyle) and there are applications that are waiting on this functionality.

@dtaylor113
Copy link
Member

Ok, thanks, I hadn't seen the toolbar pattern.

On Fri, Sep 4, 2015 at 11:11 AM, Jeffrey Phillips notifications@github.com
wrote:

@dtaylor113 https://github.com/dtaylor113 Not sure what you mean?? This
is part of the toolbar requirements. The toolbar pattern was added in PF
2.2.

The rest of the Toolbar is coming shortly (if this ever gets in).

I don't put stuff in without direction from the PF product owner (Serena
Doyle) and there are applications that are waiting on this functionality.


Reply to this email directly or view it on GitHub
#67 (comment)
.

Dave Taylor
Principle Software Engineer
(978) 392 - 1016

dtaylor113 added a commit that referenced this pull request Sep 4, 2015
Add pfSimpleFilter directive with ngDocs/Example and Unit Tests (PF 2.2 Dependent)
@dtaylor113 dtaylor113 merged commit 0a27a70 into patternfly:master Sep 4, 2015
@serenamarie125
Copy link
Member

@dtaylor113 the pattern has been in progress by Chris and I for over a month. It's going to be used by both the self service UI as well as CloudForms 4.0 ( MIQ ). Hawkular is looking at using it as well. Chris was supposed to share it at last weeks UX team meeting, but he got bumped from the agenda. He will be posting a blog this week.

@dtaylor113
Copy link
Member

Hi,
Ok, I'm still getting used to the process. I was doing a code review for
Jeff on this, but couldn't find a reference doc to verify if all the
requirements had been met.

I couldn't find any mention of it here:

https://www.patternfly.org/patterns/
..or here:
https://www.patternfly.org/widgets/#overview
..or here:
https://rawgit.com/akurdyukov/patternfly/master/tests/basic.html

It wasn't until I downloaded and built patternfly itself that I was able to
find a mention of it.
Thanks,

  • Dave

On Sun, Sep 6, 2015 at 7:32 PM, Serena Chechile Doyle <
notifications@github.com> wrote:

@dtaylor113 https://github.com/dtaylor113 the pattern has been in
progress by Chris and I for over a month. It's going to be used by both the
self service UI as well as CloudForms 4.0 ( MIQ ). Hawkular is looking at
using it as well. Chris was supposed to share it at last weeks UX team
meeting, but he got bumped from the agenda. He will be posting a blog this
week.


Reply to this email directly or view it on GitHub
#67 (comment)
.

Dave Taylor
Principle Software Engineer
(978) 392 - 1016

@serenamarie125
Copy link
Member

No worries. Often we have our design documents in google docs before they are posted to the site. This is the case at this point. The usage guidelines are not necessarily posted on the PF site before the implementation is complete - especially when we are under time constraints.

  • Serena

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