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

fix(ivy): markForCheck should not schedule a tick #28048

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
4 participants
@kara
Copy link
Contributor

kara commented Jan 10, 2019

WIP: Not ready for review

Previously, we had the logic to schedule a change detection tick
inside markViewDirty(). This is fine when used in markDirty(),
the user-facing API, because it should always schedule change
detection. However, this doesn't work when used in markForCheck()
because historically markForCheck() does not trigger change
detection.

To be backwards compatible, this commit moves the scheduling
logic out of markViewDirty() and into markDirty(), so
markForCheck no longer triggers a tick.

@kara kara requested review from angular/fw-core as code owners Jan 10, 2019

@googlebot googlebot added the cla: yes label Jan 10, 2019

@ngbot ngbot bot modified the milestone: needsTriage Jan 10, 2019

@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Jan 10, 2019

@kara kara changed the title fix(ivy): markForCheck should not schedule a tick WIP - fix(ivy): markForCheck should not schedule a tick Jan 10, 2019

@kara kara removed request for angular/fw-core Jan 10, 2019

@kara kara force-pushed the kara:markViewDirty branch from 54c6c30 to b2488a9 Jan 10, 2019

@kara kara requested a review from IgorMinar as a code owner Jan 10, 2019

@kara kara removed the request for review from IgorMinar Jan 10, 2019

@kara kara force-pushed the kara:markViewDirty branch 2 times, most recently from 27a08d7 to 9414880 Jan 10, 2019

@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Jan 10, 2019

@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Jan 10, 2019

@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Jan 10, 2019

You can preview 9414880 at https://pr28048-9414880.ngbuilds.io/.

@kara kara force-pushed the kara:markViewDirty branch from 9414880 to ae669fe Jan 10, 2019

@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Jan 10, 2019

@kara kara force-pushed the kara:markViewDirty branch 2 times, most recently from 996e55c to 6cddf25 Jan 10, 2019

@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Jan 10, 2019

@kara kara force-pushed the kara:markViewDirty branch from 6cddf25 to e57439e Jan 10, 2019

@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Jan 10, 2019

@kara kara force-pushed the kara:markViewDirty branch from e57439e to 6282153 Jan 10, 2019

@kara kara requested a review from mhevery Jan 10, 2019

@kara kara changed the title WIP - fix(ivy): markForCheck should not schedule a tick fix(ivy): markForCheck should not schedule a tick Jan 10, 2019

@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Jan 10, 2019

@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Jan 10, 2019

fix(ivy): markForCheck() should not schedule change detection
Previously, we had the logic to schedule a change detection tick
inside markViewDirty(). This is fine when used in markDirty(),
the user-facing API, because it should always schedule change
detection. However, this doesn't work when used in markForCheck()
because historically markForCheck() does not trigger change
detection.

To be backwards compatible, this commit moves the scheduling
logic out of markViewDirty() and into markDirty(), so
markForCheck no longer triggers a tick.

@kara kara force-pushed the kara:markViewDirty branch from 6282153 to eb015fd Jan 10, 2019

@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Jan 10, 2019

You can preview eb015fd at https://pr28048-eb015fd.ngbuilds.io/.

@kara kara removed the PR action: review label Jan 10, 2019

@kara

This comment has been minimized.

Copy link
Contributor

kara commented Jan 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment