Skip to content

Commit

Permalink
Merge pull request #966 from daxpedda/web-sys-fixes
Browse files Browse the repository at this point in the history
web-sys master merge
  • Loading branch information
jstarry authored Feb 26, 2020
2 parents f6fe1e0 + 4790b33 commit 4b43e24
Show file tree
Hide file tree
Showing 50 changed files with 1,300 additions and 847 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ If applicable, add screenshots to help explain your problem.

**Environment:**
- Yew version [e.g. v0.10, `master`]
- Rust version [e.g. 1.40.0]
- Rust version [e.g. 1.41.0]
- Target if relevant [e.g. `wasm32-unknown-emscripten`]
- `stdweb` / `web-sys` version [e.g. web-sys v0.3.33]
- OS: [e.g. macos]
Expand Down
2 changes: 2 additions & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
report_todo = "Unnumbered"
report_fixme = "Unnumbered"
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# Changelog

## **0.12** *(2020-02-16)*

- #### ⚡️ Features

- Improved ergonomics for `html! { for .. }`. [[@jstarry], [#875](https://github.com/yewstack/yew/pull/875)]
- Added `#[props(default = "fn_path")]` for specifying a default property value. [[@AlephAlpha], [#881](https://github.com/yewstack/yew/pull/881)]
- Exposed the macros for creating format types. [[@ctm], [#883](https://github.com/yewstack/yew/pull/883)]
- Added support for binary-only and text-only formats in `WebSocketService`. [[@ctm], [#851](https://github.com/yewstack/yew/pull/851)]
- Implemented `PartialEq` for `ChildrenRenderer` to allow `children` comparison. [[@jstarry], [#916](https://github.com/yewstack/yew/pull/916)]
- Reduced restrictions on `ComponentLink` methods to improve `Future` support. [[@jplatte], [#931](https://github.com/yewstack/yew/pull/931)]
- Added `referrer`, `referrer_policy` and `integrity` to `FetchOptions`. [[@leo-lb], [#931](https://github.com/yewstack/yew/pull/931)]

- #### 🛠 Fixes

- Fixed touch event listeners. [[@AlephAlpha], [#872](https://github.com/yewstack/yew/pull/872)]
- Fixed bad behavior when setting a `ref` on a `Component`. [[@jstarry], [#913](https://github.com/yewstack/yew/pull/913)]
- Fixed ResizeTask cancellation. [[@jstarry], [#915](https://github.com/yewstack/yew/pull/915)]

- #### 🚨 Breaking changes

- Switched from using `failure` to `anyhow` and `thiserror` for Yew errors. [[@daxpedda], [#863](https://github.com/yewstack/yew/pull/863)]
- Removed `cancel` method from `Task` trait in favor of relying on [`Drop`](https://doc.rust-lang.org/book/ch15-03-drop.html). [[@kakoc], [#899](https://github.com/yewstack/yew/pull/899)]
- Renamed `NodeRef.try_into` to `NodeRef.cast` to avoid trait conflicts. [[@jstarry], [#917](https://github.com/yewstack/yew/pull/917)]

## **0.11** *(2020-01-06)*

This release aims to lay the groundwork for Yew component libraries and clean up the API for the ever elusive 1.0 release.
Expand Down Expand Up @@ -638,19 +662,25 @@ This release introduces the concept of an `Agent`. Agents are separate activitie
## ✨ **0.1** *(2017-12-31)*

[Web Workers API]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API
[@AlephAlpha]: https://github.com/AlephAlpha
[@astraw]: https://github.com/astraw
[@boydjohnson]: https://github.com/boydjohnson
[@carlosdp]: https://github.com/carlosdp
[@charvp]: https://github.com/charvp
[@ctaggart]: https://github.com/ctaggart
[@ctm]: https://github.com/ctm
[@daxpedda]: https://github.com/daxpedda
[@davidkna]: https://github.com/davidkna
[@DenisKolodin]: https://github.com/DenisKolodin
[@dermetfan]: https://github.com/dermetfan
[@dunnock]: https://github.com/dunnock
[@hgzimmerman]: https://github.com/hgzimmerman
[@izissise]: https://github.com/izissise
[@jplatte]: https://github.com/jplatte
[@jstarry]: https://github.com/jstarry
[@kakoc]: https://github.com/kakoc
[@kellytk]: https://github.com/kellytk
[@leo-lb]: https://github.com/leo-lb
[@lizhaoxian]: https://github.com/lizhaoxian
[@mdtusz]: https://github.com/mdtusz
[@mrh0057]: https://github.com/mrh0057
Expand Down
48 changes: 48 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
## Contribution Guide

### Setup your local development environment

#### Add the wasm target

```bash
rustup target add wasm32-unknown-unknown
```

#### Install [cargo-web]

This is an optional tool that simplifies running the examples:

```bash
cargo install cargo-web
```

> Add `--force` option to ensure you install the latest version.
[cargo-web]: https://github.com/koute/cargo-web

#### Build

```bash
cargo build --target wasm32-unknown-unknown
```

#### Test
For the tests to work one have to ensure that `wasm-bindgen-cli` is installed.
[Instructions](https://rustwasm.github.io/docs/wasm-bindgen/wasm-bindgen-test/usage.html#install-the-test-runner)

Additionally a webdriver must be installed locally and configured to be on the
`PATH`. Currently supports `geckodriver`, `chromedriver`, and `safaridriver`,
although more driver support may be added! You can download these at:

* geckodriver - https://github.com/mozilla/geckodriver/releases
* chromedriver - http://chromedriver.chromium.org/downloads
* safaridriver - should be preinstalled on OSX

```bash
./ci/run_tests.sh
```
or

```bash
cargo test --target wasm32-unknown-unknown --features wasm_test
```
6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "yew"
version = "0.11.1"
version = "0.12.0"
edition = "2018"
authors = [
"Denis Kolodin <deniskolodin@gmail.com>",
Expand Down Expand Up @@ -44,7 +44,7 @@ thiserror = "1"
toml = { version = "0.5", optional = true }
wasm-bindgen = { version = "0.2.58", optional = true }
wasm-bindgen-futures = { version = "0.4", optional = true }
yew-macro = { version = "0.11.1", path = "crates/macro" }
yew-macro = { version = "0.12.0", path = "crates/macro" }

[dependencies.web-sys]
version = "0.3"
Expand Down Expand Up @@ -108,6 +108,8 @@ wasm-bindgen = "0.2.58"
# Changes here must be reflected in `build.rs`
[target.'cfg(all(target_arch = "wasm32", not(target_os="wasi"), not(cargo_web)))'.dev-dependencies]
wasm-bindgen-test = "0.3.4"
base64 = "0.11.0"
ssri = "5.0.0"

[target.'cfg(target_os = "emscripten")'.dependencies]
ryu = "1.0.2" # 1.0.1 breaks emscripten
Expand Down
Loading

0 comments on commit 4b43e24

Please sign in to comment.