-
Notifications
You must be signed in to change notification settings - Fork 6.8k
feature(checkbox): Add ripple effect to checkbox #1611
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
src/lib/checkbox/checkbox.spec.ts
Outdated
| fixture.detectChanges(); | ||
|
|
||
| expect(checkboxNativeElement.querySelectorAll('[md-ripple]').length).toBe(0, | ||
| 'Expect no [md-ripple] in checkbox'); |
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.
In general, prefer to break at the higher syntactic level, e.g.:
expect(checkboxNativeElement.querySelectorAll('[md-ripple]').length)
.toBe(0, 'Expect no [md-ripple] in checkbox');
src/lib/checkbox/checkbox.ts
Outdated
|
|
||
| isRippleEnabled() { | ||
| return !this.disableRipple; | ||
| } |
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 not bind to the disableRipple directly?
src/lib/checkbox/checkbox.ts
Outdated
| @Input() id: string = `md-checkbox-${++nextId}`; | ||
|
|
||
| /** Whether the ripple effect on click should be disabled. */ | ||
| @Input() @BooleanFieldValue() disableRipple: boolean = false; |
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.
I just removed @BooleanFieldValue in another PR- custom decorators like this caused tree-shaking not to work. The replacement is a function called coerceBooleanProperty
01a8190 to
d490bc2
Compare
d490bc2 to
2ef7562
Compare
|
Comments addressed. Please take another look. Thanks! |
|
LGTM |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
R: @jelbourn