Uh oh!
There was an error while loading. Please reload this page.
Improve html docs - #100
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
zoechi
commented
Jun 17, 2020
What do you think about changing the numbered list (1. - 5.) to a bullet list? |
teymour-aldridge
commented
Jun 17, 2020
Sure, sounds good! |
zoechi
commented
Jun 18, 2020
@teymour-aldridge did you see my last changes? |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| {% hint style="info" %} | ||
| The `html!` macro can reach easily the default recursion limit of the compiler. It is advised to bump its value if you encouter compilation errors. Use an attribute like `#![recursion_limit="1024"]` to bypass the problem. See the [official documentation](https://doc.rust-lang.org/reference/attributes/limits.html#the-recursion_limit-attribute) and [this Stack Overflow question](https://stackoverflow.com/questions/27454761/what-is-a-crate-attribute-and-where-do-i-add-it) for details. | ||
| The [`html!`](https://docs.rs/yew/0.16.2/yew/macro.html.html) macro can reach easily the default recursion limit of the compiler. It is advised to bump its value if you encouter compilation errors. Use an attribute like `#![recursion_limit="1024"]` to bypass the problem. See the [official documentation](https://doc.rust-lang.org/reference/attributes/limits.html#the-recursion_limit-attribute) and [this Stack Overflow question](https://stackoverflow.com/questions/27454761/what-is-a-crate-attribute-and-where-do-i-add-it) for details. |
There was a problem hiding this comment.
| The [`html!`](https://docs.rs/yew/0.16.2/yew/macro.html.html) macro can reach easily the default recursion limit of the compiler. It is advised to bump its value if you encouter compilation errors. Use an attribute like `#![recursion_limit="1024"]` to bypass the problem. See the [official documentation](https://doc.rust-lang.org/reference/attributes/limits.html#the-recursion_limit-attribute) and [this Stack Overflow question](https://stackoverflow.com/questions/27454761/what-is-a-crate-attribute-and-where-do-i-add-it) for details. | |
| The [`html!`](https://docs.rs/yew/0.16.2/yew/macro.html.html) macro can easily exceed the default recursion limit of the compiler. It is advised to bump its value if you encouter compilation errors. Use an attribute like `#![recursion_limit="1024"]` to bypass the problem. See the [official documentation](https://doc.rust-lang.org/reference/attributes/limits.html#the-recursion_limit-attribute) and [this Stack Overflow question](https://stackoverflow.com/questions/27454761/what-is-a-crate-attribute-and-where-do-i-add-it) for details. |
There was a problem hiding this comment.
I can't really see what exactly the change was here.
What do you think about introducing a fix line length limit?
It's much easier to compare lines that are not broken over several lines.
I don't know what IDE you're using but in Emacs a keyboard shortcut realigns text to fit the defined width.
I just saw that latest works in links instead of a concrete version number.
I think that's better than to update all links with each version increment.
I added a link in another file. I intended to create a new PR for that but missed that I had a type when I tried to switch the branch so it landed in this branch as well.
There was a problem hiding this comment.
"can reach easily" => "can easily exceed"
There was a problem hiding this comment.
I'll create an issue (and PR) about line lengths.
teymour-aldridge
commented
Jun 18, 2020
@zoechi I've suggested a few more improvements (really minor). |
teymour-aldridge
commented
Jun 18, 2020
Otherwise LGTM (looks good to me). |
Co-authored-by: Teymour Aldridge <42674621+teymour-aldridge@users.noreply.github.com>
Co-authored-by: Teymour Aldridge <42674621+teymour-aldridge@users.noreply.github.com>
Co-authored-by: Teymour Aldridge <42674621+teymour-aldridge@users.noreply.github.com>
zoechi
commented
Jun 18, 2020
I added another bullet that I couldn't find documentation for. |
| - Quoted attribute values are taken literally. The value is set at compile-time and does not change at run-time. | ||
| * `html! { <div> id="bar"</div> }` | ||
| - Unquoted attribute values are interpreted as expressions and therefore have to be valid Rust expressions. | ||
| * `let foo = "bar"; html! { <div id=foo></div> }` | ||
| * `html! { <div id=String::from("foo") + "bar"></div> }` |
There was a problem hiding this comment.
This is a bit confusing because literals are also expressions. I'd prefer if we left these notes out
| - Unquoted attribute values are interpreted as expressions and therefore have to be valid Rust expressions. | ||
| * `let foo = "bar"; html! { <div id=foo></div> }` | ||
| * `html! { <div id=String::from("foo") + "bar"></div> }` | ||
| - HTML tags names need to start with a lowercase letter. Besides that every valid HTML tag name is allowed. If the tag name starts with an uppercase letter it is interpreted as component name and attributes are passed as component properties. |
There was a problem hiding this comment.
| -HTML tags names need to start with a lowercase letter. Besides that every valid HTML tag name is allowed. If the tag name starts with an uppercase letter it is interpreted as component name and attributes are passed as component properties. | |
| -Tag names that begin with a lowercase letter will be treated as the name of a DOM elements. | |
| - Tag names that begin with an uppercase letter will be treated as a type implementing the `Component` trait and the attributes will be passed as component properties. |
No description provided.