public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Lukas Wagner <l.wagner@proxmox.com>
To: "Michael Köppl" <m.koeppl@proxmox.com>,
	"Proxmox VE development discussion" <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH manager 2/2] ui: one-shot backup: remove 'auto' notification mode for clarity
Date: Tue, 17 Jun 2025 10:26:03 +0200	[thread overview]
Message-ID: <746cf72f-1c55-4f26-9c39-b752d3c323a7@proxmox.com> (raw)
In-Reply-To: <a3815adc-d186-4ba1-b2cb-5a1344aebd93@proxmox.com>

Thanks for testing and the review!

On  2025-06-13 15:51, Michael Köppl wrote:
>> --- a/www/manager6/window/Backup.js
>> +++ b/www/manager6/window/Backup.js
>> @@ -33,22 +33,22 @@ Ext.define('PVE.window.Backup', {
>>  	let mailtoField = Ext.create('Ext.form.field.Text', {
>>  	    fieldLabel: gettext('Send email to'),
>>  	    name: 'mailto',
>> +	    hidden: true,
>>  	    emptyText: Proxmox.Utils.noneText,
>>  	});
>>  
>>  	let notificationModeSelector = Ext.create({
>>  	    xtype: 'proxmoxKVComboBox',
>>  	    comboItems: [
>> -		['auto', gettext('Auto')],
>> -		['legacy-sendmail', gettext('Email (legacy)')],
>> -		['notification-system', gettext('Notification system')],
>> +		['notification-system', gettext('Use global settings')],
>> +		['legacy-sendmail', gettext('Use sendmail')],
>>  	    ],
>> -	    fieldLabel: gettext('Notification mode'),
>> +	    fieldLabel: gettext('Notification'),
>>  	    name: 'notification-mode',
>> -	    value: 'auto',
>> +	    value: 'notification-system',
>>  	    listeners: {
>>  		change: function(field, value) {
>> -		    mailtoField.setDisabled(value === 'notification-system');
>> +		    mailtoField.setHidden(value === 'notification-system');
> 
> While this does work, I think I'd prefer it if the field is always
> visible and is enabled or disabled depending on the selection of the
> notification system. With the hidden field, UI shifts a tiny bit once it
> becomes visible (Firefox 139.0.1). Since the Backup window is not super
> cluttered, I think this additional field could always be visible, but
> that's just my two cents.
> 

In my first draft I left the field in the 'disabled' state, but later I realized that this
can become misleading in some rare cases. The fields in this dialog are pre-filled with
the values from /etc/vzdump.conf. If there is a setting for 'mailto' in this file,
this field in the UI will contain the configured email address, even if the field is
disabled (which is the case when "Use global settings" is selected).
I think some users could interpret this is a "The global settings will send to this address" -
for this reason I opted to hide the field.

Admittedly, this is somewhat of an edge case, but I think I'd prefer to keep
hiding the field. Regarding the small shift of UI elements I'll include a fix
in v2.

-- 
- Lukas



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

  reply	other threads:[~2025-06-17  8:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-11 12:59 [pve-devel] [PATCH manager 1/2] ui: backup job edit: move notification related settings to separate tab Lukas Wagner
2025-06-11 12:59 ` [pve-devel] [PATCH manager 2/2] ui: one-shot backup: remove 'auto' notification mode for clarity Lukas Wagner
2025-06-13 13:51   ` Michael Köppl
2025-06-17  8:26     ` Lukas Wagner [this message]
2025-06-13 13:51 ` [pve-devel] [PATCH manager 1/2] ui: backup job edit: move notification related settings to separate tab Michael Köppl
2025-06-17  8:56   ` Lukas Wagner
2025-06-17  8:57 ` [pve-devel] superseded: " Lukas Wagner

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=746cf72f-1c55-4f26-9c39-b752d3c323a7@proxmox.com \
    --to=l.wagner@proxmox.com \
    --cc=m.koeppl@proxmox.com \
    --cc=pve-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