* Use From<Cow> of AttrValue in Link component
* docs about `BrowserHistory::default()`
* remove unused cow import
* remove unused cow import
* lint
* More accurate `BrowserHistory::default()` tips
* Update website/docs/concepts/router.md
Co-authored-by: Julius Lungys <32368314+voidpumpkin@users.noreply.github.com>
* Update website/docs/concepts/router.md
Co-authored-by: Simon <simon@siku2.io>
Co-authored-by: Julius Lungys <32368314+voidpumpkin@users.noreply.github.com>
Co-authored-by: Simon <simon@siku2.io>
An ElementWriter struct keeps track of the place where to insert elements,
instead of the previous apply! macro.
The Vec::drain api is used consume ancestors. This removes a panic unsafety:
the previous impl forgets to drop elements
Small fix: author -> authors in web_worker_fib
* nested router structure diagram
* add Redirect, nested router documentation.
* add reminder
* fix the comment, duh
* snippets get tested too unless ignored
* fix inconsistent var name in snippet
* Add redirect to nested router example
normal component -> struct component
* Document about acceptable types for path segment
Document about router behaviour at fail to parse
* add missing ignore to snippet
* typo
* normal -> struct
* reformat codeblock and the markdown
functional comp -> function comp
consistent code snippet style
removed two ignores
* add back ignores
* typo, snippet correction. grammar.
* correction
Co-authored-by: mc1098 <m.cripps1@uni.brighton.ac.uk>
* Initial commit
Forked at: 66d506e13329a06f7dce0b55a9427972b8aad3ff
Parent branch: origin/master
* Add the ability to add child nodes conditionally in html!
* WIP
Forked at: 66d506e13329a06f7dce0b55a9427972b8aad3ff
Parent branch: origin/master
* CLEANUP
Forked at: 66d506e13329a06f7dce0b55a9427972b8aad3ff
Parent branch: origin/master
* Experiment
* Failing test
* More tests
* More tests
* Add new HtmlIterable with syntax `for {...}` instead of `{for ...}`
* Remove HtmlIf from HtmlRoot (already done in HtmlTree)
* WIP
* WIP
* WIP
* WIP
* Revert
* CLEANUP
* WIP
* CLEANUP
* Remove IterableNew
* Renamed HtmlBranch to HtmlRootBraced and moved to mod.rs
* Update yew-macro/tests/html_macro/html-if-pass.rs
Co-authored-by: Simon <simon@siku2.io>
* Suggestion
* Oops
* Added ToNodeIterator to HtmlIf
* Improve error spans
* More html!()
* Move tests to not use browser
* Multiple children in if-expr
* Clippy fix
* Clippy fix again
* Re-trigger CI
* Apply suggestions from code review
Co-authored-by: Simon <simon@siku2.io>
* Replacing ParseResult by syn::Result everywhere
* Remove unnecessary &mut
* Attempt to add test on ToNodeIterator
* Clippy fixes
* Still works for some reason
* Revert "Attempt to add test on ToNodeIterator"
This reverts commit 75b1a85c28df36ad8bf61344eef56e06667da3b6.
* fix CI
* add docs on website
* Apply suggestions from code review
Co-authored-by: mc1098 <m.cripps1@uni.brighton.ac.uk>
* apparently I can't hide lines on website
* update stderr file
* will this work?
* fix bug where conditions can't be expressions
* better error message
* clippy & fmt
Co-authored-by: Simon <simon@siku2.io>
Co-authored-by: Hamza <muhammadhamza1311@gmail.com>
Co-authored-by: mc1098 <m.cripps1@uni.brighton.ac.uk>
* removed unused braces from html_nested marco
* allow specifying test name
* also fix for html! macro
* also fix for html! macro
* remove misplaced #[allow(unused_braces)]
* Refactor use ref hooks
`use_ref` has been renamed to `use_mut_ref` and `use_ref` has become a
similar hook for immutable reference.
This is different from React but I think lines up nicely with Rust as a
reference is immutable unless specified to be a mut ref.
* fix CI
Co-authored-by: Hamza <muhammadhamza1311@gmail.com>
* Attempt to fix recursion on display
* Include into_string() for AttrValue
* PartialEq takes the enum variant into account #2161
Co-authored-by: mibes <mibes@avaya.com>
* allow web worker resource to be relative
fixes#2056
* make backwards compatible with rust < 1.52
* fix clippy warning
* Apply suggestions from code review
Co-authored-by: mc1098 <m.cripps1@uni.brighton.ac.uk>
* do not reimplement stdlib function
* fixup previous
* improve docstring
Co-authored-by: mc1098 <m.cripps1@uni.brighton.ac.uk>