Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 453674

Summary: app-portage/ufed: Shortening/cleaning flag descriptions by eliminating "[Enables/Adds/Includes] Support [for] ..."
Product: Portage Development Reporter: Roman Žilka <roman.zilka>
Component: Third-Party ToolsAssignee: Sven Eden <sven.eden>
Status: RESOLVED FIXED    
Severity: enhancement CC: fuzzyray, kripton, proxy-maint
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Roman Žilka 2013-01-23 13:08:53 UTC
Horizontal space is a valuable currency in the ufed UI, because more of it lets us read the whole flag description without having to scroll right. What about cleaning away useless words from the descriptions themselves, so that we can get to the point right away? I mean words like "[Includes|Adds|Enables] Support [for] ..." and the likes. They convey no meaning anyway.

Even if you saw just "Monitoring of hdd temperature" instead of "Enable (ditto)" or "The guile Scheme interpreter" instead of "Adds support for (ditto)", you would have about as much information. All it takes is a slight shift from the way one is used to understanding the descriptions: till now we've expected to see a sentence; after the change we would just know and assume a-priori that all the flags are about turning +/- support for something. And we would know right away what for. Without having to overlook the word decorations.

Reproducible: Always
Comment 1 Roman Žilka 2013-01-23 13:31:24 UTC
A toggle-able feature, of course.

Sometimes grammar becomes mangled after such shortening, but that's OK, I think.
Comment 2 Sven Eden 2013-03-29 20:15:57 UTC
Although it would be easily doable in perl due to its strong regex engine, the texts are held in C program and are "just" delivered as is.

I have to think about this. The easy way would be some kind of command line option to turn on the cleansing. The perl program that actually does the collection of the data that is to be displayed would then prepare the descriptions.

But what if a descriptions is mangled to a point where the user would like to see the whole message, because it is not clear any more what it means? A "life" change of the descriptions would be by far better then.
I am not convinced that some gaining of space would be worth the amount of work this *seems* to need.

Next week I'll do some experiments and then report back.
Comment 3 Roman Žilka 2013-03-29 20:41:21 UTC
(In reply to comment #2)
> But what if a descriptions is mangled to a point where the user would like
> to see the whole message, because it is not clear any more what it means? A

It certainly would be a togglable feature.
Comment 4 Sven Eden 2013-09-10 06:38:02 UTC
Due to private matters it took me a (longer than expected) while to get back to this.

To have this feature toggable there are only two ways to implement this.

Possibility 1: Add the shortening to the interface itself.
  This would mean that streams of characters must be parsed over and over again. Hitting up/down key means parsing every single line displayed to change the text.
Further the texts must be held twice. Once in their original form and once in the form to display. The latter would either be a shortened version or simply a copy.

Possibility 2: Prepare an alternative text.
  While preparing the descriptions a reduced version could be build and sent to the interface as an alternate text. The interface then only needs to decide upon which of those to use.

I strongly favor the second alternative, it seems to be of much more use. And the impact on the current code *looks* like to be a lot less.

Currently I have a local branch to test possibility two. I'll report back when the tested solution is either worth merging into master or ends up being thrown away.
Comment 5 Sven Eden 2013-09-11 06:07:11 UTC
The changes are made, the new key F10 toggles the decscription between the original form and the stripped version.

Please note that only wordings at the beginning of the description lines are stripped. Similar words in the middle or at the end will be left alone. However, this reduces the needed length greatly.

Please feel free to test the new feature in the live version.
Comment 6 Sven Eden 2014-03-21 15:26:38 UTC
This feature has been added to the new version 0.91 in the tree.