* 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
* Use From<Cow> of AttrValue in Link component
* docs about `BrowserHistory::default()`
* remove unused cow import
* remove unused cow import
* lint
* More accurate `BrowserHistory::default()` tips
* Update website/docs/concepts/router.md
Co-authored-by: Julius Lungys <32368314+voidpumpkin@users.noreply.github.com>
* Update website/docs/concepts/router.md
Co-authored-by: Simon <simon@siku2.io>
Co-authored-by: Julius Lungys <32368314+voidpumpkin@users.noreply.github.com>
Co-authored-by: Simon <simon@siku2.io>
* 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
* nested router structure diagram
* add Redirect, nested router documentation.
* add reminder
* fix the comment, duh
* snippets get tested too unless ignored
* fix inconsistent var name in snippet
* Add redirect to nested router example
normal component -> struct component
* Document about acceptable types for path segment
Document about router behaviour at fail to parse
* add missing ignore to snippet
* typo
* normal -> struct
* reformat codeblock and the markdown
functional comp -> function comp
consistent code snippet style
removed two ignores
* add back ignores
* typo, snippet correction. grammar.
* correction
Co-authored-by: mc1098 <m.cripps1@uni.brighton.ac.uk>
* 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>
* Initial commit
Forked at: 66d506e13329a06f7dce0b55a9427972b8aad3ff
Parent branch: origin/master
* Add the ability to add child nodes conditionally in html!
* WIP
Forked at: 66d506e13329a06f7dce0b55a9427972b8aad3ff
Parent branch: origin/master
* CLEANUP
Forked at: 66d506e13329a06f7dce0b55a9427972b8aad3ff
Parent branch: origin/master
* Experiment
* Failing test
* More tests
* More tests
* Add new HtmlIterable with syntax `for {...}` instead of `{for ...}`
* Remove HtmlIf from HtmlRoot (already done in HtmlTree)
* WIP
* WIP
* WIP
* WIP
* Revert
* CLEANUP
* WIP
* CLEANUP
* Remove IterableNew
* Renamed HtmlBranch to HtmlRootBraced and moved to mod.rs
* Update yew-macro/tests/html_macro/html-if-pass.rs
Co-authored-by: Simon <simon@siku2.io>
* Suggestion
* Oops
* Added ToNodeIterator to HtmlIf
* Improve error spans
* More html!()
* Move tests to not use browser
* Multiple children in if-expr
* Clippy fix
* Clippy fix again
* Re-trigger CI
* Apply suggestions from code review
Co-authored-by: Simon <simon@siku2.io>
* Replacing ParseResult by syn::Result everywhere
* Remove unnecessary &mut
* Attempt to add test on ToNodeIterator
* Clippy fixes
* Still works for some reason
* Revert "Attempt to add test on ToNodeIterator"
This reverts commit 75b1a85c28df36ad8bf61344eef56e06667da3b6.
* fix CI
* add docs on website
* Apply suggestions from code review
Co-authored-by: mc1098 <m.cripps1@uni.brighton.ac.uk>
* apparently I can't hide lines on website
* update stderr file
* will this work?
* fix bug where conditions can't be expressions
* better error message
* clippy & fmt
Co-authored-by: Simon <simon@siku2.io>
Co-authored-by: Hamza <muhammadhamza1311@gmail.com>
Co-authored-by: mc1098 <m.cripps1@uni.brighton.ac.uk>
* docs: how to add parameters on route
* docs: how to listen for route changes
* docs: how to link to parameterized routes
* docs: router polish
* docs: make router tests pass
* Refactor use ref hooks
`use_ref` has been renamed to `use_mut_ref` and `use_ref` has become a
similar hook for immutable reference.
This is different from React but I think lines up nicely with Rust as a
reference is immutable unless specified to be a mut ref.
* fix CI
Co-authored-by: Hamza <muhammadhamza1311@gmail.com>
* 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>
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
* 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.
* 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>
* 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>
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.
* 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
* Fix instructions in project-setup.md
Fix unusual formatting, add missing instructions for wasm-bindgen-cli
* Update project-setup.md
Add Docasaurus markup and abbreviation.
* Update website/docs/getting-started/project-setup.md
Co-authored-by: mc1098 <m.cripps1@uni.brighton.ac.uk>
* Update project-setup.md
* Update project-setup.md
* Update project-setup.md
$'s removed. I agree that aesthetically it's pleasing it's more important to be easier to copy and paste. Thank you for the suggestion.
Co-authored-by: mc1098 <m.cripps1@uni.brighton.ac.uk>