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

ssr attribute inlining updates #371

Merged
merged 1 commit into from
Oct 21, 2024
Merged

Conversation

titoBouzout
Copy link
Contributor

Related to solidjs/solid#2339

ssr: namespaced attributes are inlined into the html in some situations

With config option ssr:true sometimes(depending on if <Dynamic ../> JSX tag was used or not) the namespaced attributes are being written to the html.

For example <div attr:name="value"/> produces the same thing, instead of <div name="value"/>

Investigating, it seems that attr: wasn't the only special namespace with problems. This PR includes updates for avoiding inlining of prop/attr/bool: namespaces.

prop/attr: works in both cases for my tests (dynamic or not)

There's a need to look into ssrAttribute because for some reason bool: ends inlined when used as <div bool:name="quack"/> (this doesn't happen when used as <Dynamic component="div" bool:name.../>). I have looked but didn't feel confident enough to include the namespace in the ssrAttribute call, to fix it there.

I'm fine with merging this as is for now

@ryansolid
Copy link
Owner

Sounds good.. thanks

@ryansolid ryansolid merged commit 0b443c8 into ryansolid:main Oct 21, 2024
1 of 2 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