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(material/schematics): tree operation helper functions #24539

Merged
merged 2 commits into from Mar 8, 2022

Conversation

wagnermaciel
Copy link
Contributor

  • created tree-traversal.ts for storing tree operation helper fns
  • moved visitElements to the new file
  • created helper fns for parseTemplate, and tag name changes
  • added unit tests which don't need to call the whole schematic

* created tree-traversal.ts for storing tree operation helper fns
* moved visitElements to the new file
* created helper fns for parseTemplate, and tag name changes
* added unit tests which don't need to call the whole schematic
@wagnermaciel wagnermaciel requested review from amysorto and removed request for andrewseguin March 7, 2022 18:09
@wagnermaciel wagnermaciel added the target: feature This PR is targeted for a feature branch (outside of main and semver branches) label Mar 7, 2022
Copy link
Contributor

@amysorto amysorto left a comment

Choose a reason for hiding this comment

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

LGTM aside from minor comments

if (!node.endSourceSpan) {
return html;
}
return replaceAt(html, node.endSourceSpan.start.offset + 2, node.name, tag);
Copy link
Contributor

Choose a reason for hiding this comment

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

where is this 2 coming from?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The 2 comes from the </ at the beginning of html end tags

@wagnermaciel wagnermaciel merged commit 58250b0 into angular:mdc-migration Mar 8, 2022
devversion pushed a commit to devversion/material2 that referenced this pull request Mar 14, 2022
…4539)

* feat(material/schematics): tree operation helper functions

* created tree-traversal.ts for storing tree operation helper fns
* moved visitElements to the new file
* created helper fns for parseTemplate, and tag name changes
* added unit tests which don't need to call the whole schematic
@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 Apr 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
target: feature This PR is targeted for a feature branch (outside of main and semver branches)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants