From: "Shannon Sterz" <s.sterz@proxmox.com>
To: "Yew framework devel list at Proxmox"
<yew-devel@lists.proxmox.com>,
"Dominik Csapak" <d.csapak@proxmox.com>
Subject: Re: [yew-devel] [PATCH yew-widget-toolkit 05/11] touch: material app: allow pass through of page animation style
Date: Fri, 27 Jun 2025 15:37:05 +0200 [thread overview]
Message-ID: <DAXCU3TIPXQC.FZ4UP21KOM0H@proxmox.com> (raw)
In-Reply-To: <20250627120859.3723554-12-d.csapak@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
next prev parent reply other threads:[~2025-06-27 13:37 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-27 12:08 [yew-devel] [PATCH yew-widget-toolkit/yew-widget-toolkit-assets 00/17] various touch improvements Dominik Csapak
2025-06-27 12:08 ` [yew-devel] [PATCH yew-widget-toolkit-assets 1/6] reset: remove the tap highlight color for chrome Dominik Csapak
2025-06-27 12:08 ` [yew-devel] [PATCH yew-widget-toolkit-assets 2/6] page: add more page animation styles Dominik Csapak
2025-06-27 12:08 ` [yew-devel] [PATCH yew-widget-toolkit-assets 3/6] page: animations: reverse the direction on X axis for RTL mode Dominik Csapak
2025-06-27 12:08 ` [yew-devel] [PATCH yew-widget-toolkit-assets 4/6] application bar: reduce horizontal padding Dominik Csapak
2025-06-27 12:08 ` [yew-devel] [PATCH yew-widget-toolkit-assets 5/6] application bar: reverse back arrow for rtl Dominik Csapak
2025-06-27 12:54 ` Shannon Sterz
2025-06-27 13:38 ` Dominik Csapak
2025-06-27 12:08 ` [yew-devel] [PATCH yew-widget-toolkit-assets 6/6] buttons: rework fab menu Dominik Csapak
2025-06-27 12:08 ` [yew-devel] [PATCH yew-widget-toolkit 01/11] widget: implement Image widget Dominik Csapak
2025-06-27 12:08 ` [yew-devel] [PATCH yew-widget-toolkit 02/11] widget: button: don't hardcode icons font size Dominik Csapak
2025-06-27 12:08 ` [yew-devel] [PATCH yew-widget-toolkit 03/11] touch: page stack: add more animations Dominik Csapak
2025-06-27 12:08 ` [yew-devel] [PATCH yew-widget-toolkit 04/11] touch: application bar: set custom class on back button Dominik Csapak
2025-06-27 12:08 ` [yew-devel] [PATCH yew-widget-toolkit 05/11] touch: material app: allow pass through of page animation style Dominik Csapak
2025-06-27 13:37 ` Shannon Sterz [this message]
2025-06-27 13:38 ` Dominik Csapak
2025-06-27 14:32 ` Dietmar Maurer
2025-06-27 14:40 ` Shannon Sterz
2025-06-27 12:08 ` [yew-devel] [PATCH yew-widget-toolkit 06/11] touch: scaffold: fix overflow setting for body Dominik Csapak
2025-06-27 12:08 ` [yew-devel] [PATCH yew-widget-toolkit 07/11] touch: scaffold: use direction independent positioning for the FAB Dominik Csapak
2025-06-27 12:08 ` [yew-devel] [PATCH yew-widget-toolkit 08/11] touch: fab: add size option Dominik Csapak
2025-06-27 12:08 ` [yew-devel] [PATCH yew-widget-toolkit 09/11] touch: fab: convert to widget macro Dominik Csapak
2025-06-27 12:08 ` [yew-devel] [PATCH yew-widget-toolkit 10/11] touch: fab menu: " Dominik Csapak
2025-06-27 12:08 ` [yew-devel] [PATCH yew-widget-toolkit 11/11] touch: fab menu: rework fab menu Dominik Csapak
2025-06-30 8:25 ` [yew-devel] [PATCH yew-widget-toolkit/yew-widget-toolkit-assets 00/17] various touch improvements Dominik Csapak
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=DAXCU3TIPXQC.FZ4UP21KOM0H@proxmox.com \
--to=s.sterz@proxmox.com \
--cc=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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal