appsmith
appsmith copied to clipboard
Improve documentation for table pagination
Widget: Table
Feature: Server Side Pagination
https://docs.appsmith.com/widget-reference/table And some tooltips on the property pane of a table.
Problem description
Explanations given for the feature could be clearer. So the users find it easier to implement it in their tables.
Example of some properties:
-
Total Record Count From the tooltip, it's not very clear what this property actually does. A lot of the information could be moved to the docs, in my opinion.
Also the documentation is missing for "Total Record Count" property.
-
onPageSizeChange
- missing documentation -
Server side pagination (Docs) "Use this property when your table data is being bound to an API / Query". This line could be removed and replaced with more useful information. (Suggestions below)
Describe the improvement
The critical information the user needs to know, in order to implement server side pagination is as follows:
- Total number of pages is decided by two factors
pageSize
andTotal Records Count
. (Not addressed in the documentation) - Understand
pageSize
is an internal property, that changes with table and row heights. (This is addressed in the documentation) -
Total Records Count
has to be set. Else the pages will not stop once we reach the last record. (Not addressed) - API/Queries need to use
pageNo
andpageSize
and will have to be called onOnPageChange
andOnPageSizeChange
(Addressed heavily in tooltips, could be shifted to docs instead)
(Please add to this if I have missed/misunderstood something)
Suggested changes
-
Total Record Count
- Change to tooltip: “Used to limit number of pages to a finite number" / "Stops pagination once the table reaches the last record."
- Change to docs: Same as above + “pageSize is the other factor that decides the number of pages to be generated e.g. Total records = 50, PageSize = 10. Number of pages will be 5.”
-
Add documentation for "OnPageSizeChange"
-
Server side pagination (Suggested changes to docs):
- Enables you to implement pagination by limiting the number of results fetched per API / Query request.
- Use
pageNo
(Page number) andpageSize
to configure API/Query params accordingly - Call the API/Query,
OnPageChange
andOnPageSizeChange
-
Server side pagination (tooltip): "Fetch only the records required for a page. (Requires appropriate API/Query configuration)"
P.S. Also consider reviewing other tooltips and documentations pertaining paginations, which may not be mentioned here.
Can I do this job
Hey @idivyanshbansal, this issue still under going triaging, We will inform you once we are done, If you are still interested then, we will assign it to you. Meanwhile feel free to look at other issues under good first issues
& hacktoberfest
to find relevant issue you might be interested in.
Hey @idivyanshbansal, this issue still under going triaging, We will inform you once we are done, If you are still interested then, we will assign it to you. Meanwhile feel free to look at other issues under
good first issues
&hacktoberfest
to find relevant issue you might be interested in.
OK @somangshu sir
@somangshu Sir, please review this I was assigned but no one viewing https://github.com/appsmithorg/appsmith/pull/8364
@somangshu Sir, please review this I was assigned but no one viewing #8364
Added reviewers to the PR, Without this our team is not notified of the PR
@somangshu Sir, please review this I was assigned but no one viewing #8364
Added reviewers to the PR, Without this out team is not notified of the PR
Thank you @somangshu sir. Have a great day! 😄
Additional internal discussion about this - https://theappsmith.slack.com/archives/CGBPVEJ5C/p1643702368121879
Reach: 250 in last 6 months Impact: High
@dilippitchika please review this and pass it to @jnikhila https://docs.appsmith.com/core-concepts/displaying-data-read/display-data-tables#pagination
Properties - Table Record Count and onPageSizeChange added and available on docs.appsmith.com.
Feedback for docs only - https://docs.appsmith.com/core-concepts/displaying-data-read/display-data-tables#pagination
Thought process
- Are the pre-requisites clear - PageSize, PageNo, Using the same query
- Is the process clear - Each step broken down for the table
Items noted
- Currently there's no information on what PageSize and PageNo are in the page we need to link it or expand on it
- We need to show the steps sequentially on how to configure pagination we are talking about it on a high level. A video will help better here
- Switch on Server side pagination
- Update the query
- Bind the onPageChange event to the same query
- Add a new query for total record count
- Bind the result to total record count
[DONE] onPageSizeChange - This should be a separate section as this can only work when the developer is resizing the table. This has indirect impact on pagination and can be mentioned in the table's documentation rather than here.
CC - @jnikhila @Pranay105
@danciaclara - Please share pointers on the above.
@danciaclara Did we manage to do this?
@Rishabhkaul - This will be worked about as part of the Rehaul project and is in the pipeline to be picked up. CC: @Pranay105 - FYI, when you start working on this ticket.