From ca07d29db5ae4451c0b2fe89764bcdd41b8d0a01 Mon Sep 17 00:00:00 2001 From: Sam Judelson <64875465+sjud@users.noreply.github.com> Date: Thu, 4 Apr 2024 23:11:28 -0400 Subject: [PATCH] stable examples change (#2497) --- examples/animated_show/Cargo.toml | 2 +- examples/counter/Cargo.toml | 2 +- examples/counter/src/lib.rs | 4 +- examples/counter_isomorphic/Cargo.toml | 3 +- examples/counters/Cargo.toml | 2 +- examples/counters/src/lib.rs | 13 +- examples/counters_stable/.gitignore | 20 --- examples/counters_stable/Cargo.toml | 28 ----- examples/counters_stable/Makefile.toml | 18 --- examples/counters_stable/README.md | 11 -- examples/counters_stable/e2e/.gitignore | 4 - .../counters_stable/e2e/package-lock.json | 83 ------------ examples/counters_stable/e2e/package.json | 7 -- .../counters_stable/e2e/playwright.config.ts | 77 ------------ .../e2e/tests/add_1k_counters.spec.ts | 19 --- .../e2e/tests/add_counter.spec.ts | 15 --- .../e2e/tests/clear_counters.spec.ts | 18 --- .../e2e/tests/decrement_count.spec.ts | 16 --- .../e2e/tests/enter_count.spec.ts | 30 ----- .../e2e/tests/fixtures/counters_page.ts | 98 --------------- .../e2e/tests/increment_count.spec.ts | 16 --- .../e2e/tests/remove_counter.spec.ts | 17 --- .../e2e/tests/view_counters.spec.ts | 19 --- examples/counters_stable/index.html | 7 -- examples/counters_stable/package.json | 11 -- examples/counters_stable/src/lib.rs | 118 ------------------ examples/counters_stable/src/main.rs | 8 -- .../tests/web/add_1k_counters.rs | 17 --- .../counters_stable/tests/web/add_counter.rs | 17 --- .../tests/web/clear_counters.rs | 19 --- .../tests/web/decrement_counter.rs | 18 --- .../counters_stable/tests/web/enter_count.rs | 34 ----- .../tests/web/fixtures/counters_page.rs | 112 ----------------- .../counters_stable/tests/web/fixtures/mod.rs | 1 - .../tests/web/increment_counter.rs | 18 --- examples/counters_stable/tests/web/main.rs | 16 --- .../tests/web/remove_counter.rs | 18 --- .../tests/web/view_counters.rs | 22 ---- examples/directives/Cargo.toml | 2 +- examples/errors_axum/Cargo.toml | 2 +- examples/fetch/Cargo.toml | 2 +- examples/fetch/src/lib.rs | 4 +- examples/gtk/Cargo.toml | 2 +- examples/gtk/src/main.rs | 2 +- examples/hackernews/src/routes/story.rs | 2 +- examples/hackernews/src/routes/users.rs | 2 +- examples/hackernews_axum/Cargo.toml | 6 +- .../hackernews_axum/src/error_template.rs | 4 +- .../hackernews_axum/src/routes/stories.rs | 2 +- examples/hackernews_axum/src/routes/story.rs | 10 +- examples/hackernews_axum/src/routes/users.rs | 2 +- examples/hackernews_islands_axum/Cargo.toml | 5 +- .../src/error_template.rs | 4 +- .../src/routes/stories.rs | 2 +- .../src/routes/story.rs | 8 +- .../src/routes/users.rs | 2 +- examples/hackernews_js_fetch/Cargo.toml | 6 +- .../hackernews_js_fetch/src/error_template.rs | 4 +- .../hackernews_js_fetch/src/routes/stories.rs | 2 +- .../hackernews_js_fetch/src/routes/story.rs | 8 +- .../hackernews_js_fetch/src/routes/users.rs | 2 +- examples/js-framework-benchmark/Cargo.toml | 2 +- examples/js-framework-benchmark/src/lib.rs | 18 +-- examples/login_with_token_csr_only/Cargo.toml | 4 +- examples/parent_child/Cargo.toml | 2 +- examples/parent_child/src/lib.rs | 10 +- examples/portal/Cargo.toml | 2 +- examples/portal/src/lib.rs | 10 +- examples/router/Cargo.toml | 6 +- examples/router/src/lib.rs | 10 +- examples/server_fns_axum/Cargo.toml | 6 +- examples/server_fns_axum/src/app.rs | 44 +++---- examples/session_auth_axum/Cargo.toml | 6 +- examples/slots/Cargo.toml | 2 +- examples/slots/src/lib.rs | 12 +- examples/ssr_modes/Cargo.toml | 6 +- examples/ssr_modes/src/app.rs | 6 +- examples/ssr_modes_axum/Cargo.toml | 6 +- examples/ssr_modes_axum/src/app.rs | 6 +- examples/tailwind_actix/Cargo.toml | 6 +- examples/tailwind_actix/src/app.rs | 4 +- examples/tailwind_axum/Cargo.toml | 6 +- examples/tailwind_axum/src/app.rs | 2 +- examples/tailwind_csr/Cargo.toml | 6 +- examples/tailwind_csr/src/app.rs | 4 +- examples/timer/Cargo.toml | 2 +- examples/timer/src/lib.rs | 8 +- examples/todo_app_sqlite/Cargo.toml | 6 +- examples/todo_app_sqlite_axum/Cargo.toml | 6 +- examples/todo_app_sqlite_csr/Cargo.toml | 6 +- 90 files changed, 168 insertions(+), 1089 deletions(-) delete mode 100644 examples/counters_stable/.gitignore delete mode 100644 examples/counters_stable/Cargo.toml delete mode 100644 examples/counters_stable/Makefile.toml delete mode 100644 examples/counters_stable/README.md delete mode 100644 examples/counters_stable/e2e/.gitignore delete mode 100644 examples/counters_stable/e2e/package-lock.json delete mode 100644 examples/counters_stable/e2e/package.json delete mode 100644 examples/counters_stable/e2e/playwright.config.ts delete mode 100644 examples/counters_stable/e2e/tests/add_1k_counters.spec.ts delete mode 100644 examples/counters_stable/e2e/tests/add_counter.spec.ts delete mode 100644 examples/counters_stable/e2e/tests/clear_counters.spec.ts delete mode 100644 examples/counters_stable/e2e/tests/decrement_count.spec.ts delete mode 100644 examples/counters_stable/e2e/tests/enter_count.spec.ts delete mode 100644 examples/counters_stable/e2e/tests/fixtures/counters_page.ts delete mode 100644 examples/counters_stable/e2e/tests/increment_count.spec.ts delete mode 100644 examples/counters_stable/e2e/tests/remove_counter.spec.ts delete mode 100644 examples/counters_stable/e2e/tests/view_counters.spec.ts delete mode 100644 examples/counters_stable/index.html delete mode 100644 examples/counters_stable/package.json delete mode 100644 examples/counters_stable/src/lib.rs delete mode 100644 examples/counters_stable/src/main.rs delete mode 100644 examples/counters_stable/tests/web/add_1k_counters.rs delete mode 100644 examples/counters_stable/tests/web/add_counter.rs delete mode 100644 examples/counters_stable/tests/web/clear_counters.rs delete mode 100644 examples/counters_stable/tests/web/decrement_counter.rs delete mode 100644 examples/counters_stable/tests/web/enter_count.rs delete mode 100644 examples/counters_stable/tests/web/fixtures/counters_page.rs delete mode 100644 examples/counters_stable/tests/web/fixtures/mod.rs delete mode 100644 examples/counters_stable/tests/web/increment_counter.rs delete mode 100644 examples/counters_stable/tests/web/main.rs delete mode 100644 examples/counters_stable/tests/web/remove_counter.rs delete mode 100644 examples/counters_stable/tests/web/view_counters.rs diff --git a/examples/animated_show/Cargo.toml b/examples/animated_show/Cargo.toml index 4df8cfa0b8..c4850bd292 100644 --- a/examples/animated_show/Cargo.toml +++ b/examples/animated_show/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" codegen-units = 1 lto = true -[dependencies] +[dependencies] leptos = { path = "../../leptos", features = ["csr"] } console_log = "1" log = "0.4" diff --git a/examples/counter/Cargo.toml b/examples/counter/Cargo.toml index 9ae44fe19b..46f237b64f 100644 --- a/examples/counter/Cargo.toml +++ b/examples/counter/Cargo.toml @@ -8,7 +8,7 @@ codegen-units = 1 lto = true [dependencies] -leptos = { path = "../../leptos", features = ["csr", "nightly"] } +leptos = { path = "../../leptos", features = ["csr"] } console_log = "1" log = "0.4" console_error_panic_hook = "0.1.7" diff --git a/examples/counter/src/lib.rs b/examples/counter/src/lib.rs index a55a630693..66b0e90dcd 100644 --- a/examples/counter/src/lib.rs +++ b/examples/counter/src/lib.rs @@ -14,9 +14,9 @@ pub fn SimpleCounter( view! {
- + - "Value: " {value} "!" + "Value: " {move || value.get()} "!"
} diff --git a/examples/counter_isomorphic/Cargo.toml b/examples/counter_isomorphic/Cargo.toml index 370987d779..fccc8a4904 100644 --- a/examples/counter_isomorphic/Cargo.toml +++ b/examples/counter_isomorphic/Cargo.toml @@ -31,7 +31,6 @@ simple_logger = "4.3" tracing = { version = "0.1", optional = true } [features] -default = ["nightly"] hydrate = ["leptos/hydrate", "leptos_meta/hydrate", "leptos_router/hydrate"] ssr = [ "dep:actix-files", @@ -45,7 +44,7 @@ ssr = [ nightly = ["leptos/nightly", "leptos_router/nightly"] [package.metadata.cargo-all-features] -denylist = ["actix-files", "actix-web", "leptos_actix", "nightly"] +denylist = ["actix-files", "actix-web", "leptos_actix"] skip_feature_sets = [["ssr", "hydrate"]] [package.metadata.leptos] diff --git a/examples/counters/Cargo.toml b/examples/counters/Cargo.toml index a788c6ddbb..d59b430352 100644 --- a/examples/counters/Cargo.toml +++ b/examples/counters/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [dependencies] -leptos = { path = "../../leptos", features = ["csr", "nightly"] } +leptos = { path = "../../leptos", features = ["csr"] } log = "0.4" console_log = "1" console_error_panic_hook = "0.1.7" diff --git a/examples/counters/src/lib.rs b/examples/counters/src/lib.rs index 59428cc18d..3df34397c7 100644 --- a/examples/counters/src/lib.rs +++ b/examples/counters/src/lib.rs @@ -16,14 +16,14 @@ pub fn Counters() -> impl IntoView { provide_context(CounterUpdater { set_counters }); let add_counter = move |_| { - let id = next_counter_id(); + let id = next_counter_id.get(); let sig = create_signal(0); set_counters.update(move |counters| counters.push((id, sig))); set_next_counter_id.update(|id| *id += 1); }; let add_many_counters = move |_| { - let next_id = next_counter_id(); + let next_id = next_counter_id.get(); let new_counters = (next_id..next_id + MANY_COUNTERS).map(|id| { let signal = create_signal(0); (id, signal) @@ -53,17 +53,17 @@ pub fn Counters() -> impl IntoView { {move || counters.get() .iter() - .map(|(_, (count, _))| count()) + .map(|(_, (count, _))| count.get()) .sum::() .to_string() } " from " - {move || counters().len().to_string()} + {move || counters.get().len().to_string()} " counters."