* 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 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>
* 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
* 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>
* Reorganize docs
* delete wasm-build-tools.mdx
* more small updates
* i hate versioned docs
* seems like I've got the traits of the certain owl who guards over the civilization when it comes to `;`
* just work please
* Update website/docs/concepts/components/lifecycle.mdx
Co-authored-by: Julius Lungys <32368314+voidpumpkin@users.noreply.github.com>
* little things
* post merge fixes
* npm update
Co-authored-by: Julius Lungys <32368314+voidpumpkin@users.noreply.github.com>
* change suffixes from md to mdx
fix broken links for English locale
tree shake and update docusaurus
add docusaurus ideal image plugin
use svg and themed image
delete unused static asset
* move localized landing page
* change GitLocalize project page
* nit pick
* remove ignore to have the block checked
* some documentation fixes
* more fixes
* why it didn't work before is beyond me
* next redirect
* change 0.18 docs folder structure to make it inline with next
* move docs to /docs
now that home is its own page, docs should be under `/docs/`
* tag 0.19.0 version on website
* Add key docs
* add frogments to sodebar
* remove duplicate title
* Apply suggestions from code review
Co-authored-by: mc1098 <m.cripps1@uni.brighton.ac.uk>
* Apply suggestions from code review
Co-authored-by: Muhammad Hamza <muhammadhamza1311@gmail.com>
* remove html comments
Co-authored-by: mc1098 <m.cripps1@uni.brighton.ac.uk>
Co-authored-by: Muhammad Hamza <muhammadhamza1311@gmail.com>
* Remove `web_sys` re-export
Removes re-exporting the `web_sys` dependency from the yew crate and
removes some `web_sys` features that were only enabled for re-exporting.
* re-export events through yew::events
The events page made a specific reference to the currentTarget of an
event and provided a link to MDN, however, Yew events have the
currentTarget of `body` when using the `html!` macro because of the global mutliplexer.
* Reword to use double-dot syntax instead of "with"
* Implement double-dot syntax for props in components
* Update documentation with new syntax
* Update forgotten doc
* Add descriptive comments
* Check props and base expression
* Make compatible with 1.49.0 by removing then
* Fix website tests
* Update error output
* Implicitly convert string literals to String if they are listed as props
* Remove unused keyword
* Rename function for checking if string literal
* Fix weird formatting
* Update code based on review
* Update website/docs/concepts/html/components.md
Co-authored-by: mc1098 <m.cripps1@uni.brighton.ac.uk>
* Base expression span includes dot2 now
* Improve specificity of error message
* Chain together error messages
* Add an example failure case to illustrate combined error message
* Update based on review comments
* Fix missing clones
Co-authored-by: mc1098 <m.cripps1@uni.brighton.ac.uk>
* Add doc-test to test website code snippets
Heavily inspired by tokio-rs/website repo.
* Fix code snippets to pass doc tests
Some code snippets are explicitly ignored and some are not run
to avoid having to include dependencies for one liners.
* Add website code snippet tests to CI
* Fix CI
* Remove doc-test from workspace
* Exclude doc-test from workspace
* Refactor code snippets and tests
Code snippets can import types from doc_test crate i.e.:
```rust
use doc_test::agents::EventBus;
```
This allows for moving some boilerplate away from the example and still
checks that the code compiles correctly.
Also some slight changes to some of the examples and the information
about `ComponentLink` which is deprecated.
* Move doc-test to packages
* Rename doc-test crate to website-test
The new name makes it more clear the purpose of this crate.
* fix ci
* Add documentation for VRef
Documents the way that VRef can be used to hold a web-sys Node value in
Yew.
* Improve phrasing and correct example mistake
Single quotes to double for strings, thankfully we are in Rust not JS
* Add documentation for boolean attributes
Adds documentation for explicit key=value syntax of boolean attributes.
* Improve wording to be more correct for Yew
Rewording to avoid stating that a literal 'true' is required by boolean
attributes.
Make it clear that the html example provided is only functionally
equivalent to the actual output emitted.