AlexsLemonade / refinebio-web

Refinebio Web
https://staging.web.refine.bio
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Remove Page and Size query parameter #293

Closed davidsmejia closed 7 hours ago

davidsmejia commented 10 months ago

Context

Before we release refinebio-web as the new default client implementation we should remove the customized query parameters.

The only exception at this time is filter_order which will be removed when the API has been updated to account for this behavior.

Solution or next step

Remove the FE only query params from the search page so that there is 1:1 parity with what we pass to the API.

nozomione commented 10 months ago

Remove the FE only query params from the search page so that there is 1:1 parity with what we pass to the API.

  • remove p

    • remove size
  • surface limit and offset along with all other query parameters

@davidsmejia I am using them to calculate pagination etc. Let's keep the implementation as is.

As mentioned earlier (one of the reference https://github.com/AlexsLemonade/refinebio-web/pull/126#issuecomment-1644586563), it's standard practice to use p (or page etc) in FE to create user-friendly URLs for web apps (e.g., e-commerce sites (like Amazon, Nordstrome), news site (like NYT)). As far as I know, I can't find any web apps that use limit and offset(although they are commonly used in BE APIs).

Example: The websites listed below are examples of paginated pages with user-friendly URLs:

Nature uses the page parameter for the paginated pages: https://www.nature.com/opinion?page=3

BioRxiv uses the page parameter for the paginated pages: https://www.biorxiv.org/collection/biochemistry?page=2

Cell uses the startPage parameter for the paginated pages: https://www.cell.com/cell/collections/latest-reviews?startPage=2&pageSize=25

Amazon uses the page parameter for the paginated pages: https://www.amazon.com/s?i=electronics&rh=n%3A24046923011&fs=true&page=3

NY Times use thepage parameter for the paginated pages: https://www.nytimes.com/section/world?page=10

Please let me know your thought on this 💭