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[angular]: change detection strategy and sanitize inner html support from useMetadata #1690

Merged
merged 5 commits into from
Feb 20, 2025

Conversation

sidmohanty11
Copy link
Collaborator

@sidmohanty11 sidmohanty11 commented Feb 17, 2025

Description

Adds support for:

  • changeDetection
  • sanitizeInnerHTML

Fixes adding multiple hooks inside compileContext - earlier it used to be an array so it added , within the hooks in the code.

Jira
https://builder-io.atlassian.net/browse/ENG-8013
https://builder-io.atlassian.net/browse/ENG-8402

Make sure to follow the PR preparation steps in CONTRIBUTING.md before submitting your PR:

  • format the codebase: from the root, run yarn fmt:prettier.
  • update all snapshots (in core & CLI): from the root, run yarn test:update
  • add Changeset entry: from the root, run yarn g:changeset and follow the CLI instructions. Alternatively, use the Changeset Github Bot to create the file.

Copy link

nx-cloud bot commented Feb 17, 2025

View your CI Pipeline Execution ↗ for commit 26ef327.

Command Status Duration Result
nx e2e @builder.io/e2e-app ✅ Succeeded 1m 9s View ↗
nx run-many --target test ✅ Succeeded 4m 39s View ↗
nx run-many --target build --exclude @builder.i... ✅ Succeeded 3m 47s View ↗
nx build @builder.io/mitosis-site ✅ Succeeded 2m 27s View ↗

☁️ Nx Cloud last updated this comment at 2025-02-19 05:28:34 UTC

Copy link

changeset-bot bot commented Feb 17, 2025

🦋 Changeset detected

Latest commit: 26ef327

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@builder.io/mitosis Patch
@builder.io/mitosis-cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

```ts
useMetadata({
angular: {
sanitizeInnerHTML: true, // doesn't use the sanitizer.bypassSecurityTrustHtml
Copy link
Contributor

Choose a reason for hiding this comment

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

should the comment say the opposite?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@samijaber by default we are bypassing sanitization of innerHTML but when sanitizeInnerHTML is true in useMetadata it will just use innerHTML=code where Angular sanitizes content by default. Let me know if this is confusing and we should update the naming

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

merging this for now, we can update the name later if it's confusing

@sidmohanty11 sidmohanty11 merged commit 74b1a19 into BuilderIO:main Feb 20, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants