Skip to content

feat(query): implement query update mechanism based on views. - #3973

Closed
rkirov wants to merge 1 commit into
angular:masterfrom
rkirov:query_by_view
Closed

rkirov wants to merge 1 commit into
angular:masterfrom
rkirov:query_by_view

Conversation

@rkirov

@rkirov rkirov commented Sep 3, 2015

Copy link
Copy Markdown
Contributor

Instead of working with finer grained element injectors, queries now
iterate through the views as static units of modification of the
application structure. Views already contain element injectors in the
correct depth-first preorder.

This allows us to remove children linked lists on element injectors and a
lot of book keeping that is already present at the view level.

Queries are recalculated using the afterContentChecked and
afterViewChecked hooks, only during init and after a view container has
changed.

BREAKING CHANGE:
ViewQuery no longer supports the descendants flag. It queries the whole
component view by default.

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.

change to a getView() to match the rest. move closer to other getters.

@rkirov
rkirov force-pushed the query_by_view branch 5 times, most recently from 3252424 to 1ee10d2 Compare September 4, 2015 20:46
Comment thread modules/angular2/src/core/metadata.dart 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.

I thought descendants is supposed to be set to true for ViewQuery

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 catch, it's usage is already removed from the logic. This is just needed because ViewQueryMetadata extends QueryMetadata (probably they should just extend an abstract base). Changed this to avoid confusion.

@vsavkin vsavkin assigned rkirov and unassigned vsavkin Sep 4, 2015
Instead of working with finer grained element injectors, queries now
iterate through the views as static units of modification of the
application structure. Views already contain element injectors in the
correct depth-first preorder.

This allows us to remove children linked lists on element injectors and a
lot of book keeping that is already present at the view level.

Queries are recalculated using the afterContentChecked and
afterViewChecked hooks, only during init and after a view container has
changed.

BREAKING CHANGE:
ViewQuery no longer supports the descendants flag. It queries the whole
component view by default.
@rkirov rkirov added the action: merge The PR is ready for merge by the caretaker label Sep 4, 2015
@mary-poppins

Copy link
Copy Markdown

Merging PR #3973 on behalf of @rkirov to branch presubmit-rkirov-pr-3973.

@mary-poppins mary-poppins removed the action: merge The PR is ready for merge by the caretaker label Sep 4, 2015
@rkirov rkirov closed this in 5ebeaf7 Sep 4, 2015
@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 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants