Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move channels to stable #2501

Merged
merged 8 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/counter/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"
2 changes: 1 addition & 1 deletion examples/counters/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"
2 changes: 1 addition & 1 deletion examples/directives/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"
2 changes: 1 addition & 1 deletion examples/error_boundary/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"
2 changes: 1 addition & 1 deletion examples/errors_axum/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"
2 changes: 1 addition & 1 deletion examples/fetch/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"
6 changes: 3 additions & 3 deletions examples/hackernews/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ actix-files = { version = "0.6", optional = true }
actix-web = { version = "4", optional = true, features = ["macros"] }
console_log = "1"
console_error_panic_hook = "0.1"
leptos = { path = "../../leptos", features = ["nightly"] }
leptos_meta = { path = "../../meta", features = ["nightly"] }
leptos = { path = "../../leptos" }
leptos_meta = { path = "../../meta" }
leptos_actix = { path = "../../integrations/actix", optional = true }
leptos_router = { path = "../../router", features = ["nightly"] }
leptos_router = { path = "../../router" }
log = "0.4"
serde = { version = "1", features = ["derive"] }
gloo-net = { version = "0.2", features = ["http"] }
Expand Down
2 changes: 1 addition & 1 deletion examples/hackernews/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"
2 changes: 1 addition & 1 deletion examples/hackernews/src/routes/stories.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub fn Stories() -> impl IntoView {

let hide_more_link = move || {
stories.get().unwrap_or(None).unwrap_or_default().len() < 28
|| pending()
|| pending.get()
};

view! {
Expand Down
4 changes: 2 additions & 2 deletions examples/hackernews/src/routes/story.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ pub fn Comment(comment: api::Comment) -> impl IntoView {
<a on:click=move |_| set_open.update(|n| *n = !*n)>
{
let comments_len = comment.comments.len();
move || if open() {
move || if open.get() {
"[-]".into()
} else {
format!("[+] {}{} collapsed", comments_len, pluralize(comments_len))
}
}
</a>
</div>
{move || open().then({
{move || open.get().then({
let comments = comment.comments.clone();
move || view! {
<ul class="comment-children">
Expand Down
2 changes: 1 addition & 1 deletion examples/hackernews_axum/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"
2 changes: 1 addition & 1 deletion examples/hackernews_islands_axum/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"
2 changes: 0 additions & 2 deletions examples/hackernews_islands_axum/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(lazy_cell)]

use leptos::*;
use leptos_meta::*;
use leptos_router::*;
Expand Down
2 changes: 1 addition & 1 deletion examples/portal/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"
2 changes: 1 addition & 1 deletion examples/router/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"
2 changes: 1 addition & 1 deletion examples/server_fns_axum/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"
2 changes: 1 addition & 1 deletion examples/session_auth_axum/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"
2 changes: 1 addition & 1 deletion examples/slots/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"
2 changes: 1 addition & 1 deletion examples/ssr_modes/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"
16 changes: 10 additions & 6 deletions examples/ssr_modes/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,20 +80,24 @@ fn Post() -> impl IntoView {
.map_err(|_| PostError::InvalidId)
})
};
let post = create_resource(id, |id| async move {
let post_resource = create_resource(id, |id| async move {
match id {
Err(e) => Err(e),
Ok(id) => get_post(id)
.await
.map(|data| data.ok_or(PostError::PostNotFound))
.map_err(|_| PostError::ServerError)
.flatten(),
.map_err(|_| PostError::ServerError),
}
});

let post = move || match post_resource.get() {
Some(Ok(Ok(v))) => Ok(v),
_ => Err(PostError::ServerError),
};

let post_view = move || {
post.and_then(|post| {
view! {
post().and_then(|post| {
Ok(view! {
// render content
<h1>{&post.title}</h1>
<p>{&post.content}</p>
Expand All @@ -103,7 +107,7 @@ fn Post() -> impl IntoView {
// when it's first served
<Title text=post.title.clone()/>
<Meta name="description" content=post.content.clone()/>
}
})
})
};

Expand Down
2 changes: 0 additions & 2 deletions examples/ssr_modes/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(result_flattening)]

pub mod app;

#[cfg(feature = "hydrate")]
Expand Down
2 changes: 1 addition & 1 deletion examples/ssr_modes_axum/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"
16 changes: 10 additions & 6 deletions examples/ssr_modes_axum/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,20 +80,24 @@ fn Post() -> impl IntoView {
.map_err(|_| PostError::InvalidId)
})
};
let post = create_resource(id, |id| async move {
let post_resource = create_resource(id, |id| async move {
match id {
Err(e) => Err(e),
Ok(id) => get_post(id)
.await
.map(|data| data.ok_or(PostError::PostNotFound))
.map_err(|_| PostError::ServerError)
.flatten(),
.map_err(|_| PostError::ServerError),
}
});

let post = move || match post_resource.get() {
Some(Ok(Ok(v))) => Ok(v),
_ => Err(PostError::ServerError),
};

let post_view = move || {
post.and_then(|post| {
view! {
post().and_then(|post| {
Ok(view! {
// render content
<h1>{&post.title}</h1>
<p>{&post.content}</p>
Expand All @@ -103,7 +107,7 @@ fn Post() -> impl IntoView {
// when it's first served
<Title text=post.title.clone()/>
<Meta name="description" content=post.content.clone()/>
}
})
})
};

Expand Down
2 changes: 0 additions & 2 deletions examples/ssr_modes_axum/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(result_flattening)]

pub mod app;

#[cfg(feature = "ssr")]
Expand Down
2 changes: 1 addition & 1 deletion examples/tailwind_actix/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"
2 changes: 1 addition & 1 deletion examples/tailwind_axum/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"
2 changes: 1 addition & 1 deletion examples/tailwind_csr/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"
2 changes: 1 addition & 1 deletion examples/timer/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"
2 changes: 1 addition & 1 deletion examples/todo_app_sqlite/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"
Loading