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

Generated site: add pagination #34

Open
fahad19 opened this issue Apr 15, 2023 · 3 comments
Open

Generated site: add pagination #34

fahad19 opened this issue Apr 15, 2023 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers ui

Comments

@fahad19
Copy link
Member

fahad19 commented Apr 15, 2023

Currently

Generate site currently lists all entities in one large list.

Problem

This can result into laggy experience in the browser.

Solution

We wish to add pagination for the list view for Features, Segments, and also Attributes.

History page does not have this issue, since it has a "Load more" button at the bottom.

Technical notes

More info: https://featurevisor.com/docs/site/

All components found here: https://github.com/fahad19/featurevisor/tree/main/packages/site/src/components

Local development tips

$ npm ci
$ npm run bootstrap

Make changes in packages/site, then do:

$ (cd ./packages/site && npm run build)

See the changes in example app:

$ (cd ./examples/example-1 && npm start)
@fahad19 fahad19 added enhancement New feature or request ui good first issue Good for newcomers labels Apr 15, 2023
@jagadeeshgade008
Copy link
Contributor

jagadeeshgade008 commented Mar 1, 2024

@fahad19 Do we need to filter for pagination after getting the entire JSON or can we use a module like json-server(https://www.npmjs.com/package/json-server) for filtering?

@fahad19
Copy link
Member Author

fahad19 commented Mar 1, 2024

Thinking out loud, what would you prefer more:

  • pagination, OR
  • continuous loading (like a "more" button at the bottom, that reveals more results)

the primary reason for opening this issue was because of rendering too much content in the same page in one go. if we have an easier way out with a "more" button, I am fine with that.

what do you think, @jagadeeshgade008?


if we add a "more" button at the bottom, may be we only show that button if the user is not searching for something specifically. meaning, the button only appears if the search input is empty

@jagadeeshgade008
Copy link
Contributor

Currently we are fetching entire json,
Addig more button is okay as long json is limited size.
For larger jsons pagination might be a good option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers ui
Projects
None yet
Development

No branches or pull requests

2 participants