You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem
SVG tags are case sensitive and some of them (e.g. feGaussianBlur use camelCase. The html! macro seems to be changing all tag names to lower case which prevents the elements from being rendered.
Steps To Reproduce
Steps to reproduce the behavior:
Use browser inspector to look at the feGaussianBlur element.
Expected behavior
The feGaussianBlur element should have the correct casing. Instead it is all lower case.
Environment:
Yew version: 0.19
Rust version: 1.61.0
Target, if relevant: wasm32-unknown-unknown
Build tool, if relevant: trunk
OS, if relevant: Windows
Browser and version, if relevant: Chrome latest, Firefox latest
Questionnaire
I'm interested in fixing this myself but don't know where to start
Workaround
I've managed to work around this by using a dynamic tag name @{"feGaussianBlur"} but this only worked with yew = { git = "https://github.com/yewstack/yew.git"}, not with version 0.19.
I'm not sure what the solution to this problem is as changing the casing rules seems like a huge breaking change, but I think the documentation should at least make the situation clear rather than having a broken example.
By the way, I really enjoy using Yew and, apart from this issue, it's been brilliant!
The text was updated successfully, but these errors were encountered:
Oh, so sorry. I should have searched closed issues.
No need to backport it for me. I've just tried nightly Rust and seen the lint so that's good.
I'm happy to submit a PR for the documentation. The only question is what to suggest for 0.19 users. Should they just switch to Next if they need this?
One possible workaround for 0.19 users is to forgo the html! macro and use the VTag::new constructor directly, add attributes and children "by hand". That one should preserve casing, though at the expense of some convenience.
And a documentation PR would be appreciated. We're using docusaurus and versioned docs, so you can add a warning or note to the 0.19 docs and different text to the current ones. Feel free to start with a draft PR and ask if you get stuck anywhere.
Problem
SVG tags are case sensitive and some of them (e.g.
feGaussianBlur
use camelCase. Thehtml!
macro seems to be changing all tag names to lower case which prevents the elements from being rendered.Steps To Reproduce
Steps to reproduce the behavior:
feGaussianBlur
element.Expected behavior
The
feGaussianBlur
element should have the correct casing. Instead it is all lower case.Environment:
Questionnaire
Workaround
I've managed to work around this by using a dynamic tag name
@{"feGaussianBlur"}
but this only worked withyew = { git = "https://github.com/yewstack/yew.git"}
, not with version 0.19.I'm not sure what the solution to this problem is as changing the casing rules seems like a huge breaking change, but I think the documentation should at least make the situation clear rather than having a broken example.
By the way, I really enjoy using Yew and, apart from this issue, it's been brilliant!
The text was updated successfully, but these errors were encountered: