Skip to content

Conversation

@SamiKamal
Copy link

@SamiKamal SamiKamal commented Dec 17, 2023

Description

Add a short description of:

Side effects:

This change means that comments will always get removed

Note:
I've also updated an argument name from x to node to make it more readable.

@SamiKamal SamiKamal requested a review from samijaber as a code owner December 17, 2023 21:49
@vercel
Copy link

vercel bot commented Dec 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mitosis-fiddle ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 2, 2024 7:40pm

@nx-cloud
Copy link

nx-cloud bot commented Jan 2, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 1573747. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 4 targets

Sent with 💌 from NxCloud.

@samijaber
Copy link
Contributor

This is great! You just need to update test snapshots with your latest test:

cd packages/core && yarn snapupdate

@samijaber
Copy link
Contributor

You also need to lint using yarn fmt:prettier

@SamiKamal
Copy link
Author

You also need to lint using yarn fmt:prettier

All done now 👍🏾

findAndRunScripts() {
// TODO: Move this function to standalone one in '@builder.io/utils'
if (this.$refs.elem && typeof window !== \\"undefined\\") {
/** @type {HTMLScriptElement[]} */
Copy link
Contributor

Choose a reason for hiding this comment

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

One unwanted side-effect of your solution is that it removes all comments from all blocks. That would be a lot of useful content that we don't want to lose...

I will investigate a better approach.

Copy link
Author

Choose a reason for hiding this comment

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

Opps, I guess I misunderstood this part, I thought it meant removing the comments from the whole code.

Expected behavior

Expect comments to be ignored/stripped before any Mitosis logic runs, and not cause any issues

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry about that. The ideal expected behaviour is that comments never cause issues and that most comments make it to the final output.

Copy link
Author

Choose a reason for hiding this comment

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

No worries, I'll look for another solution

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