Re: [Freeipa-devel] [PATCH] 697-702 webui: usability improvements in attribute widget

2014-07-21 Thread Petr Vobornik

On 18.7.2014 00:06, Endi Sukma Dewata wrote:

On 7/10/2014 8:02 AM, Petr Vobornik wrote:

ACK. Comments below:


== [PATCH] 699 webui: optimize (re)creation of option widget ==

There is a case where attributes widget can contain > 1000 items.
It's about 3000 nodes. It's slow in jQuery. Simple move to dojo
speeds it up (is closer to native calls) while maintaining developer
friendliness.

Now the biggest lag is in browser's render. It's probably not worth
developer time to optimize that.


Is it common to have many items in this widget (doesn't have to be
bigger than 1000, but just large enough)? Maybe the UI should provide
some kind of paging interface, not just for performance reason, but also
for usability.


It's not common, it's only in one case and therefore IMO we don't have 
to spend more time on this issue.


WRT paging: IMHO the classic one won't help, but 'infinite scroll 
paging' might. I would rather see this type of paging on search facets 
first.





== [PATCH] 700 webui: custom attr in attributes widget ==

Web UI doesn't always know what are the possible attributes
for target object. This will allow to add custom attributes
if necessary.


Right now you can add an undefined attribute, but it will fail when you
try to save it. Should the UI perform a schema validation before
accepting the new attribute? Or should the UI provide a list of valid
attributes?



If we knew the list of valid attrs/schema we would not need this patch.



pushed to:

master:
* b68f819de75073285c17c28a30afe5b5dbfe5176 webui: improve usability of 
attributes widget
* 740d42257fc00235b1cebdc90866fe34bf9464b3 webui: add filter to 
attributes widget
* 9fa447cb6e5f1476072cf167eec8502cfc3e38e3 webui: optimize (re)creation 
of option widget
* 4aefc0d6fe7a4879a9b8024eb7424b4dfa5fa7ca webui: custom attr in 
attributes widget
* d2f2fc5addc0634b24ccda7a5aae1ed1d3c6001a webui: attr widget: get list 
of possible attrs from ipapermdefaultattr
* 8fcf6d6b34400c1924f509701856b86e4f647624 webui: option_widget_base: 
sort options

ipa-4-1:
* b68f819de75073285c17c28a30afe5b5dbfe5176 webui: improve usability of 
attributes widget
* 740d42257fc00235b1cebdc90866fe34bf9464b3 webui: add filter to 
attributes widget
* 9fa447cb6e5f1476072cf167eec8502cfc3e38e3 webui: optimize (re)creation 
of option widget
* 4aefc0d6fe7a4879a9b8024eb7424b4dfa5fa7ca webui: custom attr in 
attributes widget
* d2f2fc5addc0634b24ccda7a5aae1ed1d3c6001a webui: attr widget: get list 
of possible attrs from ipapermdefaultattr
* 8fcf6d6b34400c1924f509701856b86e4f647624 webui: option_widget_base: 
sort options

ipa-4-0:
* b68f819de75073285c17c28a30afe5b5dbfe5176 webui: improve usability of 
attributes widget
* 740d42257fc00235b1cebdc90866fe34bf9464b3 webui: add filter to 
attributes widget
* 9fa447cb6e5f1476072cf167eec8502cfc3e38e3 webui: optimize (re)creation 
of option widget
* 4aefc0d6fe7a4879a9b8024eb7424b4dfa5fa7ca webui: custom attr in 
attributes widget
* d2f2fc5addc0634b24ccda7a5aae1ed1d3c6001a webui: attr widget: get list 
of possible attrs from ipapermdefaultattr
* 8fcf6d6b34400c1924f509701856b86e4f647624 webui: option_widget_base: 
sort options



--
Petr Vobornik

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] 697-702 webui: usability improvements in attribute widget

2014-07-17 Thread Endi Sukma Dewata

On 7/10/2014 8:02 AM, Petr Vobornik wrote:

ACK. Comments below:


== [PATCH] 699 webui: optimize (re)creation of option widget ==

There is a case where attributes widget can contain > 1000 items.
It's about 3000 nodes. It's slow in jQuery. Simple move to dojo
speeds it up (is closer to native calls) while maintaining developer
friendliness.

Now the biggest lag is in browser's render. It's probably not worth
developer time to optimize that.


Is it common to have many items in this widget (doesn't have to be 
bigger than 1000, but just large enough)? Maybe the UI should provide 
some kind of paging interface, not just for performance reason, but also 
for usability.



== [PATCH] 700 webui: custom attr in attributes widget ==

Web UI doesn't always know what are the possible attributes
for target object. This will allow to add custom attributes
if necessary.


Right now you can add an undefined attribute, but it will fail when you 
try to save it. Should the UI perform a schema validation before 
accepting the new attribute? Or should the UI provide a list of valid 
attributes?


--
Endi S. Dewata

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] 697-702 webui: usability improvements in attribute widget

2014-07-10 Thread Petr Vobornik

There is an issue in patch #701, new version attached.

On 10.7.2014 14:29, Petr Vobornik wrote:

ticket: https://fedorahosted.org/freeipa/ticket/4253

== [PATCH] 697 webui: improve usability of attributes widget ==

Attributes widget layour was changed from tiny table which allowed
to display only few options to a checkbox list with multiple
columns (depends on container).

Check all attributes option was removed to force the user
to read through the attributes which he selects.

Initial version authored by: Adam Misnyovszki


== [PATCH] 698 webui: add filter to attributes widget ==

Adds filter field to attribute box in permissions for better user
experience. User can then quickly find the desired attribute.

Initial version of the patch authored by: Adam Misnyovszki


== [PATCH] 699 webui: optimize (re)creation of option widget ==

There is a case where attributes widget can contain > 1000 items.
It's about 3000 nodes. It's slow in jQuery. Simple move to dojo
speeds it up (is closer to native calls) while maintaining developer
friendliness.

Now the biggest lag is in browser's render. It's probably not worth
developer time to optimize that.


== [PATCH] 700 webui: custom attr in attributes widget ==

Web UI doesn't always know what are the possible attributes
for target object. This will allow to add custom attributes
if necessary.

== [PATCH] 701 webui: attr widget: get list of possible attrs from
ipapermdefaultattr ==

Very useful for managed permissions since the list of attrs in metadata
might be smaller that default attributes. This smooths behavior if one
removes an attr from effective attrs which is not in metadata. Without
this it will disappear from the list and one has to add it manually
through 'Add'.


[PATCH] 702 webui: option_widget_base: sort options


--
Petr Vobornik
From 8f2adbe422a24639f7d6bee83f7b198c15bf9497 Mon Sep 17 00:00:00 2001
From: Petr Vobornik 
Date: Wed, 9 Jul 2014 16:49:46 +0200
Subject: [PATCH] webui: attr widget: get list of possible attrs from
 ipapermdefaultattr

Very useful for managed permissions since the list of attrs in metadata
might be smaller that default attributes. This smooths behavior if one
removes an attr from effective attrs which is not in metadata. Without
this it will disappear from the list and one has to add it manually
through 'Add'.

https://fedorahosted.org/freeipa/ticket/4253
---
 install/ui/src/freeipa/aci.js | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/install/ui/src/freeipa/aci.js b/install/ui/src/freeipa/aci.js
index 4cf93c9b15c5361c8162e17a4b8cb7b28c604490..d4eb0febef59c41e66f833f8b0d8464cbc97c3fc 100644
--- a/install/ui/src/freeipa/aci.js
+++ b/install/ui/src/freeipa/aci.js
@@ -898,6 +898,16 @@ aci.permission_target_policy = function (spec) {
 var attribute_table = that.permission_target.widgets.get_widget('attrs');
 var skip_unmatched_org = attribute_table.skip_unmatched;
 attribute_table.object_type = type;
+
+// UI doesn't always know what are the possible attributes.
+// In case of managed permissions, one of the possible lists is in ipapermdefaultattr.
+var default_attrs = that.container.fields.get_field('ipapermdefaultattr');
+if (default_attrs && default_attrs.enabled) { // if managed permission
+attribute_table.custom_options = default_attrs.get_value();
+} else {
+attribute_table.custom_options = [];
+}
+
 // skip values which don't belong to new type. Bug #2617
 attribute_table.skip_unmatched =  skip_unmatched || skip_unmatched_org;
 attribute_field.reset();
-- 
1.9.3

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel