-
-
Notifications
You must be signed in to change notification settings - Fork 333
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
Add paper-chips & paper-contact-chips #527
Add paper-chips & paper-contact-chips #527
Conversation
…mber-power-select)
…ectly Angular Material's styles for contact chips expect the chips to be within an md-chips tag inside the md-contact-chips tag.
The "remove" buttons in chips were default paper-icon size (24), which is too big to fit nicely in the chips. 18 seems about right.
…paper-autocomplete
Bottom border is now visible and changes colour depending on focus.
Allows for keyboard navigation of existing chips, including removal. This doesn't (yet) extend to contact chips.
Make contact chips keyboard navigable by extending chips.
This allows for regular chips to use autocomplete, optionally allowing the user to add their own values in addition to those offered by autocomplete.
Readonly fix merged into this PR - thanks @ibarrick! |
@ibarrick i don't know why, but the last example "Contact Chips" is still focusable after readonly is true (I see the line turning orange underneath). |
focus fix for contact chips
Sorry, I should've realised that the fix needed to go on contact chips too (as they have separate templates due to visual and behavioural differences). Thanks again @ibarrick, and well spotted @miguelcobain! |
…into pauln-feature/chips
@pauln @ibarrick 1The contact-chips dropdown is too small to display the contact's e-mail. It is hidden on the right side. 2virtual repeat seems to trigger unnecessary rerenders. In this example, we're using an image from a web service that basically delivers random people images. The fact that a new image appears tells me that the item gets rerendered. The AM demo also uses this service and this flickering doesn't happen. This may be related with virtual repeat and not with chips? 3I think |
1We've got a couple of options here, as I see it: we can either drop the email address onto a second line (the image should give sufficient height to get two lines of text in comfortably), or make the dropdown wider. I tried disabling Please feel free to either suggest an approach or implement one which works and submit a PR ;-) 2I just threw a lorempixel image into a 3Great idea - I've just made name, email, image and search fields configurable and added in a demo. |
@miguelcobain I'm able to reproduce the issue in chips and vanilla autocomplete, but not with vanilla virtual-repeat. Do you have any idea what sort of thing would cause this? |
@ibarrick could it be something related with mutation observers? |
@miguelcobain That was one of the things I looked for this morning. I did end up fixing it finally though and submitted a PR to @pauln. The issue ended up being the fact that the I was able to fix it by keeping a parallel array of the pojos that would have been generated by the |
fixed virtual repeat for autocomplete
Thanks, @ibarrick! That leaves us with the email address visibility issue; @miguelcobain, do you have any thoughts on either imposing a minimum width on the dropdown (which still mightn't fix the issue if anyone in the list has a particularly long name) or dropping the email address onto a second line? The second option differs from AM slightly, but I think it's an improvement - and it'd actually make it match the list of contacts which is visible below the contact-chips in the AM demo. At a glance, I'd expect either option to need some of the AM styles to be overridden; I'd appreciate some guidance on doing so, as I haven't done that within ember-paper yet. |
Whoops - that seems to be a regression caused by @ibarrick's fix for the VR issue. I've reverted it for now. |
Revert "fixed virtual repeat for autocomplete"
Where's the fun in fixing bugs if you don't create more? |
@miguelcobain I removed the CPM's and switched to using the |
Going back to the contact-chips dropdown width issue, I've worked out what I need to do to make it appear at a suitable width (350px seems about right). What's the best way to add in a single CSS rule that applies to contact chips? I've slipped it into |
Wow this is a great day 🎉 Thanks everyone and especially @pauln for taking the baton and bringing it home 👍 |
Continued from PR #501 (itself continued from PR #344). Now that the paper-menu branch has been merged, this has been rebased on latest master; some additional tweaks have also been applied to make the autocomplete dropdown behaviour within chips more consistent with AM.