← Back to team overview

mahara-contributors team mailing list archive

[Bug 1046750] Re: Show more of the file name

 

So, to be clear, we're talking about extending the file length displayed
in:

- artefact/file/lib.php
- theme/raw/form/filelist.tpl
- artefact/file/blocktype/filedownload/theme/raw/filedownload.tpl

Is that right?

The truth is, Mahara puts no limit on the length of filenames uploaded.
(They're stored in artefact.title, which is a binary text column, which
in theory is more or less unlimited; in practice it's something like a
couple billion characters.) So any length limit we pick is going to an
arbitrary cutoff. I'm all for raising that arbitrary cutoff if people
think it would make the site look better, though. :-D

There are a couple of other things we could do to help out with this as well:
 - put a "title" attribute (i.e. mouseover text) on the shortened name, which has the full name
 - use the CSS3 text-overflow attribute (supported in all modern browsers): http://caniuse.com/text-overflow
   - but the problem with text-overflow is that it puts ellipses at the END of the filename, which obscures the file suffix
 - find some JS library that will auto-expand/hide the text with ellipses in the middle (I didn't find one in a quick Google search)

Anyway, just let me know if I've identified all the places where the
filename length should change, and I'll see about upstreaming it.

Cheers,
Aaron

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contrib members
https://bugs.launchpad.net/bugs/1046750

Title:
  Show more of the file name

Status in Mahara ePortfolio:
  Triaged

Bug description:
  https://mahara.org/interaction/forum/topic.php?id=4841

  The file names are shortened too quickly when they are long and are
  not easily readable. A potential solution for showing more is proposed
  in the forum discussion, but maybe it can be made more flexible and
  depend on the width of the block?

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1046750/+subscriptions


References