Skip to content

feat(compiler): content projection during compile - #2839

Merged
tbosch merged 1 commit into
angular:masterfrom
tbosch:render-project
Jul 16, 2015
Merged

tbosch merged 1 commit into
angular:masterfrom
tbosch:render-project

Conversation

@tbosch

@tbosch tbosch commented Jul 1, 2015

Copy link
Copy Markdown
Contributor

Closes #2529

BREAKING CHANGES:

  • shadow dom emulation no longer
    supports the <content> tag. Use the new <ng-content> instead
    (works with all shadow dom strategies).
  • removed DomRenderer.setViewRootNodes and AppViewManager.getComponentView
    -> use DomRenderer.getNativeElementSync(elementRef) and change shadow dom directly
  • the Renderer interface has changed:
    • createView now also has to support sub views
    • the notion of a container has been removed. Instead, the renderer has
      to implement methods to attach views next to elements or other views.
    • a RenderView now contains multiple RenderFragments. Fragments
      are used to move DOM nodes around.

Internal changes:

  • ProtoViews always have a <template> element as root
    • needed for storing subviews
    • we have less chunks of DOM to clone now
  • eemove fake ElementBinder / Bound element for root text bindings
    and model them explicitly. This removes a lot of special cases we had!
  • some methods in AppViewManager (create, hydrate, dehydrate) are iterative now
    • now possible as we have all child AppViews / ElementRefs already in an array!

@tbosch
tbosch force-pushed the render-project branch 6 times, most recently from 48fe268 to fac8545 Compare July 13, 2015 17:20
@tbosch tbosch changed the title [WIP] feat(compiler): content projection during compile feat(compiler): content projection during compile Jul 13, 2015
@tbosch tbosch added action: review The PR is still awaiting reviews from at least one requested reviewer and removed state: WIP labels Jul 13, 2015

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.

Add 'root' not implicitly but explictly to the left hand side

@tbosch
tbosch force-pushed the render-project branch 2 times, most recently from a0c8ace to 3d16356 Compare July 14, 2015 00:33

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.

modify hostProtoView

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.

modify the DOM of ...

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.

name 'nested' is wrong here, as the host is included as well.

@tbosch

tbosch commented Jul 14, 2015

Copy link
Copy Markdown
Contributor Author

Reviewed in person with @vsavkin

@tbosch tbosch added pr_state: LGTM 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 Jul 14, 2015
@tbosch tbosch assigned tbosch and unassigned vsavkin Jul 14, 2015
@tbosch tbosch added this to the alpha-32 milestone Jul 14, 2015
@tbosch
tbosch force-pushed the render-project branch 7 times, most recently from 08fcad4 to f7e58b7 Compare July 16, 2015 02:50
…ation.

Closes angular#2529

BREAKING CHANGES:
- shadow dom emulation no longer
  supports the `<content>` tag. Use the new `<ng-content>` instead
  (works with all shadow dom strategies).
- removed `DomRenderer.setViewRootNodes` and `AppViewManager.getComponentView`
  -> use `DomRenderer.getNativeElementSync(elementRef)` and change shadow dom directly
- the `Renderer` interface has changed:
  * `createView` now also has to support sub views
  * the notion of a container has been removed. Instead, the renderer has
    to implement methods to attach views next to elements or other views.
  * a RenderView now contains multiple RenderFragments. Fragments
    are used to move DOM nodes around.

Internal changes / design changes:
- Introduce notion of view fragments on render side
- DomProtoViews and DomViews on render side are merged,
  AppProtoViews are not merged, AppViews are partially merged
  (they share arrays with the other merged AppViews but we keep
  individual AppView instances for now).
- DomProtoViews always have a `<template>` element as root
  * needed for storing subviews
  * we have less chunks of DOM to clone now
- remove fake ElementBinder / Bound element for root text bindings
  and model them explicitly. This removes a lot of special cases we had!
- AppView shares data with nested component views
- some methods in AppViewManager (create, hydrate, dehydrate) are iterative now
  * now possible as we have all child AppViews / ElementRefs already in an array!
@tbosch
tbosch merged commit b1df545 into angular:master Jul 16, 2015
@tbosch
tbosch deleted the render-project branch July 16, 2015 03:52
@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 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews cla: yes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement new content reprojection

3 participants