Hi everyone,
so I’m writing this topic as a follow up of a brainstorming started on the chat with @mleduc. This brainstorming started because I have a problem with a LiveData in Change Request extension: my UC is that I want to display a LD containing specific xobjects (with the usual filters on xobjects), but that also respects some specific dynamic criteria (in my case I have to check a combination of critieria such as right, configuration option, etc).
So right now I have a custom source that is calling the default LiveTable macros and then iterate over the entries to filter them out if some APIs check is not met.
And the problem with that is the pagination.
Currently, our way to deal with that issue is by obfuscating the entries: that’s why we have the N/A entries in index of documents, and we even have this hardcoded hint below the table to inform why some entries are not displayed.
The problem is that for me this solution is very focused on the UC of rights: that’s even the reason why the hint is currently hardcoded and mention the right, see:
So for me that solution works to fix a pagination problem, but provides a very bad UX, see an example of the LD I obtain for CR:
Note that in this screenshot all the entries I’m getting are actually viewable by the user, it’s just that the one with N/A cannot be reviewed by that user. So the hint is not good and the table is tedious to use as we get many pages with obfuscated entries.
Ideally the solution would be to be able to compute properly the total number of entries and to iterate over them: the problem is that since the filter is very dynamic it’s very expensive to do that. I would basically need to load all the info in memory, and it’s very possible that with time the number of CRs grow enough so that it doesn’t scale anymore.
For all that reason, @mleduc proposed a solution in the chat that could fit properly this UC: to just not display any number of pages, but have a button “load more”.
The idea would be to have a way for LD to specify that a source is not returning the total number of results, and to adapt the UI so that it would only propose to load new entries.
Obviously this would have some impact: the sort of columns would be limited to the already loaded entries in such case.
But I think it would be an elegant solution to avoid this kind of problem in the future, when it’s really difficult to provide proper computation of the total number of entries.
wdyt?