From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 719791FF14C for ; Fri, 29 May 2026 09:38:34 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 4A07D34B6; Fri, 29 May 2026 09:38:32 +0200 (CEST) Message-ID: Date: Fri, 29 May 2026 09:37:58 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH pve-manager v2] fix #6348: ui: bulk action: use options tag style To: Erik Fastermann , pve-devel@lists.proxmox.com References: <20260515120827.141764-1-e.fastermann@proxmox.com> Content-Language: en-US From: Dominik Csapak In-Reply-To: <20260515120827.141764-1-e.fastermann@proxmox.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1780040249359 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.049 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: YUZU3FTELKDVAPSD53XJDFBAFIXK5VKZ X-Message-ID-Hash: YUZU3FTELKDVAPSD53XJDFBAFIXK5VKZ X-MailFrom: d.csapak@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: looks fine code wise, but one thing that is not good IMO is that if I select 'None' for the shape, the tags won't be shown too here. I'd say that in the bulk action grids we always want to show them in the tags column, so we should exclude the 'None' style from there. Maybe adding a filter or option to tagStyleClass could do that. On 5/15/26 2:08 PM, Erik Fastermann wrote: > Use the tag style configured in the options for the bulk action table. > This improves visual consistency and makes tagged resources easier to > identify at a glance. > > Signed-off-by: Erik Fastermann > --- > > changes since v1: > * use the tag style configured in the options menu > > www/manager6/UIOptions.js | 14 +++++++++++--- > www/manager6/dc/OptionView.js | 4 ++-- > www/manager6/form/VMSelector.js | 2 ++ > 3 files changed, 15 insertions(+), 5 deletions(-) > > diff --git a/www/manager6/UIOptions.js b/www/manager6/UIOptions.js > index 99b999b7..7f9583c2 100644 > --- a/www/manager6/UIOptions.js > +++ b/www/manager6/UIOptions.js > @@ -60,12 +60,20 @@ Ext.define('PVE.UIOptions', { > let overrides = style?.['color-map']; > PVE.UIOptions.updateTagOverrides(PVE.UIOptions.parseTagOverrides(overrides ?? '')); > > + const tagStyle = PVE.UIOptions.tagStyleClass(style); > + > + Ext.ComponentQuery.query('pveResourceTree')[0].setUserCls(tagStyle); > + Ext.ComponentQuery.query('vmselector').forEach(component => { > + component.setUserCls(tagStyle); > + }); > + }, > + > + tagStyleClass: function (style) { > let shape = style?.shape ?? 'circle'; > if (shape === '__default__') { > - style = 'circle'; > + shape = 'circle'; > } > - > - Ext.ComponentQuery.query('pveResourceTree')[0].setUserCls(`proxmox-tags-${shape}`); > + return `proxmox-tags-${shape}`; > }, > > tagTreeStyles: { > diff --git a/www/manager6/dc/OptionView.js b/www/manager6/dc/OptionView.js > index 7c8d3792..a19ba136 100644 > --- a/www/manager6/dc/OptionView.js > +++ b/www/manager6/dc/OptionView.js > @@ -393,7 +393,7 @@ Ext.define('PVE.dc.OptionView', { > let colors = PVE.UIOptions.parseTagOverrides(value?.['color-map']); > let shape = value.shape; > let shapeText = PVE.UIOptions.tagTreeStyles[shape ?? '__default__']; > - let txt = Ext.String.format(gettext('Tree Shape: {0}'), shapeText); > + let txt = Ext.String.format(gettext('Shape: {0}'), shapeText); > let orderText = PVE.UIOptions.tagOrderOptions[value.ordering ?? '__default__']; > txt += `, ${Ext.String.format(gettext('Ordering: {0}'), orderText)}`; > if (value['case-sensitive']) { > @@ -457,7 +457,7 @@ Ext.define('PVE.dc.OptionView', { > { > name: 'shape', > xtype: 'proxmoxComboGrid', > - fieldLabel: gettext('Tree Shape'), > + fieldLabel: gettext('Shape'), > valueField: 'value', > displayField: 'display', > allowBlank: false, > diff --git a/www/manager6/form/VMSelector.js b/www/manager6/form/VMSelector.js > index 57aa73a7..f45c4db1 100644 > --- a/www/manager6/form/VMSelector.js > +++ b/www/manager6/form/VMSelector.js > @@ -267,6 +267,8 @@ Ext.define('PVE.form.VMSelector', { > me.getSelectionModel().selectAll(false); > }); > } > + > + me.userCls = PVE.UIOptions.tagStyleClass(PVE.UIOptions.options['tag-style']); > }, > }); >