-
Notifications
You must be signed in to change notification settings - Fork 90
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
Conversation
59c99ca
to
f02f971
Compare
* @name patternfly card | ||
* | ||
* @description | ||
* Card module for patternfly. |
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.
Need to update this post copy/paste.
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.
Fixed.
f02f971
to
505bd9d
Compare
scope.config.appliedFilters.forEach(function (nextFilter) { | ||
if (nextFilter.title === filter.title && nextFilter.value === filter.value) { | ||
found = true; | ||
return found; |
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 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?
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.
Removed the return
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)"> |
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.
Why the tabindex="-1"
here?
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.
This is a copy of HTML from the Patternfly toolbar example.
These filters are currently case sensitive, should they be? |
505bd9d
to
d9f2a88
Compare
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. |
5c7d374
to
f25355d
Compare
@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. |
f25355d
to
f805e29
Compare
I believe all issues have been addressed |
f805e29
to
33a78c8
Compare
@dtaylor113 Shouldn't matter with these particular functions but best practice would be to put them in controller so I have moved them. |
Also, PF 2.2 has been released so this PR is OK to merge from that standpoint |
Hi, so where did the requirements for the simple filter come from? Is
|
@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. |
Ok, thanks, I hadn't seen the toolbar pattern. On Fri, Sep 4, 2015 at 11:11 AM, Jeffrey Phillips notifications@github.com
Dave Taylor |
Add pfSimpleFilter directive with ngDocs/Example and Unit Tests (PF 2.2 Dependent)
@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. |
Hi, I couldn't find any mention of it here: https://www.patternfly.org/patterns/ It wasn't until I downloaded and built patternfly itself that I was able to
On Sun, Sep 6, 2015 at 7:32 PM, Serena Chechile Doyle <
Dave Taylor |
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.
|
Adds a simple filter bar directive.