Skip to content

Sprint3 - #22018

Closed
mhevery wants to merge 3 commits into
angular:masterfrom
mhevery:sprint3
Closed

Sprint3#22018
mhevery wants to merge 3 commits into
angular:masterfrom
mhevery:sprint3

Conversation

@mhevery

@mhevery mhevery commented Feb 5, 2018 •

Copy link
Copy Markdown
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

  • write unit test for markDirty
  • write unit test for detectChanges
  • write unit test for whenRendered
  • write unit test for withBody
  • write unit test and docs for ensureDocument
  • write unit test and docs for cleanupDocument
  • update patch_types_spec.ts with discussion per @chuckjaz (separate CL)
  • rework hell world bundle tests to use withBody

@IgorMinar & @chuckjaz Please check out patch_types_spec.ts if this is compatible with your understanding of the world.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

matadatad.json? Typo?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Broken selector?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed

Comment thread packages/core/src/render3/component.ts Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

To dynamically insert a new component into an existing tree such that it shares the same injection

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed

Comment thread packages/core/src/render3/component.ts Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

until all components are marked as dirty and then perform

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed

Comment thread packages/core/src/render3/component.ts Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

res shouldn't have to be assigned here, as its value is not used. In fact, res is only used within the if.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

👍

Comment thread packages/core/src/render3/component.ts Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Similar to getRootContext, this may benefit from ngDevMode asserts to verify the elementNode is present.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

👍

Comment thread packages/core/src/render3/component.ts Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

and then returns

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

👍

Comment thread packages/core/testing/src/render3.ts Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

a promise (or is async) then the teardown

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

👍

Comment thread packages/core/testing/src/render3.ts Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

detects if document is present and if not

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

👍

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Consider breaking this file into separate specs following the current nested defines, e.g. elements_spec.ts, component_and_directives_spec.ts, etc.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That is my plan, but I want to land this before I will break it up

@ngbot

ngbot Bot commented Feb 7, 2018

Copy link
Copy Markdown

Hi @mhevery! This PR has merge conflicts due to recent upstream merges.
Please help to unblock it by resolving these conflicts. Thanks!

@mhevery
mhevery force-pushed the sprint3 branch 2 times, most recently from 62c5469 to 2fcfa61 Compare February 8, 2018 06:55
Comment thread packages/core/src/render3/component.ts Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Come to think of it, we only use rootContext.cleanResolve as a marker to indicate if the context is marked dirty, the function itself is not called as such as it is captured by the scheduled action closure below. We might as well choose not to expose the resolve function in RootContext but only have a dirty flag.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good point, refactored

@ngbot

ngbot Bot commented Feb 8, 2018

Copy link
Copy Markdown

Hi @mhevery! This PR has merge conflicts due to recent upstream merges.
Please help to unblock it by resolving these conflicts. Thanks!

Comment thread packages/core/src/render3/component.ts Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Intentional change? I think returns is actually clearer

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

reverted

Comment thread packages/core/src/render3/component.ts Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Missing comma?

When marking components as dirty, it is necessary

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

👍

Comment thread packages/core/src/render3/component.ts Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Missing comma?

object lifetime, use ...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

👍

Comment thread packages/core/src/render3/component.ts Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Replace lines 274-275 with _getComponentHostElementNode?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

👍

Comment thread packages/core/src/render3/component.ts Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Missing comma? If nothing is scheduled, the function

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

👍

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Name outdated in this comment? Re names, what do you think about markAsClean?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

removed per #22018 (comment)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: I read this the first time as "a promise that was clean" rather than "a promise that is resolved when components are clean". How about onClean or componentsClean?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

removed per #22018 (comment)

@kara kara left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@mhevery mhevery added target: major This PR is targeted for the next major release action: merge The PR is ready for merge by the caretaker labels Feb 13, 2018
@mhevery
mhevery force-pushed the sprint3 branch 4 times, most recently from 9e7252b to 479f694 Compare February 14, 2018 05:55
@trotyl

trotyl commented Feb 14, 2018

Copy link
Copy Markdown
Contributor

Sorry for an off-topic question, is there any plan to land the scheduler feature in markForCheck to current view engine (hope there's a codename for it as well), rather than relying on Zone-dependent onMicrotaskEmpty? That could help a lot for using Angular without loading Zone.js.

From the code seems that part has little coupling to ivy itself.

@mhevery

mhevery commented Feb 14, 2018

Copy link
Copy Markdown
Contributor Author

Sorry for an off-topic question, is there any plan to land the scheduler feature in markForCheck to current view engine (hope there's a codename for it as well), rather than relying on Zone-dependent onMicrotaskEmpty? That could help a lot for using Angular without loading Zone.js.

Yes, that is our plan, but we want to make sure that it is working well with Ivy before we back port it into ViewEngine

@mhevery mhevery added the area: core Issues related to the framework runtime label Feb 14, 2018
@ngbot

ngbot Bot commented Feb 15, 2018

Copy link
Copy Markdown

Hi @mhevery! This PR has merge conflicts due to recent upstream merges.
Please help to unblock it by resolving these conflicts. Thanks!

@mhevery
mhevery force-pushed the sprint3 branch 5 times, most recently from 467a0fb to 9094e4e Compare February 16, 2018 00:11
@mhevery
mhevery force-pushed the sprint3 branch 2 times, most recently from b521f8b to ffe68af Compare February 17, 2018 01:25
@mhevery

mhevery commented Feb 17, 2018

Copy link
Copy Markdown
Contributor Author

@angular-automatic-lock-bot

Copy link
Copy Markdown

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 14, 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 area: core Issues related to the framework runtime cla: yes target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants