public inbox for pdm-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Lukas Wagner" <l.wagner@proxmox.com>
To: "Dominik Csapak" <d.csapak@proxmox.com>, <pdm-devel@lists.proxmox.com>
Subject: Re: [RFC PATCH datacenter-manager 2/2] ui: pve: load and use tag style overrides for resource tree
Date: Mon, 31 Aug 2026 14:18:04 +0200	[thread overview]
Message-ID: <DL34FUXGSS8H.2COYKTPCXL29F@proxmox.com> (raw)
In-Reply-To: <20260417141237.2004866-2-d.csapak@proxmox.com>

On Fri Apr 17, 2026 at 4:10 PM CEST, Dominik Csapak wrote:
> This loads the tag style overrides (currently only the color), from
> /cluster/options once per remote when the remotes panel is opened,
> and uses the color-map to change the appearance of the tags.
>
> Since the /cluster/options return value is just a `Value` currently,
> introduce our own `TagStyle` and `DataCenterOptions` struct for parsing.
> (This can be dropped when we update the return schema and types in
> pve-manager and redo the return type in the pdm api)
>
> These will be converted into a `TagStyleOverride` struct that contains
> the necessary infos and interfaces and can be cloned cheaply (as it uses
> an Rc for the internal HashMap) so that we can easily move this around
> in the code, e.g. into closures and callbacks.
>
> The only downside to this is, that the global tree (e.g. in the search
> bar or a view) does not have these overrides and the tags can be
> different.

I think having a consistent style for tags would be quite important; to
me, the style really is part of the 'identity' of the tag.

In my opinion, either the entire PDM UI should properly respects the
overrides that were configured in PVE, or not at all. Having two visual
styles for the same tag is really not great, I think.

That raises the overall question about tag 'identity'. Should PDM
consider two tags with the same name (e.g. 'debian') from two remotes as
the same? I would argue strongly argue in favor of that, and I'd also
say that they should have the same style then.

So, as a conclusion, I believe that tag style overrides should not be
per-remote, but 'global' to PDM, applying to all remotes. To make this
nicer for users, we could

  - allow importing existing overrides from PVE remotes (with the option
    to decide what happens if any imported style would override an
    existing definition)
  - allow applying configured overrides to remotes


What do you think?


>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> Not sure if we want to use the per remote color/style overrides in PDM
> at all, so I only included the color for now and sent as RFC. If we want
> to include the style, sorting, etc. it should be easy to include.
>
> If we want this, I'd also go and fix the return types in pve-manager,
> and update pve-api-types of course. Until then we could leave this in as
> a stopgap.
>

Btw, this patch does not apply any more.

Thanks!




  parent reply	other threads:[~2026-08-31 12:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-17 14:10 [RFC PATCH datacenter-manager 1/2] lib: pdm-client: add method for /cluster/options Dominik Csapak
2026-04-17 14:10 ` [RFC PATCH datacenter-manager 2/2] ui: pve: load and use tag style overrides for resource tree Dominik Csapak
2026-08-31  9:26   ` Dominik Csapak
2026-08-31 12:18   ` Lukas Wagner [this message]
2026-08-31 12:41     ` 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=DL34FUXGSS8H.2COYKTPCXL29F@proxmox.com \
    --to=l.wagner@proxmox.com \
    --cc=d.csapak@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal