Skip to content

chore: use computed radius size for checkbox ripple during 2018 material spec update transition #13038

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

Merged
merged 1 commit into from
Sep 11, 2018

Conversation

josephperrott
Copy link
Member

No description provided.

@josephperrott josephperrott added the target: major This PR is targeted for the next major release label Sep 7, 2018
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Sep 7, 2018
@crisbeto
Copy link
Member

crisbeto commented Sep 7, 2018

Isn't the ripple just supposed to be ~40px. I've addressed it in #12493.

@josephperrott
Copy link
Member Author

@crisbeto Yes, this is a temporary change to make it so that the template bound value is simply equal to what the css says it is instead of having the value managed in both places. After #12493 is fully merged (with the Google internal updates that follow completed), we will revert this change.

@josephperrott josephperrott force-pushed the checkbox-ripple branch 2 times, most recently from 74d963d to be4c912 Compare September 7, 2018 22:48
setTimeout(() => {
if (!calculatedRippleRadius) {
const rippleWidth = parseInt(getComputedStyle(
this._elementRef.nativeElement.querySelector('.mat-checkbox-ripple')).width!, 10) || 0;
Copy link
Member

@devversion devversion Sep 7, 2018

Choose a reason for hiding this comment

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

We could probably also use clientWidth instead, but either way works.

@devversion devversion added the action: merge The PR is ready for merge by the caretaker label Sep 8, 2018
@ngbot

This comment has been minimized.

@devversion devversion removed the action: merge The PR is ready for merge by the caretaker label Sep 8, 2018
@@ -210,6 +215,10 @@ export class MatCheckbox extends _MatCheckboxMixinBase implements ControlValueAc
.subscribe(focusOrigin => this._onInputFocusChange(focusOrigin));
}

ngAfterViewChecked() {
Copy link
Member

Choose a reason for hiding this comment

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

There is actually one lint error because AfterViewChecked interface isn't applied. Feel free to add merge ready when done.

Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

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

LGTM

@devversion devversion added the action: merge The PR is ready for merge by the caretaker label Sep 10, 2018
@josephperrott josephperrott merged commit 6575ade into angular:master Sep 11, 2018
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants