Bug 1119309 - sorting columns and paging
Summary: sorting columns and paging
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ovirt-3.6.0-rc
: 3.6.0
Assignee: Alexander Wels
QA Contact: Lukas Svaty
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-14 13:30 UTC by Michal Skrivanek
Modified: 2016-04-20 01:37 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-20 01:37:45 UTC
oVirt Team: UX


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 36084 master MERGED webadmin: reset page to 1 on sort Never
Red Hat Bugzilla 1129298 None None None Never

Internal Links: 1129298

Description Michal Skrivanek 2014-07-14 13:30:07 UTC
When sorting of a column is applied the paging mechanism is problematic. 

If there is an item highlighted either jump to the correct page based on a highlight (with multiple highlights, jump just to the page of the first on) or simply always go to page 1. 

Currently we stay on the same page which may mean that the original item disappears and one needs to go and try to manually locate it on a different page.

Comment 1 Einav Cohen 2014-10-21 12:59:19 UTC
when user changes search query / when sorting applies (i.e. whenever the search is changing, except paging): 

(a) if there was a selected item: "jump" to the page that contains this selected item. 
(b) if there are multiple selected items: "jump" to the first page that contains one of them. 
(c) otherwise (fallback): go to page 1. 

[if (a)/(b) are problematic to implement - let's do only (c)]

Comment 2 Alexander Wels 2014-12-10 20:30:59 UTC
Jumping to the page that contains the selected item is going to be really difficult as I don't have that information. I could query every page until I find the one I am looking for but that could potentially require a lot of requests to find the right page. So implementing (c) is what I am going to do.

@Einav
What needs to happen to the selected item which most likely is on a page that is not shown. Should we unselect the item? It will automatically get deslected if you sort again (since now the list of items in memory does not match the selected item at all anymore, and the second search will simply clear out the selected item).

Comment 3 Einav Cohen 2014-12-10 23:03:07 UTC
(In reply to Alexander Wels from comment #2)
> Jumping to the page that contains the selected item is going to be really
> difficult as I don't have that information. I could query every page until I
> find the one I am looking for but that could potentially require a lot of
> requests to find the right page. So implementing (c) is what I am going to
> do.
> 
> @Einav
> What needs to happen to the selected item which most likely is on a page
> that is not shown. Should we unselect the item? It will automatically get
> deslected if you sort again (since now the list of items in memory does not
> match the selected item at all anymore, and the second search will simply
> clear out the selected item). 

can we select the item in case it is there (i.e. in the current page, which is the first page of the new search, in case this was triggered by sorting) and if it is not there - simply deselect it?

Comment 4 Alexander Wels 2014-12-11 12:56:38 UTC
Yes that is in my opinion the only reasonable option, if the selected item happens to show up on page 1, then keep it selected otherwise clear the selection as we have no references left to the object anyway.

Comment 5 Lukas Svaty 2015-06-18 11:15:00 UTC
verified in ovirt-engine-webadmin-portal-3.6.0-0.0.master.20150519172219.git9a2e2b3.el6.noarch


Note You need to log in before you can comment on or make changes to this bug.