Bug 299787

Summary: software repositories: enabled/disabled switching still not clear enough
Product: [openSUSE] openSUSE 10.3 Reporter: Jiri Dluhos <jdluhos>
Component: YaST2Assignee: Stefan Hundhammer <shundhammer>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Minor    
Priority: P5 - None CC: jsuchome
Version: Beta 1   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: screenshot
Screen shot: Repo with very long name, yet spacings are preserved

Description Jiri Dluhos 2007-08-13 13:37:19 UTC
The 'Software repositories' dialog in 10.3 uses a small check sign to indicate whether a repository is enabled or disabled. This is good, and certainly better to understand than the old "on/off" text, but I think it is still not clear enough for a normal user. The check mark is at the very left edge and easy to miss (I have not noticed it at all on the first try).

Please don't take me wrong - I think the new dialog is certainly a large step in the good direction, I only think we need to go a bit further.

I would propose:

- coloring the whole line slight gray if it is disabled
- centering the checkmark glyph in its column so it is better visible
- a doubleclick on the line should toggle the enabled/disabled status
Comment 2 Jiri Dluhos 2007-08-13 13:44:29 UTC
If the coloring of the line is not technically possible, we could instead increase the visibility of the checkmark even more by putting empty squares at lines where the checkmark would be for disabled sources.
Comment 3 Jiří Suchomel 2007-08-13 14:13:31 UTC
> - coloring the whole line slight gray if it is disabled

unfortunately this is not possible with our UI

> - centering the checkmark glyph in its column so it is better visible

That's questionable. For example I think it is very well visible and that it is nicer on the left side that it would be in the center (JFYI, I didn't write it, so I'm not biased :-))

> - a doubleclick on the line should toggle the enabled/disabled status

Makes sense.
Comment 4 Jiří Suchomel 2007-08-13 14:14:16 UTC
Created attachment 157079 [details]
screenshot
Comment 5 Jiří Suchomel 2007-08-13 14:25:21 UTC
If the repository name is too long, it widens the frame that's around it (see the screenshot). Stefan, could it be avoided somehow?
Comment 6 Jiří Suchomel 2007-08-14 09:03:35 UTC
> - a doubleclick on the line should toggle the enabled/disabled status

yast2-packager-2.15.60
Comment 7 Stefan Hundhammer 2007-08-22 14:25:01 UTC
(In reply to comment #5 from Jiri Suchomel)
> If the repository name is too long, it widens the frame that's around it (see
> the screenshot). Stefan, could it be avoided somehow?

Not with the way our table widget works right now. Qt (-3 and -4) can also internally cut off over-long texts in colum and add an elipsis ("...") instead so the user can still make the column wider.

But just how wide is "too wide"? Do we want to avoid scrolling horizonatlly completely, always using the cut-off-and-add-elipsis technique? (the underlying Qt widget can do that, too AFAIK).

We could add yet another widget option for that behaviour. Or we could let the application specify wich columns should auto-strech to fit their content and which ones should cut off, but that would be an API change (or at least an API extension).

Let me think about this. Maybe there is a good (preferably generic) long-term solution.


Comment 8 Jiří Suchomel 2007-08-22 15:39:41 UTC
Stefan, the widget in question is not meant to be scrollable. It's just the static label inside a frame (the bold one on the screenshot).

Anyway, I'll reassign it to you to think about it :-)
The double-click is done and the centering of the checkmark won't be done.
Comment 9 Stefan Hundhammer 2007-08-23 09:50:40 UTC
Summarizing an IRC conversation about this:

This is not (as I had misunderstood it) about the width of the columns in the table widget. Rather, it's about the details of the currently selected repository below that table. The name (in this case the URL) is cut off.

Idea: Use a RichText widget for those details. We could do more fancy stuff with that, too; for example using icons for status.
Comment 10 Jiří Suchomel 2007-08-23 10:37:12 UTC
But the problem is not that the name is cut off - actually it has to be if it is too long. My only concern was that in the case, the frame around this label gets wider that it should and ignores the HSpacing's around it.
Comment 11 Stefan Hundhammer 2007-08-23 14:20:01 UTC
Hm - the layout engine intentionally kills any spacings before it tries to cut off any widget with real content. That was actually meant as an improvement...

And in this case, you'd like to give the spacings more priority than the widget with content - the frame that gets blown up so much because it contains that over-long repo name. I fear this is not possible right now.

I experimented with HWeight() which reduces the widget with a weight in layout priority, but still HSpacing() has even less priority. So this does not work.
Comment 12 Stefan Hundhammer 2007-08-23 14:34:31 UTC
Disregard the last comment. I hadn't properly installed my changed version.

As a matter of fact, using HWeight() helps. It reduces the layout priority of the content of the HWeight widget so that first all other widgets in the same layout box are satisfied, then the rest is distributed among the widgets with a weight. If there is only one, it will get the remaining space (the weight value is not important if it's only one widget with a weight).

So I changed

`HBox(
      `HSpacing(),
      `Frame( ... )
     )

to

`HBox(
      `HSpacing(),
      `HWeight(1, `Frame( ... )
     )

and now the spacing appears again, even if the frame content uses more space than available.

BTW this is a general layout technique that is useful in many pathological cases like this one.
Comment 13 Stefan Hundhammer 2007-08-23 14:35:25 UTC
Created attachment 159492 [details]
Screen shot: Repo with very long name, yet spacings are preserved