Bug 442161

Summary: Package list in Software Management should not be sorted after each status change
Product: [openSUSE] openSUSE 11.1 Reporter: Marian Ciobanu <ciobi>
Component: YaST2Assignee: Thomas Göttlicher <tgoettlicher>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P4 - Low    
Version: Beta 4   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 10.3   
Whiteboard: 0xB13C
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Marian Ciobanu 2008-11-06 07:49:58 UTC
I'm currently using openSUSE 10.3 with KDE 3.5 and I've looked at both 11.0 and 11.1 beta 4, which share the same problem: in KDE 4.x, in YaST / Software Management, when packages are sorted by their status ("install" / "keep" / "update" ...), changing the status of one package (e.g. from "keep" to "update") also changes its position in the list, while in 10.3 the position of a package in the list stays the same until the list is sorted again or the filter is changed. Sure, it's more consistent to have it this way, but at least to me it's less usable. Or rather it's quite unusable because, as the status of a package is changed, the whole list is sorted again, which takes significant time, and then the package is moved, losing all the context information. If I wanted to install or update several related packages, I'd have to scroll again to find the others. I'm a big fan of the "All Packages" group, which exacerbates the problem (but there are some pretty big package groups besides "All Packages"). In 10.3 I use it regularly to see which packages have updates and decide on a case-by-case basis if I want to update or not, but doing so in 11.x is next to impossible if the packages are sorted by their status.

I have a hard time imagining a use case that benefits from the continuous sorting of the package list, so I'd like to suggest to drop this feature and revert to the previous approach (as up to 10.3). I guess some thought went into the decision to make this change, but I just feel that consistency was chosen over usability in this case for no strong reason.

Something else that seems related to this: filter by package groups, click on some package group name, scroll down a few pages, then click on another package group. The package list is updated, but it gets scrolled down by several pages, when it really should show the first package in the top row (or perhaps remember where it was for each package group and go to that position when a previously visited package group is selected again). I find no good reason to click on a package group and find that the package list is scrolled somewhere to the middle.
Comment 1 Thomas Göttlicher 2008-11-07 13:53:26 UTC
1) The behavior of the sorted list has changed due to the port from qt3 to qt4. I hope the qt4 api allows to return to the old sort mode. I'll look into that soon.

2) The second request is a known bug. See bug 422226: Switching patterns should scroll the package list back to the top.
Comment 2 Marian Ciobanu 2008-12-09 09:53:38 UTC
Is there any reason not to change from a list that is always sorted to one that gets sorted only "on demand"? (The list should get sorted only when the user clicks on a column header or when the view switches to another package group / search / etc).

On demand sorting: QTreeWidget::sortItems(col)

Turn off automatic sorting: QTreeWidget::setSortingEnabled(false)
Comment 3 Thomas Göttlicher 2009-01-02 14:47:33 UTC
This bug is fixed. yast2-pkg version 2.18.2 will contain this fix.
Comment 4 Marian Ciobanu 2009-02-09 15:16:59 UTC
For various reasons, only now did I finally manage to take a look at the fix. Unless I messed something up, it seems that there's another small issue: the list doesn't get sorted until you click on a column header to sort it, although a sort arrow is visible. On my computer I hacked YQPkgObjList::logExcludeStatistics() to do this initial  sorting.