From: Dominik Csapak <d.csapak@proxmox.com>
To: yew-devel@lists.proxmox.com
Subject: [PATCH yew-widget-toolkit 4/4] touch: adaptive scaffold: pass the rail group alignment through
Date: Mon, 10 Aug 2026 16:34:54 +0200 [thread overview]
Message-ID: <20260810143536.31163-5-d.csapak@proxmox.com> (raw)
In-Reply-To: <20260810143536.31163-1-d.csapak@proxmox.com>
The rail's group alignment is as much a layout choice as its leading
widget or its expand button, so forward it here too instead of making
callers drop down to a plain Scaffold just for that.
Also add the doc comment the property was missing on the rail itself.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
src/touch/adaptive_scaffold.rs | 10 ++++++++++
src/touch/navigation_rail.rs | 1 +
2 files changed, 11 insertions(+)
diff --git a/src/touch/adaptive_scaffold.rs b/src/touch/adaptive_scaffold.rs
index d70b1d8..a85328c 100644
--- a/src/touch/adaptive_scaffold.rs
+++ b/src/touch/adaptive_scaffold.rs
@@ -6,6 +6,7 @@ use yew::virtual_dom::{Key, VComp, VNode};
use pwt_macros::builder;
+use crate::css::JustifyContent;
use crate::dom::ViewportQuery;
use crate::prelude::*;
use crate::props::IntoOptionalKey;
@@ -105,6 +106,12 @@ pub struct AdaptiveScaffold {
#[prop_or_default]
pub rail_expand_button: bool,
+ /// Determines the navigation group alignment (rail layout only, see
+ /// [NavigationRail::group_alignment]).
+ #[builder(IntoPropValue, into_prop_value)]
+ #[prop_or_default]
+ pub rail_group_alignment: Option<JustifyContent>,
+
/// Selection forwarded to the active navigator.
#[builder(IntoPropValue, into_prop_value)]
#[prop_or_default]
@@ -188,6 +195,9 @@ impl PwtAdaptiveScaffold {
if let Some(expanded_query) = &props.rail_expanded_query {
rail = rail.expanded_query(expanded_query.clone());
}
+ if let Some(group_alignment) = &props.rail_group_alignment {
+ rail = rail.group_alignment(*group_alignment);
+ }
if let Some(default_active) = &props.default_active {
rail = rail.default_active(default_active.clone());
}
diff --git a/src/touch/navigation_rail.rs b/src/touch/navigation_rail.rs
index 05c5a01..fccc619 100644
--- a/src/touch/navigation_rail.rs
+++ b/src/touch/navigation_rail.rs
@@ -57,6 +57,7 @@ pub struct NavigationRail {
#[prop_or_default]
pub leading: Option<Html>,
+ /// Determines the alignment of the navigation group.
#[builder]
#[prop_or(JustifyContent::Center)]
pub group_alignment: JustifyContent,
--
2.47.3
prev parent reply other threads:[~2026-08-10 14:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-10 14:34 [PATCH yew-widget-toolkit/yew-widget-toolkit-assets 0/4] adaptive scaffold/navigation rail improvements Dominik Csapak
2026-08-10 14:34 ` [PATCH yew-widget-toolkit-assets 1/4] navigation rail: style the expand button Dominik Csapak
2026-08-10 14:34 ` [PATCH yew-widget-toolkit 2/4] touch: navigation rail: move auto layout from AdaptiveScaffold Dominik Csapak
2026-08-10 14:34 ` [PATCH yew-widget-toolkit 3/4] touch: navigation rail: add an optional expand button Dominik Csapak
2026-08-10 14:34 ` Dominik Csapak [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260810143536.31163-5-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=yew-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.