From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <yew-devel-bounces@lists.proxmox.com> Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id D89DD1FF15C for <inbox@lore.proxmox.com>; Fri, 27 Jun 2025 15:37:01 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 5694D156AD; Fri, 27 Jun 2025 15:37:38 +0200 (CEST) Mime-Version: 1.0 Date: Fri, 27 Jun 2025 15:37:05 +0200 Message-Id: <DAXCU3TIPXQC.FZ4UP21KOM0H@proxmox.com> To: "Yew framework devel list at Proxmox" <yew-devel@lists.proxmox.com>, "Dominik Csapak" <d.csapak@proxmox.com> X-Mailer: aerc 0.20.1-0-g2ecb8770224a-dirty References: <20250627120859.3723554-1-d.csapak@proxmox.com> <20250627120859.3723554-12-d.csapak@proxmox.com> In-Reply-To: <20250627120859.3723554-12-d.csapak@proxmox.com> From: "Shannon Sterz" <s.sterz@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL 0.021 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [yew-devel] [PATCH yew-widget-toolkit 05/11] touch: material app: allow pass through of page animation style X-BeenThere: yew-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Yew framework devel list at Proxmox <yew-devel.lists.proxmox.com> List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/yew-devel>, <mailto:yew-devel-request@lists.proxmox.com?subject=unsubscribe> List-Archive: <http://lists.proxmox.com/pipermail/yew-devel/> List-Post: <mailto:yew-devel@lists.proxmox.com> List-Help: <mailto:yew-devel-request@lists.proxmox.com?subject=help> List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/yew-devel>, <mailto:yew-devel-request@lists.proxmox.com?subject=subscribe> Reply-To: Yew framework devel list at Proxmox <yew-devel@lists.proxmox.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: yew-devel-bounces@lists.proxmox.com Sender: "yew-devel" <yew-devel-bounces@lists.proxmox.com> On Fri Jun 27, 2025 at 2:08 PM CEST, Dominik Csapak wrote: > to the page stack. Otherwise it's impossible to set the animation style > for a material app. > > Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> > --- > src/touch/material_app.rs | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > > diff --git a/src/touch/material_app.rs b/src/touch/material_app.rs > index d9ea2a0..6d7ac54 100644 > --- a/src/touch/material_app.rs > +++ b/src/touch/material_app.rs > @@ -13,7 +13,7 @@ use pwt_macros::builder; > > use crate::prelude::*; > use crate::state::{NavigationContainer, SharedState, SharedStateObserver}; > -use crate::touch::{SnackBarController, SnackBarManager}; > +use crate::touch::{PageAnimationStyle, SnackBarController, SnackBarManager}; > use crate::widget::{Container, ThemeLoader}; > > use super::{PageStack, SideDialog, SideDialogController, SideDialogLocation}; > @@ -207,6 +207,11 @@ pub struct MaterialApp { > #[builder(IntoPropValue, into_prop_value)] > #[prop_or_default] > pub history: Option<AnyHistory>, could we implement `Default` on `PageAnimationStyle` here and remove the `Option`? that would also clean up the code below a bit. or is there a reason not to do that? > + > + /// Page animation style used when switching between pages > + #[builder(IntoPropValue, into_prop_value)] > + #[prop_or_default] > + pub page_animation: Option<PageAnimationStyle>, > } > > impl MaterialApp { > @@ -372,7 +377,10 @@ impl Component for PwtMaterialApp { > > let app = Container::new() > .class("pwt-viewport") > - .with_child(PageStack::new(page_stack)) > + .with_child( > + PageStack::new(page_stack) > + .animation_style(props.page_animation.unwrap_or(PageAnimationStyle::Push)), > + ) > .with_child( > SnackBarManager::new() > .controller(self.snackbar_controller.clone()) _______________________________________________ yew-devel mailing list yew-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/yew-devel