all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: "Michael Köppl" <m.koeppl@proxmox.com>
To: "Proxmox Datacenter Manager development discussion"
	<pdm-devel@lists.proxmox.com>
Cc: "pdm-devel" <pdm-devel-bounces@lists.proxmox.com>
Subject: Re: [pdm-devel] [PATCH datacenter-manager] ui: views: also show empty view warning with empty rows
Date: Thu, 11 Dec 2025 14:40:46 +0100	[thread overview]
Message-ID: <DEVFHWFOJ9I7.15CIFXJCZRZ33@proxmox.com> (raw)
In-Reply-To: <20251211130633.2416964-1-d.csapak@proxmox.com>

Encountered this in my testing as well, so quickly checked and it works
as advertised!

Tested-by: Michael Köppl <m.koeppl@proxmox.com>

On Thu Dec 11, 2025 at 2:06 PM CET, Dominik Csapak wrote:
> by simply using `.flatten()` to count the actual number of widgets
>
> Suggested-by: Lukas Wagner <l.wagner@proxmox.com>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
>  ui/src/dashboard/view/row_view.rs | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ui/src/dashboard/view/row_view.rs b/ui/src/dashboard/view/row_view.rs
> index 6276d555..673b4627 100644
> --- a/ui/src/dashboard/view/row_view.rs
> +++ b/ui/src/dashboard/view/row_view.rs
> @@ -337,7 +337,7 @@ impl Component for RowViewComp {
>              .class(css::FlexDirection::Row)
>              .class(css::FlexWrap::Wrap);
>  
> -        if layout.is_empty() && !self.edit_mode {
> +        if layout.iter().flatten().count() == 0 && !self.edit_mode {
>              let icon = "<i class=\"fa fa-pencil\"></i>";
>              let message = tr!("The layout is empty. To add widgets, enable editing by clicking the {0} icon above.", icon);
>              let message = Html::from_html_unchecked(message.into());



_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel

  reply	other threads:[~2025-12-11 13:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-11 13:06 Dominik Csapak
2025-12-11 13:40 ` Michael Köppl [this message]
2025-12-12  8:50 ` [pdm-devel] applied: " Lukas Wagner

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=DEVFHWFOJ9I7.15CIFXJCZRZ33@proxmox.com \
    --to=m.koeppl@proxmox.com \
    --cc=pdm-devel-bounces@lists.proxmox.com \
    --cc=pdm-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