* Make the talk titles consistent
* Add replacing the hardcoded list of talks with the one generated from data
* Update website/docs/tutorial.md
Co-authored-by: Simon <simon@siku2.io>
* Update website/docs/tutorial.md
Co-authored-by: Simon <simon@siku2.io>
Co-authored-by: Simon <simon@siku2.io>
* feat(examples): add function components todo example
* chore(examples): apply feedback for function components example
* chore(examples): apply more feedback for function components example
* feat(examples): implement custom hook for edit boolean toggle
* chore(examples): prep for merge, add more documentation
* chore(examples): add more descriptive comment to function component hook, fix cargo.toml
The line `server listening at 0.0.0.0:8080` isn’t very visible in the
logs of `trunk serve`, and can be easily be lost if the user does
multiple changes before looking at them. A beginner to web development
may not have the reflex to open this address, or may try to open
`dist/index.html` directly. In both cases he will not be able to see its
application.
* Add documentation for wasm-bindgen
Adds a wasm-bindgen section to docs and gives a high level
description of it's crates and how they are used with Yew.
* Fix typos and formatting
* Expand JS example section
* fix re-export web_sys through yew info
* Add HtmlSelectElement feature
* Fix identing
* Fix code example comment
`first_node` function can fail and in some situations, when the VNode
has not been mounted yet, so this adds a safe version that returns an
`Option<Node>` and refactors the previous version to use the "unchecked"
prefix as it can and should panic if the first node cannot be found.
* 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
This changes the dependency on anymap which is unmaintained and has a
soundness bug to an updated fork `anymap2` where the soundness bug has
been fixed.
General review of dependencies, removing ones that are not used and
bumping up minor versions to avoid breakage.
Consistent use of caret so that we use the most recent minor/patch
version of a dependency when building Yew crates.
* Add failing test for non bubbling events
Adds a failing test to identify the issue raised in #2061
* Fix handling events in capture phase
The global mutltiplex registers an event listeners on the body element
and then we do the event bubbling manually in Yew, however, because we
were still registering event listeners to run on the bubbling phase
events that do not bubble (like blur) never reach the body element.
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.
* Add documentation for possible infinite loops
Explains with an example of how a component could cause an infinite loop
to occur. This applies to both `v0.18` and `master`.
* Capitalize "Yew"
Co-authored-by: Simon <simon@siku2.io>
Co-authored-by: Simon <simon@siku2.io>
Hooks with initialization functions had a 'static lifetime requirement
on the signature, however, any closure given only needs to have a
lifetime that lives as long as the hook call.
* 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 no_implicit_prelude to derive_props test
* Add no_implicit_prelude to html_macro tests
* Fix function_component macro tests
function_component macro tests weren't being run by try build due to
change in dir name. Imports corrected now that function_component is now
in yew.
Adds no_implicit_prelude to *-pass tests
* Add no_implicit_prelude to props_macro tests
* fix typo in comment
Tutorial should be in the docs so that it can be matched to the version
yew that a user is trying to be informed on.
The tutorial now comes under the scope of website testing so had to
tweak the tutorial to pass the tests.