This post originated from an RSS feed registered with Agile Buzz
by James Robertson.
Original Post: Test Feedback back for Packages
Feed Title: Travis Griggs - Blog
Feed URL: http://www.cincomsmalltalk.com/rssBlog/travis-rss.xml
Feed Description: This TAG Line is Extra
In yesterday's post about test feedback for packages, one of the things I listed as issues was that ...Different size icons make the vertical alignment sketchy....
So I sat down and tried to figure out how to make it put the icon at the back. One of the problems is that there's implicit notion that your list is text, with an optional icon on the left side. These means we'd need a new kind of LabelAndEndingIcon or something. And we'd have to get the lists to use a visualBlock, instead of a displayStringSelector. And figure out where to wire that in. It's all in there, but you'd touch stuff everywhere.
Luck is our lady in this case. If you make displayString return a Text object rather than a String for PackageModel, the list will happily go with that. This is cool. You could italicize package names. Or bold them. Or superscript them. And do all kinds of cute formatting. You could make your browser look just like those Christmas letters we used to get from Mac owners in the 80's... you know, the one's where the font changed every 2 or 3 sentences. Just because, well, because it could. It was the trademark of the Mac letter writer, his or her way of saying "Nah nah nah nah, I own a Mac and you don't." But I digress.
Rather than go nuts with fonts, I just chose to use a #trailingInsert emphasis. This allows you to insert arbitrary graphics in the text stream. It's counterpart, #leadingInsert is what is used to put the Stop Sign in for PDP breakpoints. This is possible when you load the package ExtraEmphases. With that in place, we get something that looks like this:
Doing it this way has another interesting side affect. You know how when you flip to the "Heirarchy Mode" for a class, the Packages in the second list over, don't show the icon decoration that they would have otherwise? Not a problem in this case. The test status still shows up. It would be interesting to respin the package/bundle modified/notmodified icons this way, using ExtraEmphases #insertLeading, rather than LabelAndIcon. Then it would just work everywhere.
Oh yeah, I took out the ability for Bundles to show the test status icon. I don't use Bundles; if this disavows someone, let me know, I'll figure out how to put them back in.