public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* Re: [pve-devel] [PATCH v3 widget-toolkit 1/2] repo view: replace non-clickable checkbox with icons
@ 2023-01-27 11:09 Dominik Csapak
  2023-01-27 11:16 ` Lukas Wagner
  0 siblings, 1 reply; 3+ messages in thread
From: Dominik Csapak @ 2023-01-27 11:09 UTC (permalink / raw)
  To: pve-devel

On 1/26/23 11:47, Lukas Wagner wrote:
>  From a usability view, having a checkbox that is not clickable is pretty
> misleading, especially if the visual style is exactly the same as in
> other places in the UI where the checkbox is functional.
> 
> Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
> ---
>   src/Utils.js                | 2 ++
>   src/node/APTRepositories.js | 6 ++----
>   2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/src/Utils.js b/src/Utils.js
> index ef0c2b8..a6dd314 100644
> --- a/src/Utils.js
> +++ b/src/Utils.js
> @@ -100,6 +100,8 @@ utilities: {
>   	return value;
>       },
>   
> +    renderEnabledIcon: enabled => `<i class="fa fa-${enabled ? 'check' : 'minus'}"></i>`,
> +

i know i'm a bit late to the party, but couldn't we simply show nothing when a repo is not enabled?
it's greyed-out anyway (though i'm not opposed to using the 'minus' icon here either)





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [pve-devel] [PATCH v3 widget-toolkit 1/2] repo view: replace non-clickable checkbox with icons
  2023-01-27 11:09 [pve-devel] [PATCH v3 widget-toolkit 1/2] repo view: replace non-clickable checkbox with icons Dominik Csapak
@ 2023-01-27 11:16 ` Lukas Wagner
  0 siblings, 0 replies; 3+ messages in thread
From: Lukas Wagner @ 2023-01-27 11:16 UTC (permalink / raw)
  To: Proxmox VE development discussion, Dominik Csapak

Thank you for your input!

On 1/27/23 12:09, Dominik Csapak wrote:
> i know i'm a bit late to the party, but couldn't we simply show nothing when a repo is not enabled?
> it's greyed-out anyway (though i'm not opposed to using the 'minus' icon here either)
> 

I have considered this option as well. IMO having the minus makes lists a bit clearer where all entities are disabled - for repos, this is probably never the case, but it could be for Backup/Replication jobs. It's just my preference though, I have no hard feelings about it.

-- 
- Lukas




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [pve-devel] [PATCH v3 widget-toolkit 1/2] repo view: replace non-clickable checkbox with icons
  2023-01-26 10:47 [pve-devel] [PATCH v3 manager/widget-toolkit 0/2] ui: replace non-clickable checkboxes " Lukas Wagner
@ 2023-01-26 10:47 ` Lukas Wagner
  0 siblings, 0 replies; 3+ messages in thread
From: Lukas Wagner @ 2023-01-26 10:47 UTC (permalink / raw)
  To: pve-devel

From a usability view, having a checkbox that is not clickable is pretty
misleading, especially if the visual style is exactly the same as in
other places in the UI where the checkbox is functional.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
---
 src/Utils.js                | 2 ++
 src/node/APTRepositories.js | 6 ++----
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/Utils.js b/src/Utils.js
index ef0c2b8..a6dd314 100644
--- a/src/Utils.js
+++ b/src/Utils.js
@@ -100,6 +100,8 @@ utilities: {
 	return value;
     },
 
+    renderEnabledIcon: enabled => `<i class="fa fa-${enabled ? 'check' : 'minus'}"></i>`,
+
     language_array: function() {
 	let data = [['__default__', Proxmox.Utils.render_language('')]];
 	Ext.Object.each(Proxmox.Utils.language_map, function(key, value) {
diff --git a/src/node/APTRepositories.js b/src/node/APTRepositories.js
index ce8f718..1fb627c 100644
--- a/src/node/APTRepositories.js
+++ b/src/node/APTRepositories.js
@@ -239,12 +239,10 @@ Ext.define('Proxmox.node.APTRepositoriesGrid', {
 
     columns: [
 	{
-	    xtype: 'checkcolumn',
 	    header: gettext('Enabled'),
 	    dataIndex: 'Enabled',
-	    listeners: {
-		beforecheckchange: () => false, // veto, we don't want to allow inline change - to subtle
-	    },
+	    align: 'center',
+	    renderer: Proxmox.Utils.renderEnabledIcon,
 	    width: 90,
 	},
 	{
-- 
2.30.2





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-01-27 11:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-27 11:09 [pve-devel] [PATCH v3 widget-toolkit 1/2] repo view: replace non-clickable checkbox with icons Dominik Csapak
2023-01-27 11:16 ` Lukas Wagner
  -- strict thread matches above, loose matches on Subject: below --
2023-01-26 10:47 [pve-devel] [PATCH v3 manager/widget-toolkit 0/2] ui: replace non-clickable checkboxes " Lukas Wagner
2023-01-26 10:47 ` [pve-devel] [PATCH v3 widget-toolkit 1/2] repo view: replace non-clickable checkbox " Lukas Wagner

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