Sorting users

14 views
Skip to first unread message

Péter Király

unread,
Apr 15, 2021, 12:19:54 PM4/15/21
to datave...@googlegroups.com
Hi,

last year I implemented a sorting option for user list in the API [1]. I did it because it seemed a good first step for implementing it at the user interface. I had technical problems with the UI, so I stopped there. I want to continue it now.

Primefaces makes it possible to make datatable's header clickable, and click triggers sorting. However it is not a real sort of the full data found in the Postgress table, it sorts only the current view.

So I think instead of hacking Primefaces, we should create a distinct sort button similar than that of the search page. Here is a mockup:

Dashboard - User List - Sort.png
I am not a Primeface or frontend developer, so before I start implementing that, I would like to ask
- do you agree wtth the basic idea of sorting user list? (my use case: I would like to check who are the new users, someties I would like list users by other criteria)
- what do you think of the concrete mockup? Is it OK-ish, or would you like to see some other options?
- do you know any more Primeface-close UI idea, or if you are UI developer, would you like to cooperate on the implementation?


Any thoughts would be more than welcomed! And thanks Phil Durbin for preliminary discussion and suggestions!

Best,
Péter

--
Péter Király
software developer
GWDG, Göttingen - Europeana - eXtensible Catalog - The Code4Lib Journal
http://linkedin.com/in/peterkiraly

James Myers

unread,
Apr 15, 2021, 12:44:38 PM4/15/21
to datave...@googlegroups.com

I though PrimeFaces could handle this, e.g. with https://www.primefaces.org/showcase/ui/data/datatable/lazy.xhtml. I haven’t tried anything, just looked at docs, and I don’t know if the effort to switch to a lazy model would be worth the effort (if we’re not using it now), but it might be worth checking out.

-- Jim

--
You received this message because you are subscribed to the Google Groups "Dataverse Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-dev/CABFhGt%3DVmkZvV17F2p1CKGsw16pq7e-u8xc9Mk2yF16xZx3%3Djw%40mail.gmail.com.

Péter Király

unread,
Apr 16, 2021, 6:05:50 AM4/16/21
to datave...@googlegroups.com
Hi Jim, 

thanks for the pointer. Unfortunately it does not do what I would like to achive. If you set the number of items in the showcase to 5 it will be evident. If you order by e.g. Country descending and ascending you will see that it only orders the current view. So the same elements will be sorted (the result of the actual set generated previously by the limit and offset SQL commands), not the whole database. So this method is useless, it won't show you the first or last global identifiers only the first or last in the subset.

Best,
Péter


James Myers

unread,
Apr 16, 2021, 8:43:41 AM4/16/21
to datave...@googlegroups.com

Peter,

That could just be a limit of their LazyCustomerDataModel load method which retrieves the number of items and then sorts. If that method passed the sort param to the db instead, the widget might do what’s needed. If so, it’s definitely a bad example!

Philip Durbin

unread,
Apr 22, 2021, 3:53:47 PM4/22/21
to datave...@googlegroups.com
Péter, thanks for making a pull request! Let's move the conversation to https://github.com/IQSS/dataverse/pull/7815



--
Reply all
Reply to author
Forward
0 new messages