[Freeipa-devel] [PATCH] 052 Better displaying of long names in tables and facet headers

Petr Vobornik pvoborni at redhat.com
Fri Dec 9 13:29:08 UTC 2011


On 12/09/2011 08:17 AM, Endi Sukma Dewata wrote:
> On 12/8/2011 8:31 AM, Petr Vobornik wrote:
>> https://fedorahosted.org/freeipa/ticket/1890
>
> This is an improvement, so it's ACKed. There are some other issues, they
> can be done separately:

Pushed to master.

Attaching new patch which addresses following issues:

> 1. Create an HBAC service with a very long name. Open an HBAC rule, add
> the service, it will widen the table. Same problem with sudo rule.
>
The table wasn't set as 'scrollable'. I didn't find a reason why cell 
width calculation should be different for scrollable and 'normal', so I 
unified it and it fixes the problem.

> 2. Open the HBAC service you created in #1, the facet header is too long
> it messes up the tabs. The service name here should be trimmed as well.

The pkey in facet group header is now limited to 20 chars. It would be 
probably good enough for normal names. It may overlap with with next 
facet group if current facet group has 1 facet with short name, but I 
think it isn't a problem now.

> 3. Delete the HBAC service you created in #1 from command line. Reload
> the page in #2, it will pop up an error dialog. The content of the
> dialog should wrap as well.

Error dialog now uses word-wrap.

> 4. The limit_text() could be useful outside of IPA.facet_header, so it
> can be made an independent function.

Moved to ipa.js.

> 5. The limit_text() returns a string up to max_length+3 because of the
> additional '...'. It's better to include the '...' in the calculation so
> the output is not longer than the expected max_length.

Fixed.
> 6. In widget.js:1104 what are the constants 4 and 14? Can they be combined?
>
Added comments to code. They shouldn't be combined because one applies 
only if the table is selectable. But thanks for pointing it out - there 
was actually a little error - the '14' should be in ?: statement and 
both of the weren't entirely correct. - Fixed

7. When a column has a width set, there is a line (widget.js:1098): 
width += 16; Why is it there? I'd rather subtract it.

-- 
Petr Vobornik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pvoborni-0053-Additional-better-displaying-of-long-names.patch
Type: text/x-patch
Size: 7792 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20111209/52d47256/attachment.bin>


More information about the Freeipa-devel mailing list