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

feat(ivy): add query inheritance #25556

Closed
wants to merge 3 commits into from

Conversation

benlesh
Copy link
Contributor

@benlesh benlesh commented Aug 17, 2018

Adds inheritance handling for the following:

  • viewQuery
  • contentQueries
  • contentQueriesRefresh

@benlesh benlesh added the target: major This PR is targeted for the next major release label Aug 17, 2018
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.

Few nit picks but LGTM otherwise

const superViewQuery = superDef.viewQuery;
if (superViewQuery) {
if (prevViewQuery) {
// tslint:disable-next-line:no-any viewQuery is readonly, but we need to set it
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see why you need this tslint disable. There must be something weird about your setup. We should investigate.

Preferred way is (definition as {viewQuery: ViewQuery}).viewQuery = ...

Also we could just take the readonly away?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also we could just take the readonly away?

We can, I just didn't want to do that if it was supposed to be readonly as a public API.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

prevViewQuery(rf, ctx);
};
} else {
// tslint:disable-next-line:no-any viewQuery is readonly, but we need to set it
Copy link
Contributor

Choose a reason for hiding this comment

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

same here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

it('should compose viewQuery', () => {
const log: Array<[string, RenderFlags, any]> = [];

// tslint:disable-next-line:class-as-namespace
Copy link
Contributor

Choose a reason for hiding this comment

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

revert tslint

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done... removed from entire file

});
}

// tslint:disable-next-line:class-as-namespace
Copy link
Contributor

Choose a reason for hiding this comment

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

revert

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done... removed from entire file

it('should compose contentQueries', () => {
const log: string[] = [];

// tslint:disable-next-line:class-as-namespace
Copy link
Contributor

Choose a reason for hiding this comment

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

revert

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

});
}

// tslint:disable-next-line:class-as-namespace
Copy link
Contributor

Choose a reason for hiding this comment

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

revert

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Adds inheritance handling for the following:

- viewQuery
- contentQueries
- contentQueriesRefresh
@mary-poppins
Copy link

You can preview bbf955a at https://pr25556-bbf955a.ngbuilds.io/.

@benlesh
Copy link
Contributor Author

benlesh commented Aug 20, 2018

presubmit

@benlesh benlesh added action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note labels Aug 20, 2018
@benlesh
Copy link
Contributor Author

benlesh commented Aug 20, 2018

There's one Travis job that seems to be flaky.

@jasonaden jasonaden closed this in f54f385 Aug 20, 2018
FrederikSchlemmer pushed a commit to FrederikSchlemmer/angular that referenced this pull request Jan 3, 2019
Adds inheritance handling for the following:

- viewQuery
- contentQueries
- contentQueriesRefresh

PR Close angular#25556
@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 Sep 13, 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 cla: yes merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants