Skip to content

fix(google-maps): internal events run inside NgZone #18034

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
Jan 16, 2020

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Dec 24, 2019

The custom Google Maps events work by binding everything ahead of time and then dispatching the results to the various listeners, however the result of this is that they'll trigger change detection for events that the consumer hasn't subscribed to. These changes switch to initializing the Google Maps objects outside the NgZone and then only bringing the ones that the consumer has subscribed to back inside.

@crisbeto crisbeto added P2 The issue is important to a large percentage of users, with a workaround pr: merge safe target: patch This PR is targeted for the next patch release labels Dec 24, 2019
@crisbeto crisbeto requested a review from a team as a code owner December 24, 2019 12:16
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Dec 24, 2019
@crisbeto crisbeto force-pushed the google-maps-events-zone branch from cd7251b to 89836cb Compare December 28, 2019 05:49
@crisbeto crisbeto force-pushed the google-maps-events-zone branch from 89836cb to f60d5e6 Compare January 14, 2020 20:37
@crisbeto
Copy link
Member Author

Changed to make the NgZone required @jelbourn.

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker labels Jan 14, 2020
@jelbourn jelbourn added this to the 9.0.0 milestone Jan 14, 2020
@jelbourn jelbourn added the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label Jan 14, 2020
@jelbourn
Copy link
Member

Caretaker: cherry-pick this into 9.0.x

Copy link
Contributor

@Splaktar Splaktar left a comment

Choose a reason for hiding this comment

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

LGTM. Needs rebase.

The custom Google Maps event work by binding everything ahead of time and then dispatching the results to the various listeners, however the result of this is that they'll trigger change detection for events that the consumer hasn't subscribed to. These changes switch to initializing the Google Maps objects outside the `NgZone` and then only bringing the ones that the consumer has subscribed to back inside.
@crisbeto
Copy link
Member Author

Rebased.

@crisbeto crisbeto force-pushed the google-maps-events-zone branch from f60d5e6 to 629d095 Compare January 16, 2020 06:56
@crisbeto crisbeto mentioned this pull request Jan 16, 2020
@jelbourn jelbourn merged commit 3e2e023 into angular:master Jan 16, 2020
yifange pushed a commit to yifange/components that referenced this pull request Jan 30, 2020
The custom Google Maps event work by binding everything ahead of time and then dispatching the results to the various listeners, however the result of this is that they'll trigger change detection for events that the consumer hasn't subscribed to. These changes switch to initializing the Google Maps objects outside the `NgZone` and then only bringing the ones that the consumer has subscribed to back inside.
@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 Feb 16, 2020
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 merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note P2 The issue is important to a large percentage of users, with a workaround target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants