-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Experiment: shtml! #285
Comments
I accidentally closed this, but there seems no interest in the idea, so I left this closed. I think you are confused because you think that I want to change |
Sorry, It's so difficult to read. use<> instead of [] is ok. May be can use the emmet way,
|
I am sorry if my text/English is not good enough to be easy to understand. But unlike positive emojis, a negative emoji is very unhelpful. Poor language cause you little confusion, but a negative emoji cause absolute/complete confusion! If you want clarification you can always ask! As the syntax you mentioned, @ndarilek also propose it here. I really like it and I am trying to implement it! |
@limira It's sad you're upset. I think this is a great experiment and you should release it 👍 What about to release |
@deniskolodin Why do not mention extensions like this one into README (or wiki?)?. I think the both projects may have more visibility if someone enter and see that there are people like @limira adding external features, making yew a real community. |
Sorry for causing you trouble. A separate crate? I think that's a best way. |
One thing related to this experiment is PR #290. The only solution (that I can figure out) for that PR is to track all open tags (as I do in this experiment), then use appropriate method to
If you want this, I think you should do it now. There are breaking changes (PR #272) in yew 0.5 now. Extracting |
Should this issue be reopened? IMHO interest in the experiment continues. |
Continuation of the experiment #259, and as a way to learn how rust macro work, I build a whole macro
shtml!
(square-bracketed html), that can work as alternative tohtml!
(you can use both of them in your project), its usage like:You can give this macro a test by adding:
yew-shtml = { git="https://gitlab.com/limira-rs/yew-shtml.git" }
shtml!
has some advantage overhtml!
, but most of them can be implemented for the later.The only advantage that can not provided by
html!
for now:shtml!
. Html rarely be used in my project, so I just keep forgetting to add the trailing comma)I think, by using compiler-plugin, we can improve
html!
to allow it work without require trailing comma. But for now it require rust nightly and also need a great amount of work (because we must parse the macro content by ourselves?). While forshtml
, by using[
and]
, it is very easy to achieve this.Advantages that can be implemented for
html!
:expression;
instead of{expression}
class = "a" "b" "c"
instead ofclass=("a","b")
with props
be the first for component properties.**Feature mentioned in #259 but not implemented in this experiment: **
enum HtmlTag
for html tags (this can further improve performance). This requires modification in yew.If @deniskolodin like this, I will start implementing applicable-features into
html!
(in my free-time, of course, and I will keep it backward compatible)The text was updated successfully, but these errors were encountered: