[Freeipa-devel] [PATCH] 029 Page is cleared before it is visible

Petr Vobornik pvoborni at redhat.com
Tue Nov 1 12:37:48 UTC 2011


On 10/31/2011 11:38 PM, Endi Sukma Dewata wrote:
> On 10/27/2011 4:57 AM, Petr Vobornik wrote:
>> https://fedorahosted.org/freeipa/ticket/1459

> Some issues:
>
> 1. The new clear() method is called during refresh(), so the facet with
> the old data is still shown for a brief moment before it's cleared.

> The clear() should be called before show(). However, if the pkey/filter
> is unchanged (check using needs_update()) we just need to show() the
> facet, no need to clear() and refresh() again. The above logic needs to
> be fixed.

Changed.

>
> The we will need to override the needs_update() for search and
> association facets because the default one always returns true.

Done

> 2. The following code in association.js and search.js will call clear()
> if there's no old pkey/filter, is this intentional? No old pkey/filter
> means the page is just loaded, so it probably doesn't need clearing.
>
> if (!old_pkey || old_pkey[0] !== pkey[0]) {
> that.clear();
> }
>
> if (!old_filter || old_filter[0] !== filter[0]) {
> that.clear();
> }
It seems unnecessary. But probably it was intentional (don't remember) - 
IDRC if there is a widget - maybe keytab or certificate status, which 
has some default state worth cleaning. Anyway in current implementation 
this logic is part of need_update and it is a must. IMHO we should avoid 
implementing special need_cleaning method. Cleaning at first display 
doesn't do any harm and it is one less method to maintain in couple classes.
>

3) Fixed bad implementation of clear method in radio_widget.

4) Changed direct/indirect radio names in association facets - radios 
form different facets were interfering.

5) Added ID generator, using in radio_widget, same reason as #4.

6) Added clearing of header in details facet and association facets - 
refreshes of member counts were confusing.

7) Removed setting that.pkey in create method in details, association 
facet (it broke need_update, didn't found purpose).

8) Maybe we should add a refresh button to search facet. It doesn't 
reflect concurrent usage. Refresh by 2 changes of filter doesn't seem nice.


-- 
Petr Vobornik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pvoborni-0029-1-Page-is-cleared-before-it-is-visible.patch
Type: text/x-patch
Size: 16384 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20111101/c526672c/attachment.bin>


More information about the Freeipa-devel mailing list