Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Conversation

lievenjanssen
Copy link
Contributor

Add md-min-length to md-contact-chips and propagate attribute to md-autocomplete.
Add md-has-not-found=true attribute to md-autocomplete.

Fixes #2423.

Add md-min-length to md-contact-chips and propagate attribute to md-autocomplete.
Add md-has-not-found=true attribute to md-autocomplete.

Fixes #2423.
@lievenjanssen
Copy link
Contributor Author

@topherfangio @ThomasBurleson any reason why nothing happened yet (e.g. 'needs review' tags) on this PR?

@@ -63,6 +65,8 @@ var MD_CONTACT_CHIPS_TEMPLATE = '\
md-items="item in $mdContactChipsCtrl.queryContact($mdContactChipsCtrl.searchText)"\
md-item-text="$mdContactChipsCtrl.itemName(item)"\
md-no-cache="true"\
md-min-length="$mdContactChipsCtrl.minLength"\
md-has-not-found="true"\
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry for the delay; Thomas and I have both been traveling a bit.

Can you describe the necessity of the md-has-not-found here since it is automatically added if we see the associated template?

Copy link
Contributor Author

@lievenjanssen lievenjanssen Aug 11, 2016

Choose a reason for hiding this comment

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

@topherfangio when I don't set the md-has-not-found attribute the search function is not called when md-min-length equals 0. I noticed that it was also set to true on the first md-autocomplete demo. If it's better to fix this in another way can you point me in the right direction?

Copy link
Contributor Author

@lievenjanssen lievenjanssen Aug 17, 2016

Choose a reason for hiding this comment

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

@topherfangio @devversion while doing further research I found a bug on the master branch that isn't in the v1.1.0-rc5 release. When I remove the md-not-found element in the basic md-autocomplete example I would expect that the search function would still work since the md-min-length equals 0. This is however not the case on anymore on the master branch while seems to work in the v1.1.0-rc5 release.

I can't immediately find which commit broke the functionality.

Copy link
Member

Choose a reason for hiding this comment

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

@lievenjanssen This is a valid and known bug. We are going to fix this with #9291 (hopefully)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@devversion @topherfangio I removed the md-has-not-found attribute. This PR is dependent on merge of #9291.

Copy link
Contributor

Choose a reason for hiding this comment

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

Still waiting on #9291 to be merged.

@lievenjanssen Can you ping me in a few days if it doesn't get merged so I remember to bring it back up?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@topherfangio a ping as requested ;-) #9291 is merged in the meantime.

@topherfangio topherfangio added the needs: feedback The issue creator or community need to respond to questions in this issue label Aug 10, 2016
@topherfangio topherfangio self-assigned this Aug 10, 2016
@devversion devversion added the Blocked Progress on this issue is blocked. Primarily used for PRs that are blocked by presubmit feedback. label Aug 17, 2016
@lievenjanssen
Copy link
Contributor Author

@devversion will this PR be merged together with #9291 and is the milestone still 1.1.1?

@devversion
Copy link
Member

@lievenjanssen I hope so - still waiting for @topherfangio's manual testing of #9291.

@topherfangio topherfangio removed the needs: feedback The issue creator or community need to respond to questions in this issue label Aug 31, 2016
@ThomasBurleson ThomasBurleson added needs: presubmit and removed Blocked Progress on this issue is blocked. Primarily used for PRs that are blocked by presubmit feedback. labels Sep 7, 2016
@ThomasBurleson ThomasBurleson added needs: unit tests This PR needs unit tests to cover the changes being proposed and removed needs: presubmit labels Sep 7, 2016
@ThomasBurleson
Copy link
Contributor

@lievenjanssen please provide 1 or more unit tests.

@ThomasBurleson ThomasBurleson added the in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs label Sep 7, 2016
@ThomasBurleson ThomasBurleson added this to the 1.1.2 milestone Sep 7, 2016
@lievenjanssen
Copy link
Contributor Author

@ThomasBurleson I added a test to check if minLength on autocomplete controller equals md-min-length attribute on md-contact-chips element.

Copy link
Member

@devversion devversion left a comment

Choose a reason for hiding this comment

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

I personally would like to have a more complex test, which does test for the dropdown on focus for example.

But since this is just attribute forwarding, this works too.

@@ -82,6 +83,15 @@ describe('<md-contact-chips>', function() {
expect(chip.find('img').length).toBe(0);
});

it('check if minLength on autocomplete controller equals md-min-length attribute on md-contact-chips element', inject(function() {
Copy link
Member

Choose a reason for hiding this comment

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

Can we rename this to should forward md-min-length attribute to the autocomplete ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@devversion devversion added needs: review This PR is waiting on review from the team and removed in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs needs: unit tests This PR needs unit tests to cover the changes being proposed labels Oct 1, 2016
@devversion devversion removed their assignment Oct 1, 2016
Copy link
Contributor

@topherfangio topherfangio left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@topherfangio topherfangio added needs: presubmit and removed needs: review This PR is waiting on review from the team labels Oct 17, 2016
@lievenjanssen
Copy link
Contributor Author

Am I correct that the presubmit prerequisite (#9291) is fulfilled and that this can be merged?

@mmalerba mmalerba merged commit 455c679 into angular:master Dec 6, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants