1142 Commits

Author SHA1 Message Date
Justin Starry
ebbd145bcd
Prep release for v0.14 (#1027) 0.14.0 2020-03-14 18:50:46 +08:00
Justin Starry
84d9053509
Pipe through fetch errors in web-sys (#1025) 2020-03-14 17:46:39 +08:00
yossarian
ed1bedc770
Improve flexibility of message sending API (#999)
* init

* minimum update

* update batch_callback

* update callback

* trigger CI/CD

* Add IntoIter trait

* update

* Fix docs

* update tests

* update examples

* remove into from example

* format

* revert changes

* formatt
2020-03-14 11:23:41 +08:00
Kelly Thomas Kline
2778d11cc0
Derive Clone and Copy for WebSocketStatus (#1023)
* Derive Clone and Copy for WebSocketStatus

* Revert addition of unnecessary WebSocketStatus Copy derive
2020-03-14 10:44:42 +08:00
Thomas Lacroix
a9f299b471
Fix pub_sub example that no longer compiles in 0.13 (#989) 2020-03-12 12:39:41 +08:00
yossarian
c8cafd2ee2
initial (#1020) 2020-03-12 12:37:14 +08:00
Mathis
753e2d387c
fixed missing feature flag for yew dependency (#1022)
Co-authored-by: Mathis <mk@thepeaklab.com>
2020-03-12 12:36:48 +08:00
Justin Starry
ed5e8e0bac
Remove OS build check for web-sys compatibility (#1019) 2020-03-11 23:42:51 +08:00
Justin Starry
d7c5d5372c
Update gloo to v0.2.1 (#1018) 2020-03-11 23:42:44 +08:00
Justin Starry
3cd7cead79 Remove OS build check for web-sys compatibility 2020-03-11 23:17:05 +08:00
Nicklas Warming Jacobsen
a4ad32b3ce
Fix missing resize event in stdweb ResizeService (#1014) 2020-03-11 22:55:16 +08:00
Justin Starry
8afeb03278
Fix worker startup blob script (#1013) 2020-03-11 21:55:45 +08:00
Justin Starry
25b12d5a36
Fix web-sys public agents and improve multithread web-sys (#1006) 2020-03-10 21:21:51 +08:00
dependabot-preview[bot]
22904ebdd9
Update base64 requirement from 0.11.0 to 0.12.0 (#1009)
Updates the requirements on [base64](https://github.com/marshallpierce/rust-base64) to permit the latest version.
- [Release notes](https://github.com/marshallpierce/rust-base64/releases)
- [Changelog](https://github.com/marshallpierce/rust-base64/blob/master/RELEASE-NOTES.md)
- [Commits](https://github.com/marshallpierce/rust-base64/compare/v0.11.0...v0.12.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-09 16:51:17 +08:00
Justin Starry
20351ce848
Handle text messages properly in web-sys websocket service (#1005)
* Handle text messages properly in web-sys websocket service

* Enable sudo mode to avoid chrome issues

* nudge

* nudge

* firefox

* nudge

* nudge
2020-03-08 22:58:40 +08:00
Marcel Müller
d700525959
Add msg queuing for all messages for public agents (#1007)
* Add msg queuing for all messages for public agents

Fixes #944

* Send Disconnected and Destroy correctly

They now use the `send_message` so that they also
get queued in case the worker is not ready yet

* Remove todo about connected message
2020-03-08 19:57:43 +08:00
Justin Starry
bf0a610513 Remove outdated todo 2020-03-08 17:45:18 +08:00
Justin Starry
3a35abab9e Remove outdated todo comment 2020-03-08 17:43:54 +08:00
Justin Starry
212574a80b Remove outdated todo 2020-03-08 17:34:56 +08:00
Justin Starry
13ce079815 Update todo message 2020-03-08 17:28:01 +08:00
Justin Starry
2b90c38349
Clean up prop error messages (#960)
* Initial

* formatting

* wip

* add util fn

* message update

* refactor

* update error logic

* message refactor

* remove debug flag

* update

* add stderr

* update condition

* CR fix

* remove empty line

* update

* update error message

* wip

* work

* unchange clippy

* update

* remove logs

* println

* format

* clippy

* VERY WIP

* error collect

* refactor

* add second argument

* format

* wip

* wip with main parsser

* wip

* receive unexpected error

* Fix with props checks

* remove comments

* update

* format

* Fix test

Co-authored-by: Justin Starry <justin.m.starry@gmail.com>
2020-03-06 07:38:45 +08:00
Justin Starry
2187d0fbbe Prep v0.13.2 release 0.13.2 2020-03-05 11:04:51 +08:00
Justin Starry
532d6639f9
init (#1000) 2020-03-05 10:41:43 +08:00
Justin Starry
a4670fa80d
Fix web-sys clippy warning (#1001) 2020-03-05 10:31:34 +08:00
Justin Starry
96b224ee9b Prep v0.13.1 release 0.13.1 2020-03-05 00:18:58 +08:00
Ross Harrison
a94f6303a7
Bugfix: Load showcase stylesheets with include macro and style tag on example change (#992)
Bugfix: Loading showcase stylesheets into styletage allows styles for
different examples to be loaded after selection.
2020-03-05 00:14:24 +08:00
Justin Starry
686c5d6da0
Bump wasm-bindgen to 0.2.59 (#998) 2020-03-05 00:08:37 +08:00
Antti Keränen
7d67ef9bf5
Fix web_sys build (#997)
CharacterData needs to be deref'd to make a Node out of it.
Fixes #996
2020-03-04 23:57:40 +08:00
Matthias Lochbrunner
8448e00fb2
Updates example readme and fix typo (#988) 2020-03-02 00:10:35 +08:00
Justin Starry
d36da62115
Prepare v0.13 release (#986)
* Prepare v0.13 release

* add a few more changelog items
0.13.0
2020-03-01 23:56:02 +08:00
Justin Starry
801b727754
Re-enable services and agent features by default (#984)
* Re-enable services and agent features by default

* Fix failing tests

* Fix doc tests

* cargo fmt
2020-03-01 23:55:19 +08:00
Justin Starry
bb7c8280a6
Fix double node removal (#983)
* Fix double node removal

* Fix clippy
2020-03-01 19:16:04 +08:00
Justin Starry
86af481c0d
Allow running clippy without target (#982) 2020-03-01 16:43:22 +08:00
Justin Starry
c991c7c7d9
Fix agent borrow mut panic (#981) 2020-03-01 16:15:07 +08:00
AlephAlpha
afb5e9d7ac
Properties 2.0 (#975)
* Properties 2.0

* Fix problem when passing a closure to prop_or_else

* Update test names

* Add support for building with web-sys (#961)

* Enable travis

* `web-sys` general conversion (#826)

* Moved patches from different PRs.

* Add bits & pieces and some services.

* Rename `stdweb` feature to `std_web`.

* Move tests and examples to different PR.

* Revert some `cargo_web` handling removal.

* Missed something.

* Implement `console_error_panic_hook`.

* Update Cargo.toml

Co-authored-by: Justin Starry <justin.m.starry@gmail.com>

* Move document creation to util convenience method (#855)

* `web-sys` listener conversion (#813)

* `web-sys` listener initial try.

* Improve macros?

* Remove generic from `EventListenerHandle`.

* Fix build.

* A cleaner solution?

* Even cleaner.

* Fix `build.rs`.

* Minor improvements.

* Following the yew toml style.

* Fixing visibility.

* Fix `rustfmt`.

* Add `web-sys` re-exports.

* Move general changes to different PR.

* Remove compat.

* Actually remove `compat.rs`.

* Rename `stdweb` feature to `std_web`.

* Move to gloo's `EventListener` and some polish.

* Remove outdated comment.

* Change `EventHandler` to be cancelled on drop.

* `web-sys` html conversion (#817)

* Converting all `html` parts.

* Format.

* Move general changes to different PR.

* Removed compat.

* Rename `stdweb` feature to `std_web`.

* Remove redudant function copy.

* Some polish.

* Move to gloo's `EventListener`.

* Replace `unwrap`s with `expect`s.

* `web-sys` agent conversion (#818)

* Converting `agent`.

* Remove wrong `cfg` in imports.

* Move general changes to different PR.

* Some optimisations.

* Rename `stdweb` feature to `std_web`.

* Fix `ArrayBuffer` to `Uint8Array` conversions.

* Add js module worker.

* Use `cfg-if`` and `cfg-match` to make things clearer.

* Fix `std_web` build.

* Add some polish.

* Add build guards for invalid build configs (#866)

* `web_sys` cfg conversion (#862)

* Use `cfg-if` and `cfg-match` and some polish.

* Mistakes were made.

* Missed line during rebasing.

* Mistakes were undone.

* Remove global.

* Remove part of `global!`.

* `web-sys` services conversion (#827)

* Convert `console`.

* Finish services.

* Some polish.

* Fix `ArrayBuffer` to `Uint8Array` conversions.

* Fix aborting fetch leading to error and some polish.

* Replaced some `unwrap`s with `expect`s.

* Use `cfg_if` and `cfg_match` and do some polish.

* Proper scoping.

* Some fixes.

* Move fetch and reader services to different PR.

* Revert split.

* Fix CI builds (#877)

* Fix derive_props_test

* Move tests (#897) (#898)

* `web-sys` fetch service conversion (#867)

* Split implementation.

* Import global.

* Import global.

* Revert split.

* Make fetch available again.

* Revert "Revert split."

This reverts commit 6e3f101dbedde2142f041467a8ae40ef5e3920c5.

* Re-revert split.

* Some polish.

* Move to `wasm_bindgen_futures`.

* Switch to `thiserror`.

* wip

* Update src/services/fetch/web_sys.rs

Co-Authored-By: daxpedda <daxpedda@gmail.com>

* Some more polish.

Co-authored-by: Justin Starry <justin.m.starry@gmail.com>

* `web-sys` reader service conversion (#868)

* Split reader implementation.

* Revert split.

* Remove leftover files.

* Make reader available again.

* Revert "Revert split."

This reverts commit 8abdc9cf2b014ab61fef2c48d1af8927d9a5a330.

* Revert "Remove leftover files."

This reverts commit 188c6eb9693881c9987061de8deb29c6f4c613a4.

* Re-revert split.

* Polish.

* Forgot some part.

* Some polish.

* Some polish.

* `web-sys` examples/tests conversion (#841)

* Fix examples/tests to work with `web_sys`.

* Update `StorageService` usage.

* Split `stdweb` and `web-sys` examples.

* Fixing the shell script.

* Trying to reset file permissions.

* Update to new reader API.

* Update to new fetch API.

* Update to new fetch API.

* Re-enable examples CI.

* Deleted duplicate example.

* Some fixes.

* Fix rand build.

* Fix spawning workers in combination with `wasm-bindgen`. (#901)

* Fix component rendering process (#913)

* wip

* Fix component rendering process

* Simplify yew-macro a bit (#902)

* yew-macro: Simplify Properties validation

* Fix most clippy warnings

* Fix clippy warnings (#912)

* Import Task trait in dashboard example

* Remove duplicate vtag tests

* Fix prevent_default() by non-passive (#958)

* Fix prevent_default() by non-passive

* Fix cargo fmt

* Remove `Option` from most services.

* Remove `Option` from resize service.

* Apply fetch changes.

* Apply reader service changes.

* Fix `node_refs` example.

* Remove web-sys travis branch

Co-authored-by: daxpedda <daxpedda@gmail.com>
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
Co-authored-by: Jet Li <jing.i.qin@icloud.com>

* Fix vtag test warning (#978)

* Clean up exported apis and doc visibility (#977)

* Clean up exported apis and doc visibility

* Remove unused ScopeHolder

* Change ComponentLink to alias of Scope

* cargo fmt

* update new examples to Properties 2.0

* Fix a mistake when resolving conflicts

* Remove an outdated hack.

Co-authored-by: Justin Starry <justin.m.starry@gmail.com>
Co-authored-by: daxpedda <daxpedda@gmail.com>
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
Co-authored-by: Jet Li <jing.i.qin@icloud.com>
2020-03-01 10:43:54 +08:00
Justin Starry
f659052723
Fix children re-render component bug (#980)
* Fix children re-render component bug

* cargo clippy
2020-02-29 23:48:47 +08:00
Justin Starry
c02609ac4f
Improve docs.rs main page (#979) 2020-02-29 20:37:29 +08:00
Justin Starry
b4d5227e62
Clean up exported apis and doc visibility (#977)
* Clean up exported apis and doc visibility

* Remove unused ScopeHolder

* Change ComponentLink to alias of Scope

* cargo fmt
2020-02-29 19:58:07 +08:00
Justin Starry
d80e2f3e8a
Fix vtag test warning (#978) 2020-02-29 19:57:50 +08:00
Justin Starry
d38ce422f9
Add support for building with web-sys (#961)
* Enable travis

* `web-sys` general conversion (#826)

* Moved patches from different PRs.

* Add bits & pieces and some services.

* Rename `stdweb` feature to `std_web`.

* Move tests and examples to different PR.

* Revert some `cargo_web` handling removal.

* Missed something.

* Implement `console_error_panic_hook`.

* Update Cargo.toml

Co-authored-by: Justin Starry <justin.m.starry@gmail.com>

* Move document creation to util convenience method (#855)

* `web-sys` listener conversion (#813)

* `web-sys` listener initial try.

* Improve macros?

* Remove generic from `EventListenerHandle`.

* Fix build.

* A cleaner solution?

* Even cleaner.

* Fix `build.rs`.

* Minor improvements.

* Following the yew toml style.

* Fixing visibility.

* Fix `rustfmt`.

* Add `web-sys` re-exports.

* Move general changes to different PR.

* Remove compat.

* Actually remove `compat.rs`.

* Rename `stdweb` feature to `std_web`.

* Move to gloo's `EventListener` and some polish.

* Remove outdated comment.

* Change `EventHandler` to be cancelled on drop.

* `web-sys` html conversion (#817)

* Converting all `html` parts.

* Format.

* Move general changes to different PR.

* Removed compat.

* Rename `stdweb` feature to `std_web`.

* Remove redudant function copy.

* Some polish.

* Move to gloo's `EventListener`.

* Replace `unwrap`s with `expect`s.

* `web-sys` agent conversion (#818)

* Converting `agent`.

* Remove wrong `cfg` in imports.

* Move general changes to different PR.

* Some optimisations.

* Rename `stdweb` feature to `std_web`.

* Fix `ArrayBuffer` to `Uint8Array` conversions.

* Add js module worker.

* Use `cfg-if`` and `cfg-match` to make things clearer.

* Fix `std_web` build.

* Add some polish.

* Add build guards for invalid build configs (#866)

* `web_sys` cfg conversion (#862)

* Use `cfg-if` and `cfg-match` and some polish.

* Mistakes were made.

* Missed line during rebasing.

* Mistakes were undone.

* Remove global.

* Remove part of `global!`.

* `web-sys` services conversion (#827)

* Convert `console`.

* Finish services.

* Some polish.

* Fix `ArrayBuffer` to `Uint8Array` conversions.

* Fix aborting fetch leading to error and some polish.

* Replaced some `unwrap`s with `expect`s.

* Use `cfg_if` and `cfg_match` and do some polish.

* Proper scoping.

* Some fixes.

* Move fetch and reader services to different PR.

* Revert split.

* Fix CI builds (#877)

* Fix derive_props_test

* Move tests (#897) (#898)

* `web-sys` fetch service conversion (#867)

* Split implementation.

* Import global.

* Import global.

* Revert split.

* Make fetch available again.

* Revert "Revert split."

This reverts commit 6e3f101dbedde2142f041467a8ae40ef5e3920c5.

* Re-revert split.

* Some polish.

* Move to `wasm_bindgen_futures`.

* Switch to `thiserror`.

* wip

* Update src/services/fetch/web_sys.rs

Co-Authored-By: daxpedda <daxpedda@gmail.com>

* Some more polish.

Co-authored-by: Justin Starry <justin.m.starry@gmail.com>

* `web-sys` reader service conversion (#868)

* Split reader implementation.

* Revert split.

* Remove leftover files.

* Make reader available again.

* Revert "Revert split."

This reverts commit 8abdc9cf2b014ab61fef2c48d1af8927d9a5a330.

* Revert "Remove leftover files."

This reverts commit 188c6eb9693881c9987061de8deb29c6f4c613a4.

* Re-revert split.

* Polish.

* Forgot some part.

* Some polish.

* Some polish.

* `web-sys` examples/tests conversion (#841)

* Fix examples/tests to work with `web_sys`.

* Update `StorageService` usage.

* Split `stdweb` and `web-sys` examples.

* Fixing the shell script.

* Trying to reset file permissions.

* Update to new reader API.

* Update to new fetch API.

* Update to new fetch API.

* Re-enable examples CI.

* Deleted duplicate example.

* Some fixes.

* Fix rand build.

* Fix spawning workers in combination with `wasm-bindgen`. (#901)

* Fix component rendering process (#913)

* wip

* Fix component rendering process

* Simplify yew-macro a bit (#902)

* yew-macro: Simplify Properties validation

* Fix most clippy warnings

* Fix clippy warnings (#912)

* Import Task trait in dashboard example

* Remove duplicate vtag tests

* Fix prevent_default() by non-passive (#958)

* Fix prevent_default() by non-passive

* Fix cargo fmt

* Remove `Option` from most services.

* Remove `Option` from resize service.

* Apply fetch changes.

* Apply reader service changes.

* Fix `node_refs` example.

* Remove web-sys travis branch

Co-authored-by: daxpedda <daxpedda@gmail.com>
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
Co-authored-by: Jet Li <jing.i.qin@icloud.com>
2020-02-29 17:25:42 +08:00
yossarian
2a7d7acb43
Contributor testing docs improvement (#969)
* initial

* Update CONTRIBUTING.md

Co-authored-by: Justin Starry <justin.m.starry@gmail.com>
2020-02-27 08:53:28 +08:00
Justin Starry
6a759329d1
Bump rust version for macro tests (#965) 2020-02-25 22:30:26 +08:00
Miklós Tusz
90a7cdb9b5
Add WebGL example (#908) 2020-02-22 14:32:41 +08:00
yossarian
92aab6c97c
Fix contributing test instructions (#957) 2020-02-22 09:32:12 +08:00
Filippo Merli
b534a4c83a
Add components interaction example (#951)
This add a small example of how to use agents in order to send
messages between components.
2020-02-18 19:45:41 +08:00
Justin Starry
a5e74e7d1d
Update CHANGELOG.md 0.12.0 2020-02-16 16:14:14 +08:00
Justin Starry
6cc4449aec
Prepare v0.12 release (#953) 2020-02-16 16:13:28 +08:00
Matthew Fisher
df14a9fc3e
fix: link all outstanding TODO items to a ticket (#949)
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2020-02-15 20:52:33 +08:00
leo-lb
12da2b5119
Implement more of FetchOptions (#602)
* Implement more of FetchOptions

Add referrer, referrer_policy and integrity

* Pass options to Request constructor instead of fetch

* Derive Debug on ReferrerPolicy and Referrer

* WIP: Add tests

* Add tests for referrer and redirect

* Add FetchService `integrity` field test

* Add FetchService `integrity` field fail test and refactor

* Add FetchService `referrer_policy` field tests

Co-authored-by: Justin Starry <justin.m.starry@gmail.com>
2020-02-13 18:02:25 +08:00
Jonas Platte
1ede16795a ComponentLink: Allow send_message and send_message_batch through shared references (#931) 2020-02-10 18:08:43 +08:00