[yew-devel] [PATCH yew-widget-toolkit 05/11] touch: material app: allow pass through of page animation style

Shannon Sterz s.sterz at proxmox.com
Fri Jun 27 16:40:10 CEST 2025


On Fri Jun 27, 2025 at 4:32 PM CEST, Dietmar Maurer wrote:
>
>> 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?
>
> I guess we want to be able to set it to None (no animation)...

but the code that uses this property below calls `unwrap_or` with
`PageAnimationStyle::Push`. this means setting `None` here would still
result in the `Push` animation style (or for that matter, not specifying
an animation style at all).

so yeah if that's the desired behavior, then the `unwrap_or` here:

>>> +            .with_child(
>>> +                PageStack::new(page_stack)
>>> +                    .animation_style(props.page_animation.unwrap_or(PageAnimationStyle::Push)),
>>> +            )
>>>

would need to be removed.

ps: sorry resend this one as the list got dropped previously





More information about the yew-devel mailing list