Closed Bug 392718 Opened 17 years ago Closed 17 years ago

With beautified ftp listings, long filenames are truncated, making them hard to read

Categories

(Core :: Networking, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla1.9alpha8

People

(Reporter: stevee, Assigned: dao)

References

Details

(Keywords: regression)

Attachments

(2 files, 3 obsolete files)

Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a8pre) Gecko/2007081716 Minefield/3.0a8pre ID:2007081716

After the landing of bug 294800, long filenames are now truncated which makes it hard to distinguish between such filenames that are similar, and also makes it sometimes hard to see what filetype a file is.

This makes navigating and downloading files using ftp harder.
Summary: With beautify ftp listings, long filenames are truncated → With beautified ftp listings, long filenames are truncated, making them hard to read
Status: NEW → ASSIGNED
Assignee: nobody → dao
Status: ASSIGNED → NEW
Status: NEW → ASSIGNED
Attached patch WIP (obsolete) — Splinter Review
I still have to test this, since my c++ skills are not mature.
OS: Windows 2000 → All
Hardware: PC → All
Attached patch Patch (obsolete) — Splinter Review
This does the same thing but uses the Replace function (thus saving codesize). I hope you don't mind Dao...
Attachment #277257 - Flags: superreview?
Attachment #277257 - Flags: review?(bzbarsky)
Attachment #277257 - Flags: superreview? → superreview?(bzbarsky)
Component: File Handling → Networking
Product: Firefox → Core
QA Contact: file.handling → networking
Comment on attachment 277257 [details] [diff] [review]
Patch

The surrogate checks are needed _after_ cutting. Same for calling nsEscapeHTML2, I think, in order to not truncate HTML entities.
Attachment #277257 - Flags: superreview?(bzbarsky)
Attachment #277257 - Flags: review?(bzbarsky)
Attachment #277257 - Flags: review-
If we want to do escaping after the cutting happens, I guess your method is better. TBH I'm not very good at this either :)
Flags: blocking1.9?
For what it's worth, this code is making very poor use of screen real estate.  Even given the smallish size of my windows (about 1000px wide), and the huge amounts of horizontal whitespace the current design puts in (easily a third of the window width), only about half of the space for the filename is being used before we start truncating.  It looks pretty silly to have those truncated filenames while there's a bunch of space available.

Can we either significantly increase the truncation length, or at least make it resolution-dependent (maybe by moving the truncation into the script, though that may have performance issues) or something?  
Attached patch first attempt (obsolete) — Splinter Review
I think this basically solves the problem. But we can keep the bug open for more tweaks.
Attachment #277224 - Attachment is obsolete: true
Attachment #277257 - Attachment is obsolete: true
Attachment #277300 - Flags: superreview?(bzbarsky)
Attachment #277300 - Flags: review?(bzbarsky)
It doesn't really solve the problem I'm running into....  Do you want a separate bug on that?
Sure, a separate bug might be appropriate in order to keep different issues apart. In my book, the main problem here is that file extensions have been cut off.
Comment on attachment 277300 [details] [diff] [review]
first attempt

>Index: nsIndexedToHTML.cpp
>+            if (NS_IS_LOW_SURROGATE(descriptionAffix.Last()))

s/Last/First/ right?

With that change, r+sr+a=bzbarsky
Attachment #277300 - Flags: superreview?(bzbarsky)
Attachment #277300 - Flags: superreview+
Attachment #277300 - Flags: review?(bzbarsky)
Attachment #277300 - Flags: review+
Attachment #277300 - Flags: approval1.9+
Attached patch for checkinSplinter Review
yeah, must be First()
Attachment #277300 - Attachment is obsolete: true
Keywords: checkin-needed
netwerk/streamconv/converters/nsIndexedToHTML.cpp 1.83
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a8pre) Gecko/2007082603 Minefield/3.0a8pre ID:2007082603
VERIFIED
Status: RESOLVED → VERIFIED
Target Milestone: --- → mozilla1.9 M8
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: