[pve-devel] [PATCH manager v2 1/1] ui: implement 'Tag View' for the resource tree

Fiona Ebner f.ebner at proxmox.com
Fri Feb 16 15:42:18 CET 2024


Am 21.11.23 um 13:47 schrieb Dominik Csapak:
> and keep the functionality in ResourceTree as generic as possible.
> 
> We achieve this by having an 'itemMap' function that can split one item
> from the store into multiple to add to the tree.
> 
> for the updates, we have to have an 'idMapFn' (to get the original id
> back)
> 
> we also have to modify how the move checks work a bit, since we only
> want to move the items when the tags changed only in the tagview case
> 
> in the ResourceGrid we have to get the id a bit differently since we now
> have 'virtual' ids for the entries tag contain the tag (which can't be
> found in the resource store)
> 
> since we also don't want tooltips for the already expanded tag groups,
> we have to add the special condition that the element directly above
> the tag should not have the 'full' class (like it is in tag group case)
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>

No real issues found during testing, but there is one thing that bugs
me: if I have selected a guest either:
- without tags and add a tag
or
- within the current tag group and remove that tag
then the selections for the guest is lost. Since it's the selection in
the resource view, this also affects the main area as a consequence and
feels a bit disruptive.

> @@ -530,7 +531,7 @@ Ext.define('PVE.StdWorkspace', {
>  	let tagSelectors = [];
>  	['circle', 'dense'].forEach((style) => {
>  	    ['dark', 'light'].forEach((variant) => {
> -		tagSelectors.push(`.proxmox-tags-${style} .proxmox-tag-${variant}`);
> +		tagSelectors.push(`.proxmox-tags-${style} :not(.proxmox-tags-full) > .proxmox-tag-${variant}`);

eslint fails because the line is too long

>  	    });
>  	});
>  




More information about the pve-devel mailing list