appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

Improve documentation for table pagination

Open eco-monk opened this issue 3 years ago • 12 comments

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. tedTa 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 and Total 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 and pageSize and will have to be called on OnPageChange and OnPageSizeChange (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) and pageSize to configure API/Query params accordingly
    • Call the API/Query, OnPageChange and OnPageSizeChange
  • 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.

eco-monk avatar Oct 05 '21 13:10 eco-monk

Can I do this job

idivyanshbansal avatar Oct 10 '21 16:10 idivyanshbansal

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.

somangshu avatar Oct 11 '21 09:10 somangshu

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

idivyanshbansal avatar Oct 11 '21 09:10 idivyanshbansal

@somangshu Sir, please review this I was assigned but no one viewing https://github.com/appsmithorg/appsmith/pull/8364

idivyanshbansal avatar Oct 11 '21 09:10 idivyanshbansal

@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 avatar Oct 11 '21 09:10 somangshu

@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! 😄

idivyanshbansal avatar Oct 11 '21 09:10 idivyanshbansal

Additional internal discussion about this - https://theappsmith.slack.com/archives/CGBPVEJ5C/p1643702368121879

ajinkyakulkarni avatar Feb 01 '22 08:02 ajinkyakulkarni

Reach: 250 in last 6 months Impact: High

dilippitchika avatar Apr 05 '22 07:04 dilippitchika

@dilippitchika please review this and pass it to @jnikhila https://docs.appsmith.com/core-concepts/displaying-data-read/display-data-tables#pagination

Pranay105 avatar Apr 05 '22 11:04 Pranay105

Properties - Table Record Count and onPageSizeChange added and available on docs.appsmith.com.

jnikhila avatar Apr 06 '22 07:04 jnikhila

Feedback for docs only - https://docs.appsmith.com/core-concepts/displaying-data-read/display-data-tables#pagination

Thought process

  1. Are the pre-requisites clear - PageSize, PageNo, Using the same query
  2. Is the process clear - Each step broken down for the table

Items noted

  1. Currently there's no information on what PageSize and PageNo are in the page we need to link it or expand on it
  2. 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

dilippitchika avatar Apr 11 '22 09:04 dilippitchika

@danciaclara - Please share pointers on the above.

jnikhila avatar Sep 14 '22 09:09 jnikhila

@danciaclara Did we manage to do this?

Rishabhkaul avatar Dec 24 '22 00:12 Rishabhkaul

@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.

jnikhila avatar Dec 26 '22 05:12 jnikhila