From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Dietmar Maurer <dietmar@proxmox.com>,
Yew framework devel list at Proxmox <yew-devel@lists.proxmox.com>
Subject: Re: [yew-devel] [RFC yew-comp] refactor: move LoadableComponent state into component implementations
Date: Wed, 10 Dec 2025 10:32:44 +0100 [thread overview]
Message-ID: <353d830c-3872-4559-98d6-f6f7de8fa9de@proxmox.com> (raw)
In-Reply-To: <50dcf248-e5c0-4ecc-bc95-2ec0ae8a4690@proxmox.com>
Am 10.12.25 um 10:23 schrieb Dietmar Maurer:
>
> On 12/10/25 8:53 AM, Thomas Lamprecht wrote:
>> Spotted another typo, and while checking that I found a parameter name a bit
>>
>>
>> Am 09.12.25 um 15:36 schrieb Dietmar Maurer:
>>> +pub struct LoadableComponentState<V: PartialEq> {
>>> + loading: usize,
>>> + last_load_error: Option<String>,
>>> + repeat_timespan: u32, /* 0 => no repeated loading */
>> nit: repeat is IMO a bit generic for what this is used for and reads a tiny bit
>> awkwardly to me as I do not recognize that as widely used term for these thing.
>> Using timespan for interval or polling period feels also slightly odd.
>>
>> You could use "reload_interval", that's apt, telling and fits to the reload_timeout
>> below. Adapting the repeated_load function to reload_interval (or set_reload_interval)
>> would make it also a bit more telling IMO, as is, it's not as clear as it could be
>> that this is a period for anybody not used to the code.
>
> Maybe we can defer that renaming after the structural changes got in?
Sure, just thought it might be less churn now if you touch that much
code anyway already it might not be that much extra work, but having it
as separate change might indeed be nicer, so fine by me.
> Anyways, I will send a v2 including the typo fixes.
>
> Also, Dominik found a way to avoid send_custom_message() and custom_callback(),
> simply by implementing:
>
>
> impl<M, V: PartialEq> From<M> for Msg<M, V> {
> fn from(value: M) -> Self {
> Msg::ChildMessage(value)
> }
> }
great, that's better!
_______________________________________________
yew-devel mailing list
yew-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/yew-devel
prev parent reply other threads:[~2025-12-10 9:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-09 13:11 Dietmar Maurer
2025-12-09 18:31 ` Thomas Lamprecht
2025-12-10 7:53 ` Thomas Lamprecht
2025-12-10 9:23 ` Dietmar Maurer
2025-12-10 9:32 ` Thomas Lamprecht [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=353d830c-3872-4559-98d6-f6f7de8fa9de@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=dietmar@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox