* 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`
* 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
* 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 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: Promote use of AttrValue instead of String or Rc<String>
* update: Also mention AttrValue in the elements' page
* format: ran fmt:write to correct formatting issue
* fix: refactor doc comments to conform to compiling rules
* Update introduction.mdx
The `if else` example was syntactically correct, but had a semantic issue of not using the condition variable. Could lead to confusion if you are a newbie.
* Update conditional-rendering.mdx
changed if condition variable in html docs
* Note about tag casing and fixed example
* Added notes about tag casing
* Removed broken part of SVG example
* Slight change to SVG example
* removed some newlines
* Update website/docs/concepts/html/introduction.mdx
Co-authored-by: WorldSEnder <WorldSEnder@users.noreply.github.com>
Co-authored-by: WorldSEnder <WorldSEnder@users.noreply.github.com>
* RenderFn can be be directly Fn() now.
* Switch switch to function component.
* Make Link a function component.
* Remove non-exhaustive.
* Add migration guide.
* Update Website Docs.
* Fix CI.
* Pushing to Navigator no longer requires an owned instance.
* Fix CI.
* Fix code size.
* Further optimisation.
* Read through the docs and correct spelling and grammar
* Run prettier
* Apply review suggestions
Co-authored-by: Muhammad Hamza <muhammadhamza1311@gmail.com>
* adjust translation messages
Co-authored-by: Muhammad Hamza <muhammadhamza1311@gmail.com>
* Docs overhaul part2
* fix links and require them for CI
* remove translations for 0.17
* remove a bunch of unused documentation
* run prettier
* fixup links and locations of some translations
* add prettier
* ci
* run prettier
* run prettier in CI
* run prettier --write
* ignore README.md
* specify googleAnalytics
* fmt
* npm run write-translations
* fmt
* ignore i18n json files
they're autogenerated and don't like being formatted
* post merge fixes & some updates
* post merge fixes
I was originally going to put a PR to fix "has not side-effects", but I also re-read this sentence and realized it could be interpreted as saying a pure function returns its parameters, not a deterministic value based on its parameters.
* implement event handling with multiple subtree roots
* add listeners to all subtree roots
* move host element to Registry
* add BSubtree argument
* surface level internal API for BSubtree
* cache invalidation & document limitations
* Update portal documentation
* Add test case for hierarchical event bubbling
* add shadow dom test case
* add button to portals/shadow dom example
* change ShadowRootMode in example to open
BSubtree controls the element where listeners are registered.
we have create_root and create_ssr
Async event dispatching is surprisingly complicated.
Make sure to see #2510 for details, comments and discussion
takes care of catching original events in shadow doms
Figuring out how to use manual event listening with Function Components
took me a while. The new docs already contain a great example!
I add a small cross reference here to make it more discoverable.
Co-authored-by: Peter Kolloch <peter.kolloch@nexxiot.com>
* Convert components concept docs from SC to FC
- moved struct components to advanced topics
- added docs about HOC for Suspense and Context
- added a ease-in topic before components that introduces
HTML/CSS/JS in yew
- edit components concept to use function components
* translations
* fix todo links
* fix tests
* spelling bee
* fix docs.rs logo url
* fix formatting
* bump docusaurus to beta14
* bring back the semicolon
* cache npm for build-website workflow
* Add prebuilt cargo-sweep binary
* Optimize website CI
* per-job caching, stale cache invalidation
* extract fmt job as workflow
move website test as a prerequisite for publish
* fix typo in cargo-sweep executable path
* chmod +x
* rename to main-checks.yml
* --exclude has to be used with --workspace
* revert accidental revert
* Switch from cargo-sweep to rust-cache
* link to this related issue of extra brackets
* remove blanks
* exclude website-test in main tests
* rename suffixes from .mdx to .md
* replace actions-rs/install with wasm-pack-action
fixes#2351
* shouldn't ignore .md because website snippet tests depends on .md files and there can be
#[doc(include("../some.md"))] in the code
* restore accidentally deleted mdx files
* include tools/website-test (for real this time)