* Editing fixes on Editor Setup page
- "Jetbrains" fixed to "Jetbrains"
- fixed some typos and grammatical errors
- improved sentence flow
* Space before ignore attribute
* 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)
`Model` is ambiguous and not a user-friendly name.
Some of the newer docs are already referring to the root component as
`App`.
This PR follows this naming scheme:
- `App` for a root component
- `MyComponent` for an arbitrary component
This naming is inspired by the React docs.
i18n references were not changed. They need a larger rewrite which will
go in a separate PR.
* 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>
* Make Html a Result.
* Fix tests.
* Implement Suspense.
* Schedule render when suspension is resumed.
* Shift children into a detached node.
* styled example.
* Update wording a little bit.
* Move hint to hint.
* Add some tests.
* Fix clippy.
* Add docs.
* Add to sidebar.
* Fix syntax highlight.
* Component -> BaseComponent.
* Html -> VNode, HtmlResult = RenderResult<Html>.
* Suspendible Function Component.
* Add a method to create suspension from futures.
* Revert extra changes.
* Fix tests.
* Update documentation.
* Switch to custom trait to make test reliable.
* Fix file permission.
* Fix docs.
* Remove log.
* Fix file permission.
* Fix component name error.
* Make Suspension a future.
* yeet Callback::once
* yeet Callback::reform
* remove passive overrides
Event's passive state will be determined by sane defaults set by Yew
* clippy
* docs
* make CI happy
* Revert "yeet Callback::reform"
This reverts commit 33e7770d
* why?
I literally tick-marked reformat before commit. Does it not use rustfmt???
* Update packages/yew/src/callback.rs
Co-authored-by: Julius Lungys <32368314+voidpumpkin@users.noreply.github.com>
Co-authored-by: Julius Lungys <32368314+voidpumpkin@users.noreply.github.com>
* remove backticks on wasm-bindgen
* make themed svg for agent life cycle
* wording
* Revert "make themed svg for agent life cycle"
This reverts commit 3b3a892bd36dc9da4b1d8d756b2964a8be707f7c.
* Revert "Revert "make themed svg for agent life cycle""
This reverts commit 5ac75821a15db6063227c4f10557899f07b847a7.
* wording
* jetbrains tips update
* 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