Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

327 browse all wares #328

Merged
merged 1 commit into from
Nov 30, 2023
Merged

327 browse all wares #328

merged 1 commit into from
Nov 30, 2023

Conversation

alishaevn
Copy link
Contributor

return all wares for the given marketplace

the default api setting is to return 25 wares per page. so, we were only returning 25 wares total on the browse page. we now are returning "all" wares by choosing to get 2000 wares per page in the api request. I didn't see a way to set page: "all" or per_page: "all".

if a marketplace has more than 2000 wares, we will need to increase the number.

Screenshots / Video

postman api call image
Screen.Recording.2023-11-30.at.02.11.08.PM.mp4

the default api setting is to return 25 wares per page. so, we were only
returning 25 wares total on the browse page. we now are returning "all"
wares by choosing to get 2000 wares per page in the api request. I
didn't see a way to set `page: "all"` or `per_page: "all"`.

if a marketplace has more than 2000 wares, we will need to increase the
number.
Copy link

vercel bot commented Nov 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
webstore-staging ✅ Ready (Inspect) Visit Preview Nov 30, 2023 8:13pm

@@ -127,6 +127,8 @@ export const FEATURED_SERVICE_PATH = '/requests/new'
// the default is 1 week
export const EXPIRATION_DURATION = 604800000

export const API_PER_PAGE = 2000
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you actually load them all on the page at once? Or is there some kind of infinite scroll or pagination?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's an infinite scroll. there's a video in the pr comment if that helps. doesn't seem to be problematic. but also....the beachsidebiotech and phenovista marketplaces each have under 600 wares. I went with 2000 for insurance with other marketplaces.

and in the next phase, or with the next client, we may introduce pagination.

@alishaevn alishaevn merged commit ebd1801 into main Nov 30, 2023
3 checks passed
@alishaevn alishaevn linked an issue Nov 30, 2023 that may be closed by this pull request
2 tasks
@alishaevn alishaevn deleted the 327-browse-all-wares branch January 24, 2024 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

browse all wares
2 participants