Truncation Rules for Uploader, etc.

erin yu erin.yu at utoronto.ca
Fri May 30 21:50:11 UTC 2008


Hi,

This won't make the release, but I wanted to bring it up so we don't  
forget.

Currently with the Uploader, when you add a file with a really long  
name, this happens:



The File Name column widens to fit the name and you can see neither  
the sizes nor the remove buttons. This is an edge case, but when it  
does happen, it looks buggy and confusing.

It would be useful to have a set of truncation rules to be used in our  
components, so we can see and distinguish the file names reasonably  
well without affecting the column widths. In general, when truncating  
file names, it is a good practice to show the last bit and cut out the  
middle part, because the last part usually contains the versioning and  
file type informations.
e.g.	Chopping in the middle (good):				Chopping the end (bad):
	AwesomeOve...ect_EY.doc	 				AwesomeOverviewofFlu...	 	

I think the rule commonly used by file systems is:
n =  (x - e )/2 rounded down to an integer
where
n = number of characters to show from the front = number of char to  
show from the back
* these two can differ by a character
x = column size defined by the total number of characters that can fit  
in that column
e = number of characters used for the ellipsis (...), usually two or  
three dots

But of course, if you are truncating an announcement title or  
comments, there's no need to worry about this.

Perhaps we can look into this more for 0.4.
Erin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://fluidproject.org/pipermail/fluid-work/attachments/20080530/2a21560d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Picture 103.png
Type: image/png
Size: 26104 bytes
Desc: not available
URL: <http://fluidproject.org/pipermail/fluid-work/attachments/20080530/2a21560d/attachment.png>


More information about the fluid-work mailing list