Feature - Implemented better display for long pref strings by prefref command

AlbinoRhino

Active member
So ... this is mostly explained by the 2 pictures attached. Prefref works great for 99% of the prefs. But a few of them involve long complicated strings which don't display properly (at least on my system), as <td> tags apparently don't force their contents to wrap. Attached is a patch file which I made about a week ago and appears to have completely resolved the issue on my system. My java literacy is nonexistant, so perhaps there are reasons not to do this that I am unaware of, but since it has been working for me, and assuming I'm not the only one with this issue, I thought I might as well throw it up here.

Before:
before.jpg

After:
after.jpg

(Sorry, I had to reduce the picture quality to meet the forum upload limitation.)
 

Attachments

  • PrefRefCommand.java.patch
    1.2 KB · Views: 49

heeheehee

Developer
Staff member
So, in summary, you wrap the content of table cells in <p> tags? That's a simple enough fix for this case, sure, but I wonder if there's a more general solution for oversized tables ("modtrace item" comes to mind as a common source of this).
 

AlbinoRhino

Active member
Not sure what you mean. I've not noticed any issues with my table sizes, just with the cell contents not wrapping.
 

Veracity

Developer
Staff member
Java's HTML renderer is fragile. If putting the cell data in <p> tags will make it wrap correctly (as it should, but, no guarantees), we could do that; we'd just have to remember to do that for any hand-crafted HTML tables we generate to display in the gCLI frame.

By "more general solution", are you thinking about some sort of post-processing of tables before they are handed of the Java's HTML renderer?
 

AlbinoRhino

Active member
Well, I did try a few different style attributes here and there. None of which worked. Then I thought ... maybe I'm making this too complicated. I tried this and it worked.
 

heeheehee

Developer
Staff member
Perhaps; I'm not entirely sure what's possible and what's not, as I haven't spent very much time thinking about this just yet.
 

AlbinoRhino

Active member
Understood. I deal with it by uploading images to imgur.com and then posting the image wrapped in [IMG] [/IMG] tags.

I actually thought of using some external hosting ... AFTER I had reduced the quality of my only copies of the screencaps. lol The "after" one would have been easy to re-cap but the "before" one would have required reverting the patch, rebuilding mafia, logging back in, making the cap, logging out, re-applying the patch .... which I had already done once. So I decided ... meh ... good enough ! :)
 

Veracity

Developer
Staff member
Bumping this to remind myself to look at this again. I've been bitten by a super-long setting value recently.
 

Veracity

Developer
Staff member
Revision 17407 does this for prefref - which is the original scope of the feature request.
As heeheehee suggested, modtrace is another candidate.
Maybe later. For now, this is implemented.
 
Top