* Add VNode::html_from_raw
* Add docs for VNode::html_from_raw
* feature lock to available flags
* Actually raw
* Formatting + docs
* Tests
* More tests + docs
* fmt
* clippy
* CI
* No <div> around multi top-level nodes
* Update docs
* Fix braw detach
* Clippy & fmt
* Fix compile errors
* I hope you get attacked by Cow, Clippy
* Address review
* Reduce DOM calls
* improve detach bundle impl
* Add more tests
* Update example
* fmt
* Apply review suggestions
* fmt
* fix ci
* fix braw shift with multiple nodes
* rename function name
* fmt
* this should've been there
* ci be green
* Use keyed lists in tutorial example
The example should follow best practices such as using keyed lists.
* Add keys explanation when it is first introduced
* Fix link to keyed lists
* Add forgotten key prop
The following main.rs replicates the clippy warning:
```
use yew::prelude::*;
struct Props {
droppable: Vec<()>,
}
fn component(props: &Props) -> Html {
let props = Props { droppable: Vec::new() };
html! { <Component ..props /> }
}
fn main() {}
```
If I'm not mistaken this happens when using the `..` on any `Properties` with a field that implements `Drop`.
* Improve debugging page in docs
- add gloo console logging as an option
- moved subsubheading "Latest Info" under "Source Maps" to a subheading "Past Articles", which makes more sense for the content
- updated examples for `wasm-logger` and also made an equivalent one for `gloo-console`
I removed a lot of text to make it easier to read and improve clarity.
I did look it over but there may be other info you'd like to keep on the page.
I wanted to add more for `panics` but I wasn't sure what to put.
* Run Prettier
* Mention tracing-web under console logging
The source map support is also changed but will require more explanation.
* Proposed Documentation Improvements
#### Retrieved from https://yew.rs/docs/concepts/wasm-bindgen#jsvalue on 9/24/2022
`JsCast` is nicely structured so far, although I thought this section was worded strangely.
> The `dyn_into` method will consume `self`, as per convention for into methods in Rust, __and the type returned is `Result<T, Self>` this means if the casting fails then the value in `Err` is so you can try again or do something else with the original type.__
I believe this edit conveys the original idea, but makes more sense to the reader:
> The
[`dyn_into`](https://rustwasm.github.io/wasm-bindgen/api/wasm_bindgen/trait.JsCast.html#method.dyn_into)
method will consume `self`, as per convention for into methods in Rust, and the type returned is
`Result<T, Self>`. This means if the casting fails then the `Self` value in `Err` is preserved. You could try again
or do something else with the original type.
* Update website/versioned_docs/version-0.19.0/concepts/wasm-bindgen/introduction.mdx
Co-authored-by: Kaede Hoshikawa <futursolo@users.noreply.github.com>
* update latest docs
Co-authored-by: Muhammad Hamza <muhammadhamza1311@gmail.com>
Co-authored-by: Kaede Hoshikawa <futursolo@users.noreply.github.com>
* Fix code listing in tutorial/index.mdx
Sync with line 358
* update latest tutorial
Changes here should be enough
Co-authored-by: Muhammad Hamza <muhammadhamza1311@gmail.com>
* Fix typo in contrib instructions `cargo make tests` -> `cargo make test`
* Use `cargo make test-flow` for running all tests
* Remove 'WebSocket service tests' section from CONTRIBUTING.md
* updated README.md
added hyperlink to banner
* updated hyperlink linked to Examples
the link is updated. now the text 'Examples' when clicked redirects to the master branch and with that to the up-to-date examples.
* Change link of repojacking vulnerable link
The link to https://github.com/youncccat/zzhack is vulnerable to repojacking (it redirects to the orignial project that changed name), you should change the link to the current name of the project. if you won't change the link, an attacker can open the linked repository and attacks users that trust your links
* fixing all vulnerable repojacking list
* Replace unwrap with if let to prevent panic
* Add resume after unmount test
* Change BaseSuspense methods to associated functions
* Fix rustfmt issues
* fix portal shifting on reconciliation too often
the public vdom api changes to only allow directly
setting a Node as sibling (still optional) instead of a NodeRef.
This was the intention all along, since the NodeRef was
not dynamically tracked, and creating a portal into a subtree
already controlled by yew is not supported anway.
* fix feature soundness
* fix doc tests
* Update status of wasm Interface Types / Component Model Proposals
The Interface Types proposal has been superseeded by the Component
Model Proposal. Updating index.mdx with correct information.
* Improvements to wording of webassembly component model description
The same thing can be said a little more compactly.
* Various improvements to Classes, oriented around reducing allocations
- `push` no longer performs unnecessary allocations if `self` is empty.
- Most constructors (FromIterator, From, Extend) are now oriented around push, to take advantage of this
- `to_string` and `into_prop_value`:
- No longer allocate an unnecessary `Vec`; they instead preallocate a string of the correct length and push into it directly.
- No longer use a length check + `unsafe`; they instead match over a fallible .next() and proceed from there.
- Additionally, `into_prop_value` no longer builds a `String` or `Rc` if `Classes` contains a single `&'static str` or is empty.
- `From<String>` no longer clones the string if it contains a single class.
- `impl Eq for Classes`
* Fix duplicated is_empty test