* remove ToHtml trait
* re-add display impls
* make Vec::clone expilit
* fix doc
* fix conflicting impls
Into<Html> and Display can't be implemented on the same type
* update docs
* blanket impl won't work here
* bring back `Vec<VNode>: IntoPropValue<VNode>`
* macro tests
* Revert "fix conflicting impls"
This reverts commit 52f3c1fa8174489ba9cc783d708a49cc7b9c90a4.
These impls are fine now
* make examples compile
* .clone() should be before .into()
* Rc VList
* Make use of ImplicitClone and AttrValue in example
(There is more work to do but it's complicated so I will do it in
another PR)
* Impl ImplicitClone on VChild
---------
Co-authored-by: Cecile Tonglet <cecile.tonglet@cecton.com>
* Remove whitespace in website tutorial
* Update index.mdx
Remove whitespace in tutorial.
* Add more information to website.
Changes to be committed:
modified: website/docs/tutorial/index.mdx
modified: website/versioned_docs/version-0.20/getting-started/build-a-sample-app.mdx
modified: website/versioned_docs/version-0.20/tutorial/index.mdx
* Remove error: doctest failed, to rerun pass `-p website-test --doc`
Changes to be committed:
modified: website/docs/migration-guides/yew/from-0_18_0-to-0_19_0.mdx
* Correction of minor mistakes in website.
Changes to be committed:
modified: website/docs/getting-started/build-a-sample-app.mdx
modified: website/docs/tutorial/index.mdx
modified: website/versioned_docs/version-0.20/getting-started/build-a-sample-app.mdx
modified: website/versioned_docs/version-0.20/tutorial/index.mdx
* Run Prettier
Changes to be committed:
new file: package-lock.json
modified: website/docs/tutorial/index.mdx
modified: website/package-lock.json
modified: website/package.json
modified: website/versioned_docs/version-0.20/getting-started/build-a-sample-app.mdx
* Update Children to use Html.
* Fix website.
* Update website/docs/advanced-topics/children.mdx
* add further reading section
---------
Co-authored-by: Muhammad Hamza <muhammadhamza1311@gmail.com>
* Fix div prop name in css.mdx
* Fix div prop name in yew/website/docs/concepts/basic-web-technologies/css.mdx
`styles` is a not existing property in the `div` component. Changed it to `style`
That might be obvious for some, but it took me a few hours to figure out that `sqlx` is actually not `wasm32` compatible.
Funny enough, `cargo build` was working just fine, but `trunk serve` was failing with a very misleading error about `openssl`.
Maybe one day that small note will save a few hours to someone else
* Mention certain components must be children of Router
* make suggested changes
* fix typos
* update documentation with suggested changes again
* change /> to > in comment
* add ticks to Link & Switch in concepts/router.mdx
* 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
* 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 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
* Adding old_props to fn changed()
* Change old_props type to &Self::Properties
* Update examples that use fn changed() and want old_props
* Fix tests
* Fix invalid test flags
* cargo fmt
* Oops wrong regex
* Revert change for older version
* Remove unnecessary clone
* Add migration guide
* Oh wow the test was not running xD