Skip to content
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

docs: add documentation of NgZone with zone.js #34295

Closed
wants to merge 1 commit into from

Conversation

JiaLiPassion
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the new behavior?

Add the documentation about NgZone and the relationship with zone.js, and some configuration of noop zone and zone flags.

@ajitsinghkaler
Copy link
Contributor

@JiaLiPassion this can also be the first draft for the official change detection documentation as aked in #33731. So, I think we can close that issue also with this pr.

@JiaLiPassion
Copy link
Contributor Author

@ajitsinghkaler , thanks, and I will check the issue, this document is not talking about Change Detection itself, but when to trigger change detection, but yeah they are related.

@mary-poppins
Copy link

@kapunahelewong kapunahelewong added effort3: weeks risk: low feature Issue that requests a new feature labels Dec 9, 2019
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Dec 9, 2019
@kapunahelewong kapunahelewong added this to In Review in docs Dec 9, 2019
Copy link
Contributor

@aikithoughts aikithoughts left a comment

Choose a reason for hiding this comment

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

I know there's a lot here, and I apologize. I mostly focused on making the document as easy to read as possible. I'm happy to discuss these changes (or any other thoughts) at any time! Please let me know how I can help.

aio/content/guide/zone.md Outdated Show resolved Hide resolved
aio/content/guide/zone.md Outdated Show resolved Hide resolved
aio/content/guide/zone.md Outdated Show resolved Hide resolved
aio/content/guide/zone.md Outdated Show resolved Hide resolved
aio/content/guide/zone.md Outdated Show resolved Hide resolved
aio/content/guide/zone.md Outdated Show resolved Hide resolved
aio/content/guide/zone.md Outdated Show resolved Hide resolved
aio/content/guide/zone.md Outdated Show resolved Hide resolved
aio/content/guide/zone.md Outdated Show resolved Hide resolved

### NoopZone

`Zone` will help Angular to know when to trigger Change Detection and let the developers focus on the application development, by default, `Zone` will be loaded and everything works out of the box. But you don't have to use `Zone` to make Angular work, you can still trigger Change Detection all by yourself. To remove `zone.js`, you need to do the following steps, **ALERT! if you do this, you need to understand what you are doing clearly, and you need to trigger all the change detection at the correct timing yourself**.
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if this is appropriate here? it seems like we're encouraging developers to do something that may cause problems later. Maybe this should go in a separate topic?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I am not sure about this, so the noop zone is already been official supported for a while, so the reason I put it here is it is also about Zone, so the user may have a full picture.
And of course we can also put it into a sub chapter.

Copy link
Contributor

Choose a reason for hiding this comment

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

We need documentation for no-zone, but that is outside the scope of these docs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it, I will create another PR to add no-zone.

@JiaLiPassion
Copy link
Contributor Author

@aikidave , Thank you so much for the detailed review, I will update the doc and let you know. Thanks again and I learned a lot.

@mary-poppins
Copy link

You can preview ef80a30 at https://pr34295-ef80a30.ngbuilds.io/.

@JiaLiPassion
Copy link
Contributor Author

@aikidave, I have updated the doc and reply what I changed in the comments, please review, thank you!

Copy link
Contributor

@aikithoughts aikithoughts left a comment

Choose a reason for hiding this comment

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

I have some additional questions about how the Angular community talks about certain ideas and concepts, but nothing that should stop this from moving forward. Thanks for incorporating my suggestions!

aio/content/guide/zone.md Outdated Show resolved Hide resolved
aio/content/guide/zone.md Outdated Show resolved Hide resolved
aio/content/guide/zone.md Outdated Show resolved Hide resolved
aio/content/guide/zone.md Outdated Show resolved Hide resolved
aio/content/guide/zone.md Outdated Show resolved Hide resolved
aio/content/guide/zone.md Outdated Show resolved Hide resolved
aio/content/guide/zone.md Outdated Show resolved Hide resolved
aio/content/guide/zone.md Outdated Show resolved Hide resolved
@JiaLiPassion
Copy link
Contributor Author

@aikidave , thanks for the review again, I updated the docs based on your comments.

@mary-poppins
Copy link

You can preview 644e54e at https://pr34295-644e54e.ngbuilds.io/.

@JiaLiPassion JiaLiPassion added the target: patch This PR is targeted for the next patch release label Jan 30, 2020
@googlebot
Copy link

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@mary-poppins
Copy link

You can preview c26307d at https://pr34295-c26307d.ngbuilds.io/.

@JiaLiPassion
Copy link
Contributor Author

@kapunahelewong, thank you very much for the review and the update!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes and removed cla: no labels Feb 6, 2020
@mary-poppins
Copy link

You can preview eb34fd6 at https://pr34295-eb34fd6.ngbuilds.io/.

@kapunahelewong kapunahelewong added the action: review The PR is still awaiting reviews from at least one requested reviewer label Feb 17, 2020
Copy link
Contributor

@mhevery mhevery left a comment

Choose a reason for hiding this comment

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

Approving with a single nit so adding needs_cleanup label. Once you fix the issue please remove the label.

aio/content/guide/zone.md Outdated Show resolved Hide resolved
@mhevery mhevery added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Feb 24, 2020
@JiaLiPassion JiaLiPassion removed the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Feb 24, 2020
@mary-poppins
Copy link

You can preview fa479ae at https://pr34295-fa479ae.ngbuilds.io/.

@mhevery mhevery added the action: merge The PR is ready for merge by the caretaker label Feb 26, 2020
@mhevery mhevery closed this in bde4cd7 Feb 26, 2020
mhevery pushed a commit that referenced this pull request Feb 26, 2020
@jbogarthyde jbogarthyde moved this from In Review to Done in docs Mar 2, 2020
@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 Mar 28, 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 aio: preview area: zones cla: yes effort3: weeks feature Issue that requests a new feature risk: low target: patch This PR is targeted for the next patch release
Projects
docs
Done
Development

Successfully merging this pull request may close these issues.

None yet

8 participants