mc1098
ed2e1ea00e
Add testing for website code blocks ( #2014 )
...
* 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
2021-08-28 13:17:28 +02:00
Muhammad Hamza
f50c8c3cba
Components v2 (2) ( #1961 )
...
* Start rewrite
* Rc > cloning props
* fmt + rm useless file
* move props inside `Context`
* router compiles
* fix boids example
* fix counter example
* fix crm example
* fix dyn_create_destroy_apps example
* fix file_upload example
* fix futures example
* fix game_of_life example
* fix inner_html example
* fix js_callback example
* fix mount_point example
* fix keyed_list example
* fix web_gl example
* fix two_apps example
* fix todomvc example
* fix timer example
* fix store example
* fix nested_list example
* fix node_refs example
* fix pub_sub example
* fix multi_thread example
* don't call `changed` if props weren't changed
* formatting
* fix doc tests, remove neq_assign
* update router example, fix neq_assign compile errors
* fix macro/rest of doc tests
* start updating documentation
* `Component`'s documentation
* Apply suggestions from code review
Co-authored-by: mc1098 <m.cripps1@uni.brighton.ac.uk>
* Apply suggestions from code review (part 2)
* Apply suggestions from code review (part 3)
* fix context
* clippy
* post merge fixes
Co-authored-by: mc1098 <m.cripps1@uni.brighton.ac.uk>
2021-08-25 13:11:39 +01:00
Xavientois
4a14d0f0a4
Add requirement for braces around most props ( #1939 )
...
* Limit the properties to literals and brace-enclosed expressions
* Update examples with new syntax
* Update packages/yew-macro/src/props/prop.rs
Co-authored-by: Teymour Aldridge <42674621+teymour-aldridge@users.noreply.github.com>
* Fix lints and strip braces around single expressions
* Update docs with new prop syntax
* Add some test cases for new syntax
* Ensure all tests are passing
* Clean up missed code
* Update tests
* Update reverted docs
* Revert versioned docs
* Fix optional attributes paragraph
* Remove accidentally added files
* Remove accidentally added french docs
* Update packages/yew-macro/src/props/prop.rs
Co-authored-by: mc1098 <m.cripps1@uni.brighton.ac.uk>
* Fix forgotten braces and test cases
* Revert i18n old docs
* Revert translated docs
* Remove suggested fix in favour of more succinct error message
* Update errors after rebase
* Remove files accidentally added while rebasing
* Fix merge conflicts
Co-authored-by: Teymour Aldridge <42674621+teymour-aldridge@users.noreply.github.com>
Co-authored-by: mc1098 <m.cripps1@uni.brighton.ac.uk>
2021-07-18 18:54:21 +02:00
Muhammad Hamza
10b67ea18c
Docusaurus v2 ( #1872 )
...
* Docusaurus v2
* i18n
* Fix firebase hosting config
2021-05-26 22:32:07 +02:00