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 82537604A1 for ; Wed, 7 Oct 2020 13:59:27 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 6A4562E53D for ; Wed, 7 Oct 2020 13:58:57 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (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 id 8D13A2E533 for ; Wed, 7 Oct 2020 13:58:56 +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 5105945C16 for ; Wed, 7 Oct 2020 13:58:56 +0200 (CEST) To: =?UTF-8?Q?Dominic_J=c3=a4ger?= Cc: Proxmox Backup Server development discussion References: <20201006101000.70009-1-d.jaeger@proxmox.com> <169ffc35-5c08-8634-396e-7877c17acfa8@proxmox.com> <20201007095332.GA1250925@mala.proxmox.com> From: Thomas Lamprecht Message-ID: Date: Wed, 7 Oct 2020 13:58:55 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:82.0) Gecko/20100101 Thunderbird/82.0 MIME-Version: 1.0 In-Reply-To: <20201007095332.GA1250925@mala.proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL -0.145 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment NICE_REPLY_A -0.001 Looks like a legit reply (A) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust 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] Close #3058: ui: RemoteEdit: Add empty texts 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: Wed, 07 Oct 2020 11:59:27 -0000 On 07.10.20 11:53, Dominic J=C3=A4ger wrote: > Thank you for looking at it so quickly! >=20 > On Tue, Oct 06, 2020 at 12:22:03PM +0200, Thomas Lamprecht wrote: >> Thanks for trying to improve user experience, I always appreciate that= =2E >> But, we normally use emptyText for defaults, or at least make it very >> clear that they are not, if used as hint. You may want to switch those= >> over to tooltips with more complete sentences. >=20 > Seems I checked too many online guides that suggest writing examples in= to > placeholders/emptyText and too little source code. There was no need to look at the source, just use PVE's webinterface and = you see it everywhere.. Please, always try to check out the webinterface from a *user* POV and tr= y to use the rules there, before following some random UX guides online (there= are far to many, often conflicting). I do not think throwing in just a plain "192.168.10.11" IP helps anybody = more than reading the label does, could rather make one think that this only a= ccepts IPs and not DNS host names. >=20 > So far the only tooltips I have found on textfields are the "This field= is > required" from allowBlank: false. The existing tooltips are all on some= kind of > button and simply adding "tooltip: 'Test'," to a proxmoxtextfield doesn= 't do > anything? There are the ExtJS generate tooltips, like if a fields format limit (reg= ex, vtype, maximum value, ...) does not applies, but there are also quite som= e manually added ones. Some ExtJS components (e.g., buttons) provide a config "tooltip" property= , for those which don't you can use something like: autoEl: { tag: 'div', 'data-qtip': gettext('Include volume in backup job'), }, PS: we have over 30 defined tooltips in pve-manager alone, so they are fa= r from being a rare. >=20 > =3D> I stuck to your other suggestion and made more descriptive labels = with > either > - "Example: " or > - a description >=20 >=20 >> On 06.10.20 12:10, Dominic J=C3=A4ger wrote: >>> Signed-off-by: Dominic J=C3=A4ger >>> --- >>> www/window/RemoteEdit.js | 7 ++++++- >>> 1 file changed, 6 insertions(+), 1 deletion(-) >>> >>> diff --git a/www/window/RemoteEdit.js b/www/window/RemoteEdit.js >>> index 56a248e0..695ad422 100644 >>> --- a/www/window/RemoteEdit.js >>> +++ b/www/window/RemoteEdit.js >>> @@ -24,7 +24,7 @@ Ext.define('PBS.window.RemoteEdit', { >>> me.method =3D name ? 'PUT' : 'POST'; >>> me.autoLoad =3D !!name; >>> return { >>> - passwordEmptyText: me.isCreate ? '' : gettext('Unchanged'), >>> + passwordEmptyText: me.isCreate ? '=E2=80=A2'.repeat(16) : gette= xt('Unchanged'), >>> }; >>> }, >>> =20 >>> @@ -35,6 +35,7 @@ Ext.define('PBS.window.RemoteEdit', { >>> xtype: 'pmxDisplayEditField', >>> name: 'name', >>> fieldLabel: gettext('Remote'), >>> + emptyText: 'new_remote', >> >> Suggests that this is the default, makes no sense IMO. >> >> maybe add a "The unique ID for this remote" as tooltip and/or >> change the fieldLabel to 'ID' instead. > Changed the label and added "Example:". I think having some example her= e makes > sense to show that a single word/string is required and signs like unde= rscores > are allowed. we never do that for user chosen IDs. Think of it that way: If you'd have a form for registering a newborn baby, wouldn't it be weird= if there's a "Name: For example, Bobby" field? >=20 >> >>> renderer: Ext.htmlEncode, >>> allowBlank: false, >>> minLength: 4, >>> @@ -49,6 +50,7 @@ Ext.define('PBS.window.RemoteEdit', { >>> submitValue: false, >>> vtype: 'HostPort', >>> fieldLabel: gettext('Host'), >>> + emptyText: '192.168.10.10', >> >> This suggests we use that IP as default, rather use a descriptive hint= =2E >> If it's long, then it could be also added as tooltip instead, which jo= b >> is to explain context better. >> >> >> Could also change fieldLabel to 'Remote Address' > Changed the label and added "Example:". Not sure about adding the port = number as > it's optional. That's why a tooltip can be much more helpful, as there you can say that = one can add an optional port. >> >>> listeners: { >>> change: function(field, newvalue) { >>> let host =3D newvalue; >>> @@ -95,6 +97,7 @@ Ext.define('PBS.window.RemoteEdit', { >>> allowBlank: false, >>> name: 'userid', >>> fieldLabel: gettext('Userid'), >>> + emptyText: 'root@pam', >> >> Is this the default?=20 > Explicitly specifying the user ID is required by GUI and CLI >=20 > ~ proxmox-backup-manager remote create test --host 1.1.1.1 --password = test > Error: parameter verification errors >=20 > parameter 'userid': parameter is missing and it is not optional. >=20 >=20 FYI: That was a rhetoric question, as you using the emptyLabel like that suggests it is.