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

feat(chips): Make chips edittable on demand. #7210

Merged
merged 69 commits into from
Mar 1, 2016
Merged

feat(chips): Make chips edittable on demand. #7210

merged 69 commits into from
Mar 1, 2016

Conversation

mertdeg2
Copy link
Contributor

Description: closes #2320

this.enableChipEdit = $scope.$parent && $scope.$parent.enableChipEdit == 'true';

if(this.enableChipEdit) {
this.$element.on('keydown', this.chipKeyDown.bind(this));
Copy link
Member

Choose a reason for hiding this comment

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

You should indent your code with two spaces to be aligned with the other components.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. I have replaces four spaces into two

@mertdeg2
Copy link
Contributor Author

Looking for UX design input. You can find a quick demo below:

a4560145-b2cc-4768-8e35-991083313a79

this.$element.addClass('md-chip-editing');
var currentText = this.getContentElement().text();
this.getContentElement().addClass('ng-hide');
this.getChipContent().append('<input type="text" value="'+currentText+'" />');
Copy link
Member

Choose a reason for hiding this comment

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

Just thought a bit about the input. It's just an idea, can we not use a contend editable div? This will work really good and doesn't need all the text measures. Then we just need to watch for the content editable blur and update the actual chip model.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like this idea. I have used this approach in the next iteration.

@devversion
Copy link
Member

@mertdeg2 Just run it myself, works perfect 👍

  • About the editing style, I'm not sure, do you think this is the right way?

  • Also I think, you should check for an empty text, because it's not good if the chip still persists, when the text is empty.

@mertdeg2
Copy link
Contributor Author

Thanks Paul! Good catch, I have fixed the second issue. We had a discussion
about your first point.

It seemed reasonable to follow gmail's chips implementation like below.
Having said that, I am open to suggestions about this.
​​

On Mon, Feb 22, 2016 at 12:01 PM, Paul Gschwendtner <
notifications@github.com> wrote:

@mertdeg2 https://github.com/mertdeg2 Just run it myself, works perfect [image:
👍]

About the editing style, I'm not sure, do you think this is the right
way?

https://camo.githubusercontent.com/659635109dc8e53cd3566e1d23c8fcf334518604/68747470733a2f2f692e6779617a6f2e636f6d2f32366633303436383438356536336635616539623165636535326137633264362e706e67

Also I think, you should check for an empty text, because it's not
good if the chip still persists, when the text is empty.

https://camo.githubusercontent.com/703fe89a5026b99934f4b8f03cf51e709bbe9c55/68747470733a2f2f692e6779617a6f2e636f6d2f30366361346434656664373836653261623065386339666166323934303131652e706e67


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

devversion and others added 8 commits February 23, 2016 10:52
Currently never apply a scope to the cloned element, which will cause problems with directives, which have bindings in their template.

Also added the documentation for a common use-case

Closes #4979. Closes #7151.
*  use of 'sudo' has negative perf impacts with Travis containers
*  should use SauceLabs to test with Chrome and other browsers.
As discussed with @topherfangio, we should not take advantage of the `scope()` method, because these will be only available in Angular's debug mode.
So we both agreed, with removing that and just compiling the cloned element from service into the given scope.

Closes #7252
ThomasBurleson and others added 12 commits February 24, 2016 14:45
Media query with \0 causing parsing issues with node-sass and LESS.

*  Move all IE fixes to raw CSS. Append to generated CSS during builds.

Fixes #6304
At the moment we are fixing the height, this will caught issues with the select because it provides the content and a margin of `20px 0 26px`,
plus the message which will be shown when the user selects one option. That mean's that won't fit in, and the clickable area will be shrinked.

Fixes #6943

Closes #6955
If there is currently a `md-button` anchor, we should remove the margin to order the items as the other items.

Fixes #5608 Fixes #6317

Closes #6496
The current description for the autocomplete attribute was really confusing, and the user was wondering why the autocomplete wasn't retrieving focus automatically.
But they didn't know about the other behaviour of the actual `md-autofocus` directive.
The autocomplete attribute "wrap" is just a little addition which focus the related input instead of the element.

Fixes #7283

Closes #7290
This reverts commit a7056cc.

# Conflicts:
#	src/core/services/layout/layout.attributes.scss
#	src/core/services/layout/layout.scss

# Conflicts:
#	src/core/services/layout/layout.scss
When searching for contacts a promise can be returned that contains the matching entries.

*  Appended a demonstration of this to the existing contact chips demo.
*  Improve attribute descriptions

Fixes #4661. Closes #7234.
EladBezalel and others added 19 commits February 29, 2016 19:23
Inherit is not the proper value, 0 should be used instead

Closes #6472
- throwing more informative error about missing row height attribute

fixes #6870

Closes #7348
Description: Previously I was relying on keydown event to adjust the
input width. But that causes some visual disturbances during typing. Now
I am relying on input event.
Description: Addressing DevVersion's code review feedback
Description: Addressing DevVersion's code review feedback
Description: Addressing DevVersion's code review feedback
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

1 similar comment
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@mertdeg2
Copy link
Contributor Author

mertdeg2 commented Mar 1, 2016

I signed it!

@mertdeg2 mertdeg2 merged commit e52679e into angular:feat/editable_chips Mar 1, 2016
@mertdeg2 mertdeg2 deleted the feat/editable_chips branch March 1, 2016 23:49
@ThomasBurleson
Copy link
Contributor

@char0n - why are you commenting on a branch change that has nothing to do with master or the weekly patch releases (like 1.0.6) ? If you have discovered an new issue, please create one here: New Issue

@ThomasBurleson
Copy link
Contributor

@char0n - it was reverted because Chrome fixed in it v48. Are you saying this is STILL an issue with Firefox? If so, then our apologies, we will restore the fix.

please make a new issue!

@char0n
Copy link

char0n commented Mar 2, 2016

@ThomasBurleson, sorry I don't know the exact process, I found the commit that caused the issue and commented. Yes I confirm that Chrome v48 fixes the issue, but the issue is still present in FireFox 44.0.2

@devversion
Copy link
Member

@char0n @ThomasBurleson GitHub automatically shows comments from commits which are attached to the PR (See for example: JonFerrera#1 - referenced by 179dc19)

@char0n
Copy link

char0n commented Mar 2, 2016

@ThomasBurleson Issue created: #7382

@devversion thanks for info.

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.