Skip to content

Commit fef1fa3

Browse files
philip-petersonjstarry
authored andcommitted
feat: Remove usage of stdweb
1 parent ab76a44 commit fef1fa3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+1128
-3912
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ If applicable, add screenshots to help explain your problem.
2727
- Yew version: [e.g. v0.17, `master`]
2828
- Rust version: [e.g. 1.43.0, `nightly`]
2929
- Target, if relevant: [e.g. `wasm32-unknown-emscripten`]
30-
- Build tool, if relevant: [e.g. `wasm-pack`, `cargo-web`]
31-
- Web library: [`stdweb` OR `web-sys`]
30+
- Build tool, if relevant: [e.g. `wasm-pack`, `trunk`]
3231
- OS, if relevant: [e.g. MacOS]
3332
- Browser and version, if relevant: [e.g. Chrome v83]
3433

.github/workflows/pull-request.yml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ jobs:
2424
~/.cargo/registry
2525
~/.cargo/git
2626
target
27-
yew-stdweb/target
2827
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}
2928
restore-keys: |
3029
cargo-${{ runner.os }}-
@@ -48,12 +47,6 @@ jobs:
4847
cd packages/yew
4948
cargo clippy --all-targets --features "cbor msgpack toml yaml" -- -D warnings
5049
51-
- name: Run clippy - yew-stdweb with all features
52-
if: always()
53-
run: |
54-
cd packages/yew-stdweb
55-
cargo clippy --all-targets --features "cbor msgpack toml yaml" -- -D warnings
56-
5750
check_examples:
5851
name: Check Examples
5952
runs-on: ubuntu-latest
@@ -119,15 +112,6 @@ jobs:
119112
cd packages/yew
120113
cargo test --doc --features "doc_test wasm_test yaml msgpack cbor toml"
121114
122-
- name: Run doctest - yew-stdweb with features
123-
run: |
124-
# Sadly we can't run the tests on yew-stdweb as the snippets use `yew`, not `yew_stdweb` so the imports wouldn't work.
125-
# To fix this we just run them on yew but with yew-stdweb's default features enabled.
126-
cd packages/yew
127-
cargo test --doc \
128-
--no-default-features --features "agent std_web" \
129-
--features "doc_test wasm_test yaml msgpack cbor toml"
130-
131115
integration_tests:
132116
name: Integration Tests on ${{ matrix.toolchain }}
133117
runs-on: ubuntu-latest
@@ -165,7 +149,6 @@ jobs:
165149
~/.cargo/registry
166150
~/.cargo/git
167151
target
168-
yew-stdweb/target
169152
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}
170153
restore-keys: |
171154
cargo-${{ runner.os }}-
@@ -175,12 +158,6 @@ jobs:
175158
cd packages/yew
176159
wasm-pack test --chrome --firefox --headless -- --features "wasm_test"
177160
178-
- name: Run tests - yew-stdweb
179-
if: matrix.toolchain != 'stable'
180-
run: |
181-
cd packages/yew-stdweb
182-
wasm-pack test --chrome --firefox --headless -- --features "wasm_test"
183-
184161
- name: Run tests - yew-functional
185162
run: |
186163
cd packages/yew-functional

CONTRIBUTING.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,6 @@ cargo make --list-all-steps
2222

2323
The most important tasks are outlined below.
2424

25-
#### stdweb
26-
27-
To run the examples in `./yew-stdweb`, you may wish to install [cargo-web](https://github.com/koute/cargo-web):
28-
29-
```bash
30-
cargo install cargo-web
31-
```
32-
3325
## Tests
3426

3527
To run all tests, use the following command:

Makefile.toml

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ run_task = { name = ["lint", "tests"], fork = true }
2929
[tasks.lint]
3030
category = "Checks"
3131
description = "Check formatting and run Clippy"
32-
run_task = { name = ["lint-flow", "lint-stdweb"], fork = true }
32+
run_task = { name = ["lint-flow"], fork = true }
3333

3434
[tasks.tests]
3535
category = "Testing"
@@ -38,7 +38,6 @@ dependencies = ["tests-setup"]
3838
env = { CARGO_MAKE_WORKSPACE_SKIP_MEMBERS = ["**/examples/*"] }
3939
run_task = { name = [
4040
"test-flow",
41-
"tests-stdweb",
4241
"doc-test-flow",
4342
], fork = true, cleanup_task = "tests-cleanup" }
4443

@@ -53,19 +52,6 @@ private = true
5352
workspace = true
5453
dependencies = ["core::check-format-flow", "core::clippy-flow"]
5554

56-
[tasks.lint-stdweb]
57-
private = true
58-
cwd = "packages/yew-stdweb"
59-
command = "cargo"
60-
args = [
61-
"make",
62-
"--loglevel",
63-
"${CARGO_MAKE_LOG_LEVEL}",
64-
"--profile",
65-
"${CARGO_MAKE_PROFILE}",
66-
"lint-flow",
67-
]
68-
6955
[tasks.tests-setup]
7056
private = true
7157
script_runner = "@duckscript"
@@ -229,18 +215,6 @@ ignore_errors = true
229215
command = "docker"
230216
args = ["rm", "--force", "${ECHO_SERVER_CONTAINER_ID}"]
231217

232-
[tasks.tests-stdweb]
233-
private = true
234-
extend = "core::wasm-pack-base"
235-
cwd = "packages/yew-stdweb"
236-
args = [
237-
"test",
238-
"@@split(YEW_TEST_FLAGS, )",
239-
"--",
240-
"--features",
241-
"${YEW_TEST_FEATURES}",
242-
]
243-
244218
[tasks.test-flow]
245219
private = true
246220
workspace = true

docs/SUMMARY.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@
77
- [Project Setup](getting-started/project-setup.md)
88
- [Using trunk](getting-started/project-setup/using-trunk.md)
99
- [Using wasm-pack](getting-started/project-setup/using-wasm-pack.md)
10-
- [Using cargo-web](getting-started/project-setup/using-cargo-web.md)
1110
- [Starter Templates](getting-started/starter-templates.md)
1211
- [Build a Sample App](getting-started/build-a-sample-app.md)
13-
- [Choose web-sys or stdweb](getting-started/choose-web-library.md)
1412
- [Learn through examples](getting-started/examples.md)
1513

1614
## Core Concepts <a id="concepts"></a>

docs/concepts/components.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ is also a parameter called `first_render` which can be used to determine whether
7474
being called on the first render, or instead a subsequent one.
7575

7676
```rust
77-
use stdweb::web::html_element::InputElement;
78-
use stdweb::web::IHtmlElement;
77+
use web_sys::HtmlInputElement;
7978
use yew::prelude::*;
8079

8180
pub struct MyComponent {
@@ -93,7 +92,7 @@ impl Component for MyComponent {
9392

9493
fn rendered(&mut self, first_render: bool) {
9594
if first_render {
96-
if let Some(input) = self.node_ref.cast::<InputElement>() {
95+
if let Some(input) = self.node_ref.cast::<HtmlInputElement>() {
9796
input.focus();
9897
}
9998
}

0 commit comments

Comments
 (0)