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

[WIP] fix: handle v-for to singleRoot #305

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

runyasak
Copy link

@runyasak runyasak commented Feb 2, 2025

This PR is work in progress.

Overview

This PR is related to #299.

As my comment:

I've noticed that if there is only a single root element, the fourth argument is included.
However, if there are multiple elements, just simply add a single <div />, there is only one argument which aligns with our expectations.

I then tried adding a condition to check whether the root component has a single root and whether it includes v-for.

The test case I added passed, but some existing test cases failed due to snapshot differences.

Need Help and Suggestions

I would appreciate any suggestions or guidance on how to solve this issue.
Especially, I’d like to know the best way to determine if a node is the root and is associated with v-for, so I can refine my condition.

If my approach is not ideal or does not align with your expectations, please let me know, and I will update my code accordingly.

Copy link

netlify bot commented Feb 2, 2025

Deploy Preview for vapor-template-explorer ready!

Name Link
🔨 Latest commit aba4e57
🔍 Latest deploy log https://app.netlify.com/sites/vapor-template-explorer/deploys/679f57060089ca00085f44ff
😎 Deploy Preview https://deploy-preview-305--vapor-template-explorer.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

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.

1 participant