Quest : Pagination for search results #990
Replies: 14 comments
-
search result all items are appearing in the list, also confirmed with Quest-g6pd variant, currently search for keyword 'a' results 69 items, all displaying and counted. |
Beta Was this translation helpful? Give feedback.
-
cool, thanks @AbdulWahabMemon do we have unit tests covering this? extending those tests to cover more edge cases might be a good to close this issue |
Beta Was this translation helpful? Give feedback.
-
Hi @pld , there are severals unit tests and UI tests already written for search filter and search result, as @f-odhiambo thinks "search should not be a continuous scroll though" I tried working on that too, but found that paginating UI is written as against showing resultCount (pagination and search are kinda vice versa here) if (!showResultsCount) {
Box(modifier = Modifier.constrainAs(searchFooterRef) { bottom.linkTo(parent.bottom) }) {
SearchFooter(
resultCount = resultCount,
currentPage = currentPage,
pageNumbers = pagesCount,
previousButtonClickListener = previousButtonClickListener,
nextButtonClickListener = nextButtonClickListener
)
}
} where showResultsCount is set true in viewModel with performFilter using all register data registerViewModel.filterValue.observe(
viewLifecycleOwner,
{
val (registerFilterType, value) = it
if (value != null) {
registerDataViewModel.run {
showResultsCount(true)
filterRegisterData(
registerFilterType = registerFilterType,
filterValue = value,
registerFilter = this@BaseRegisterFragment::performFilter
)
}
} else {
registerDataViewModel.run {
showResultsCount(false)
reloadCurrentPageData()
}
}
}
) @f-odhiambo , for your intentions @ellykits can better update here, whether we can render paginated list with search query, or written behaviour is fine/fair enough to search with real data name rather searching for specific characters("a"). cc: @kwasim |
Beta Was this translation helpful? Give feedback.
-
For whether search is continuous or not, that's a decision for @rowo to make |
Beta Was this translation helpful? Give feedback.
-
Adding Blocked label as I await feedback from Design Team |
Beta Was this translation helpful? Give feedback.
-
For clarification: On the bug On the design On testing |
Beta Was this translation helpful? Give feedback.
-
The UI is shared in all the registers. |
Beta Was this translation helpful? Give feedback.
-
@f-odhiambo In previous apps I think we paginated (with a relatively small number of rows) because of performance / device resources on search. If we are no longer worried about that, I think we should do an infinite scroll here because scrolling is a lot faster and easier than finding and tapping a button. If this will be a problem when we have a really high number of clients in the system, maybe we can prevent searching until there are two letters or do a combination where pagination starts at a high number of rows after loading data on demand up to that point. For registers, and maybe that's what this is about since the old apps had a very rudimentary search, if we don't need pagination I think we should also get rid of it. The better approach would be to show a set number of rows and at the end provide a way to jump to browse in a way that makes sense. So for example: if the rows are sorted by "most due", maybe you show like 20 of the top due items. After that, you can kind of assume they most likely aren't just trying to find the 80th most due person, so you can offer a link to browse by name and show the a --> z alphabet they can tap into — or alternatively continue infinite scrolling by the default sort. |
Beta Was this translation helpful? Give feedback.
-
Marking this as unblocked and can be implemented via continuous scroll |
Beta Was this translation helpful? Give feedback.
-
@f-odhiambo does this mean for things like LMH we don't have to do pagination? Is it something that needs to be defined either/or at this moment? We can test this too, though I am guessing most of the current users won't even notice. |
Beta Was this translation helpful? Give feedback.
-
@rowo No they dont . I think they will be doing full text search which I presume in this case will not as many result as just entering one single letter/character to search which is the case in this usecase |
Beta Was this translation helpful? Give feedback.
-
Converting this o a discussion item temporarily to preserve this data |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
All search results that are above the pagination limit should be displayed on separate pages in the app. Not all results are currently displayed despite viewing the correct search count. See screenshot
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
View the correct number of results and if more than the pagination limit vie results on different result pages
Screenshots
Smartphone (please complete the following information):
Additional context
N/A
Acceptance criteria
Beta Was this translation helpful? Give feedback.
All reactions