1783 Commits

Author SHA1 Message Date
bakape
d89f1ccc5c
Optimize VTag construction, memory footprint and patching (#1947)
* yew-macro: optimize VTag construction in html! macro

* yew/vtag: decrease VTag memory footpting and construction args

* yew,yew-macro: optimize VTag contruction, memory footprint and diffing

* yew/vlist: revert to VTag boxing

* yew-macro: add clippy allow for nightly rust

* yew-macro:  fix allow namespace

* *: bump MSRV to 1.49.0

* yew/vnode: restore == for VTag comparison

* yew/vtag: clean up reference casting

* yew-macro/html_element: fix error span regression
2021-07-18 18:26:52 +02:00
Muhammad Hamza
2412a68bee
Refactor and cleanup codebase (#1842)
* remove yew-dsl

* remove yew-components

* remove yew-services

* remove yew::format

* fix CI

* move yew::agent to yew-agent crate

* move yew-functional to yew

plus a couple of misc fixes

* move futures and neqassign out of yewtil

* move yewtil::store to yew_agent, remove yewtil

* formatting

* fix tests

* update docs

* use `rustwasm` gloo repo instead of mine

* add docs

* use rustwasm/gloo repo

* remove unused file

* fix Makefile.toml

* Fix issues after rebase

* Apply suggestions from code review (part 1)

Co-authored-by: mc1098 <m.cripps1@uni.brighton.ac.uk>

* Apply suggestions from code review (part 2)

* move `#[function_component(_)]` tests

missed those before

* Apply suggestions from code review

Co-authored-by: mc1098 <m.cripps1@uni.brighton.ac.uk>

Co-authored-by: mc1098 <m.cripps1@uni.brighton.ac.uk>
2021-07-18 15:57:09 +02:00
Noah Corona
91ab14bfd3
Fix scheduler main queue delay (#1953) (#1954)
* Fix scheduler main queue delay (#1953)

Fixes an issue where a runnable added from outside the component
lifecyle (i.e. agent bridge message from inside a callback) would not be
executed until the next component lifecycle event.

* Add test for `scheduler::run`

Ensures `scheduler::run` executes runnables immediately.
yew-components-latest-state
2021-07-17 01:45:07 +02:00
mc1098
94b475213a
Fix versioned doc links (#1952) 2021-07-14 15:42:59 +02:00
mc1098
0f92d4878e
Add focusin and focusout event support (#1945)
* Adds focusin and focusout event support

* Update element-fail.stderr file
2021-07-09 19:21:44 +02:00
mc1098
44d920b813
Add href to Link components (Accessibility) (#1943)
anchors with the href attribute have the implicit 'link' ARIA role and
this allows for better accessibility for screen readers and allows
tabbing to the anchor point.
2021-07-03 15:55:06 +02:00
Xavientois
1280dfd831
Add Makefile override for changelog to skip doctests (#1940) 2021-06-28 12:36:55 +02:00
nitnelave
2e8f52c73f
Fix case warning on derived properties (#1929)
When deriving `Properties`, the compiler sometimes complains of the
non-Camel-case `Foo_build`. This fixes the issue.
2021-06-26 17:11:09 +02:00
Cecile Tonglet
b87717ce9b
Add troubleshooting section to getting-started doc (#1933) 2021-06-24 11:37:46 +02:00
Foo-x
5e683b7067
docs: fix broken link (#1926)
Refs #1421
2021-06-20 14:02:51 +02:00
Muhammad Hamza
ab81dba665
Fix CI errors (#1925)
* fix website npm lock-file

* clippy
2021-06-19 23:57:28 +02:00
Muhammad Hamza
c5e99b36a9
update docusaurus (#1924) 2021-06-19 00:19:03 +02:00
mc1098
efcd928c63
Add documentation for VRef (#1923)
* 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
2021-06-17 13:04:14 +02:00
mc1098
846073944f
Update ChangeData::Select documentation (#1922)
Removed the methods that are no longer available on web-sys latest (0.3.51).
Added a note that the selected_options method requires the
HtmlCollection feature from the web-sys crate.
2021-06-16 17:58:30 +02:00
Adrian Wannenmacher
f9aeb632e7
Fix favicon path (#1921) 2021-06-15 22:47:34 +02:00
mc1098
0050e554bc
Add documentation for optional child component (#1920)
* Add documentation for optional child component

* Fix typo

* Fix example

* Fix inline style to be more consistent

Co-authored-by: Simon <simon@siku2.io>

* Fix style on versioned docs too

Co-authored-by: Simon <simon@siku2.io>
2021-06-14 20:22:11 +02:00
Muhammad Hamza
ec1ebe6756
Fix broken home link (#1918)
* Serve docs at `/` instead of `/docs`, no `/intro`

* fix links

* update workflow
2021-06-13 20:25:48 +02:00
TadahiroYamamura
f71ce826d9
fix syntax mistake (#1919) 2021-06-13 19:33:18 +02:00
mc1098
71990524af
Remove warning about prop_or_else macro (#1917)
The warning no longer applies to either version (next,
0.18.0).
2021-06-13 16:06:58 +02:00
mc1098
7538f688c0
Update doc issue link for lifecycle diagram (#1916)
Update the 'Contribute to our docs' link for a diagram of the component
lifecycle.
2021-06-12 20:51:23 +02:00
mc1098
778aedafd3
Add documentation for boolean attributes (#1913)
* 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.
2021-06-12 15:31:36 +02:00
Jesse Y. Cho
c58e07272c
Fix broken docs links (#1914) 2021-06-12 14:37:51 +02:00
Jesse Y. Cho
5fb952ef75
Change yew version (0.17->0.18) in build-a-sample-app.md (#1912) 2021-06-11 16:47:01 +02:00
gitlocalize-app[bot]
a1ddd251f5
Fix docs format (#1911)
* Translate optimizations.md via GitLocalize

* Translate callbacks.md via GitLocalize

* Translate custom-hooks.md via GitLocalize

Co-authored-by: sansx <646924078@qq.com>
2021-06-08 14:45:12 +02:00
gitlocalize-app[bot]
ec625d011c
Update chinese translations (#1909)
* Translate how-it-works.md via GitLocalize

* Translate optimizations.md via GitLocalize

* Translate html.md via GitLocalize

* Translate router.md via GitLocalize

* Translate callbacks.md via GitLocalize

* Translate format.md via GitLocalize

* Translate children.md via GitLocalize

* Translate services.md via GitLocalize

* Translate attribute.md via GitLocalize

* Translate refs.md via GitLocalize

* Translate intro.md via GitLocalize

* Translate function-components.md via GitLocalize

* Translate custom-hooks.md via GitLocalize

* Translate lists.md via GitLocalize

* Translate components.md via GitLocalize

* Translate agents.md via GitLocalize

* Translate using-wasm-pack.md via GitLocalize

* Translate using-trunk.md via GitLocalize

Co-authored-by: sansx <646924078@qq.com>
2021-06-07 20:01:28 +02:00
Jens Reimann
b03f02f624
Bring back &str assignment to optional properties (#1895)
This drops the "optional" conversion concept in favor of directly
converting to `Option<T>`.

fixes #1888
2021-06-07 17:15:59 +02:00
Cédric
9aaeef217d
[Docs] Add prerequisite target to "build a sample app" (#1907)
* Add prerequisite target to "build a sample app"

Hi,

While trying to get a simple app running on Yew, I had the target wasm32-unknown-unknown missing so my project couldn't work.

I managed to find the missing target (by searching from the error message I was getting) on the same "Getting started" documentation, but later than the "build a sample app" page I was on.

It is my opinion that this can be needed during the "build a sample app" step, earlier than the "Project setup" step.
Another option could be to reference the "Project setup" from "build a sample app", in order to troubleshoot why the sample app is not working.

This is but a proposal and if you think this is not needed, please close this PR.

* Update website/versioned_docs/version-0.18.0/getting-started/build-a-sample-app.md

Co-authored-by: Teymour Aldridge <42674621+teymour-aldridge@users.noreply.github.com>

Co-authored-by: Teymour Aldridge <42674621+teymour-aldridge@users.noreply.github.com>
2021-06-06 22:34:18 +02:00
sansx
e0cace1836 Update how-it-works.md
some words of docs are missing, I put them back, hope these are right.:D
2021-06-06 12:17:01 +02:00
Hamza
8fc81b47ee Fix issues after cherry-picking 2021-06-05 23:00:58 +02:00
bakape
e1f093858b yew-macro: fix inability to set the autoplay atribute (#1866) 2021-06-05 23:00:58 +02:00
Cecile Tonglet
679f0c854b Changelog fixes (#1849) 2021-06-05 23:00:58 +02:00
Cecile Tonglet
d00e332a1d Fix CHANGELOG issues 2021-06-05 23:00:58 +02:00
Cecile Tonglet
9f383baf7a (cargo-release) version 0.4.0 2021-06-05 23:00:58 +02:00
Cecile Tonglet
b46d112ec5 (cargo-release) version 0.3.0 2021-06-05 23:00:58 +02:00
Cecile Tonglet
46d3b56ed6 (cargo-release) version 0.3.0 2021-06-05 23:00:58 +02:00
Cecile Tonglet
50eb4191bf (cargo-release) version 0.18.0 2021-06-05 23:00:58 +02:00
Cecile Tonglet
e1f539a085 (cargo-release) version 0.18.0 2021-06-05 23:00:58 +02:00
Cecile Tonglet
e99e83ad37 Helper to build changelog (#1845) 2021-06-05 23:00:58 +02:00
Muhannad
1d63395c3b Impl IntoOptPropValue for Option<V> -> Option<T> (#1834)
* Impl IntoOptPropValue for Option<V> -> Option<T>

The only implmented types passed to impl_into_prop macro

* Update packages/yew/src/html/conversion.rs

sure

Co-authored-by: Simon <simon@siku2.io>

Co-authored-by: Simon <simon@siku2.io>
2021-06-05 23:00:58 +02:00
Simon
f17d370217 Implicit optional attributes (#1637) 2021-06-05 23:00:58 +02:00
bakape
e832c84623
yew: reduce scheduler call indirection (#1903) 2021-06-05 15:21:31 +02:00
sjud
5eda7ed5dc
Fix for CRM example compile error. (#1902)
Following up from:
https://github.com/yewstack/yew/issues/1898#issuecomment-854920672
2021-06-04 20:40:52 +02:00
dependabot[bot]
b959bcfe75
Update strum_macros requirement from 0.20 to 0.21 (#1901)
Updates the requirements on [strum_macros](https://github.com/Peternator7/strum) to permit the latest version.
- [Release notes](https://github.com/Peternator7/strum/releases)
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/commits)

---
updated-dependencies:
- dependency-name: strum_macros
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-04 20:13:59 +02:00
gitlocalize-app[bot]
991c2a2c42
Translate using-trunk.md via GitLocalize (#1899)
Co-authored-by: sansx <646924078@qq.com>
2021-06-04 15:31:09 +02:00
dependabot[bot]
dd1a5f1853
Update strum requirement from 0.20 to 0.21 (#1900)
Updates the requirements on [strum](https://github.com/Peternator7/strum) to permit the latest version.
- [Release notes](https://github.com/Peternator7/strum/releases)
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/commits)

---
updated-dependencies:
- dependency-name: strum
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-04 15:30:10 +02:00
sot528
915c5270d5
fix links. (#1893) 2021-06-01 18:45:36 +02:00
Muhammad Hamza
5fec49c3c6
Clean-up and optimize router a little bit (#1869)
* fix some spaghetti and make optimization along the way

* don't make DOM API call and re-recognize route every time current route is obtained

This has the drawback of requiring the `Routable` enum to be `Clone`. Generally, this shouldn't be an issue as cloning the value *should* be cheaper than making a DOM API call and then running the route recognition process

* fmt, tests, doc

* fix

* warn, not log

* make utils tests unit tests

* fix macro test

* cleanup router on destroy, update docs

* Clone bound + docs

* apply review
2021-05-31 20:30:50 +02:00
Dirk Kelly
4d334fd327
Update README Docs Repo link (#1889) 2021-05-31 18:35:44 +02:00
Diggory Blake
2475e160fd
Fix delay when loading posts page in router example (#1887) 2021-05-31 00:41:11 +02:00
Muhammad Hamza
b110221c53
Fix app crash (#1886) 2021-05-30 12:59:44 +02:00