From mboxrd@z Thu Jan 1 00:00:00 1970
Return-Path:
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits))
(No client certificate requested)
by lists.proxmox.com (Postfix) with ESMTPS id F17CF91679
for ; Tue, 3 Oct 2023 14:37:02 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
by firstgate.proxmox.com (Proxmox) with ESMTP id D51071DEB
for ; Tue, 3 Oct 2023 14:37:02 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
[94.136.29.106])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits))
(No client certificate requested)
by firstgate.proxmox.com (Proxmox) with ESMTPS
for ; Tue, 3 Oct 2023 14:37:01 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 4DF41447C2
for ; Tue, 3 Oct 2023 14:37:01 +0200 (CEST)
Message-ID:
Date: Tue, 3 Oct 2023 14:37:00 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Content-Language: en-US
To: Dominik Csapak ,
Proxmox Backup Server development discussion
References: <20231002152318.680675-1-p.hufnagl@proxmox.com>
<8d9d294e-3d81-4935-a91d-cedc9a7395b3@proxmox.com>
From: Philipp Hufnagl
In-Reply-To: <8d9d294e-3d81-4935-a91d-cedc9a7395b3@proxmox.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-SPAM-LEVEL: Spam detection results: 0
AWL 0.461 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
NICE_REPLY_A -1.09 Looks like a legit reply (A)
SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record
SPF_PASS -0.001 SPF: sender matches SPF record
Subject: Re: [pbs-devel] [PATCH proxmox-backup v4] ui: fix #4260: add
dynamic notes in backup group comment
X-BeenThere: pbs-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox Backup Server development discussion
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
X-List-Received-Date: Tue, 03 Oct 2023 12:37:03 -0000
On 10/3/23 12:34, Dominik Csapak wrote:
> so two comments still (sorry for not catching earlier)
> hope these are the last issues i see ;)
>
> On 10/2/23 17:23, Philipp Hufnagl wrote:
>> When there is no comment for a backup group, the comment of the last
>> snapshot in this group will be shown slightly grayed out as long as
>> the group is collapsed.
>>
>> Changes since v1:
>> * fixed typo at "additonal classes"
>> * renamed css class to "faded" so it can be used more generic
>> * guarded snapshot comment for not being a string guarded snapshot
>>
>> Changes since v2:
>> * fixed variable name in violation of coding guidelines
>> Signed-off-by: Philipp Hufnagl
>>
>> Changes since v3:
>> * fixed intentation
>> * removed span prefix from faded class
>>
>
> please put the changelog below under the '---' else it shows up in the
> commit message in git (which we don't need and want)
>
>> ---
>> www/css/ext6-pbs.css | 3 +++
>> www/datastore/Content.js | 17 ++++++++++++++---
>> 2 files changed, 17 insertions(+), 3 deletions(-)
>>
>> diff --git a/www/css/ext6-pbs.css b/www/css/ext6-pbs.css
>> index 5fd65d25..bb239e95 100644
>> --- a/www/css/ext6-pbs.css
>> +++ b/www/css/ext6-pbs.css
>> @@ -226,6 +226,9 @@ span.snapshot-comment-column {
>> display: inline-block;
>> width: calc(100% - 18px);
>> }
>> +pmx-faded {
>> + opacity: 0.7;
>> +}
>
> two things here: this too could not have worked again, because
> you did not define a class here, those are done like this:
>
> ---
> .pmx-faded { }
> ---
>
> note the '.' before the classname
>
> i know sometimes testing can be weird, especially frontend stuff,
> but this should have been obvious that the text is not a lower
> opacity (if the different is not obvious, then maybe the value
> is too high or we need a different way to discern these)
>
> it's *really* important that you test your own patches properly,
> that way you can catch issues yourself before even sending them to the
> list,
> which decreases the used time from your colleagues that test/review and
> increases the chance that the feedback is valuable
>
> also, please leave an empty line between classes in css (so before
> .pmx-faded)
>
>> .x-action-col-icon.good:before {
>> color: #21BF4B;
>> diff --git a/www/datastore/Content.js b/www/datastore/Content.js
>> index 9fc07d49..740d10bf 100644
>> --- a/www/datastore/Content.js
>> +++ b/www/datastore/Content.js
>> @@ -146,6 +146,7 @@ Ext.define('PBS.DataStoreContent', {
>> leaf: false,
>> iconCls: "fa " + cls,
>> expanded: false,
>> + comment: item.data.comment,
>> backup_type: item.data["backup-type"],
>> backup_id: item.data["backup-id"],
>> children: [],
>> @@ -287,6 +288,7 @@ Ext.define('PBS.DataStoreContent', {
>> if (item["backup-time"] > last_backup && item.size !==
>> null) {
>> last_backup = item["backup-time"];
>> group["backup-time"] = last_backup;
>> + group["last-comment"] = item.comment;
>> group.files = item.files;
>> group.size = item.size;
>> group.owner = item.owner;
>> @@ -903,13 +905,22 @@ Ext.define('PBS.DataStoreContent', {
>> if (!data || data.leaf || data.root) {
>> return '';
>> }
>> - if (v === undefined || v === null) {
>> - v = '';
>> +
>> + let additionalClasses = "";
>> + // when there is no group comment and the section is
>> collapsed,
>> + // display the most recent snapshot comment
>> + if (v === undefined || v === null|| v === '') {
>> + if (data.expanded === false) {
>> + v = data['last-comment'] ?? '';
>> + additionalClasses = "pmx-faded";
>> + } else {
>> + v = '';
>> + }
>> }
>> v = Ext.String.htmlEncode(v);
>> let icon = 'x-action-col-icon fa fa-fw fa-pencil pointer';
>> - return `${v}
>> + return `${v}
>> `;
>> },
>> listeners: {
>
>
I talked with Dominik of list. It seems like I did not reset the
browser cache before. Im really sorry about this