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

Feature/user data pagination #891

Open
wants to merge 37 commits into
base: develop
Choose a base branch
from

Conversation

IshanVeer
Copy link

@IshanVeer IshanVeer commented Oct 15, 2024

Date: 15/10/2024

Developer Name: Ishan Veer


Issue Ticket Number

Description

Previously all the data was being fetched at once which can cause performance issues. So things I worked on:

  1. I implemented pagination so that the first 10 users are fetched initially. As the user scrolls to the bottom of the page, an additional 10 users are fetched each time.
  2. The API was not paginated so currently tested with mock data and will be under feature flag.

Documentation Updated?

  • Yes
  • No

Under Feature Flag

  • Yes
  • No

Database Changes

  • Yes
  • No

Breaking Changes

  • Yes
  • No

Development Tested?

  • Yes
  • No

Screenshots

Screenshot 1

Test Coverage

Screenshot 1 Screenshot 2024-10-15 at 7 59 30 PM Screenshot 2024-10-15 at 7 29 04 PM

Additional Notes

Currently testing it with mock data because API is still not paginated.

@pankajjs
Copy link

pankajjs commented Oct 15, 2024

  1. There are no tests for your changes.
  2. A working video would be better choice to see the working feature.

@vinit717 vinit717 linked an issue Oct 15, 2024 that may be closed by this pull request
10 tasks
Copy link
Member

@vinit717 vinit717 left a comment

Choose a reason for hiding this comment

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

Please put your feature behind feature flag also remove the mock data and comments
and what about the paginate API?

@IshanVeer
Copy link
Author

Please put your feature behind feature flag also remove the mock data and comments and what about the paginate API?

We had this conversation previously:
Screenshot 2024-10-14 at 10 06 33 PM

users/discord/App.js Outdated Show resolved Hide resolved
users/discord/App.js Outdated Show resolved Hide resolved
@prakashchoudhary07
Copy link
Contributor

Hey who is working on backend for this?

@vinit717 vinit717 mentioned this pull request Nov 1, 2024
package.json Outdated Show resolved Hide resolved
@IshanVeer
Copy link
Author

Screenshot 2024-11-10 at 10 49 27 AM

users/discord/App.js Outdated Show resolved Hide resolved
users/discord/components/UsersSection.js Outdated Show resolved Hide resolved
Copy link
Contributor

@AnujChhikara AnujChhikara left a comment

Choose a reason for hiding this comment

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

  • can you please attach test coverage of the App.test.js
  • also please attach a video of changes working with dev flag

@IshanVeer
Copy link
Author

  • can you please attach test coverage of the App.test.js
  • also please attach a video of changes working with dev flag
Screenshot 2024-11-11 at 10 52 27 AM
Screen.Recording.2024-11-11.at.10.54.26.AM.mov

Copy link
Member

@MehulKChaudhari MehulKChaudhari left a comment

Choose a reason for hiding this comment

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

Just one minor addition, I believe rest of the things are good to go.

Copy link
Member

@vinit717 vinit717 left a comment

Choose a reason for hiding this comment

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

How you will test your feature on staging and prod?

users/discord/App.js Outdated Show resolved Hide resolved
users/discord/App.js Outdated Show resolved Hide resolved
// add feature flag(feature should be only visible when query params dev=true)

export const paginateFetchedUsers = async (tabId, page = 1) => {
if (isLoading) {
Copy link
Member

Choose a reason for hiding this comment

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

How you are checking this condition?

Copy link
Author

Choose a reason for hiding this comment

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

checked it with mock data, so when data is not being loaded the loading spinner is rendered.

Copy link
Member

Choose a reason for hiding this comment

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

how did you determine isLoading and where are you getting this from ?

@IshanVeer
Copy link
Author

How you will test your feature on staging and prod?

Will take up task to work on backend and then merge both the tasks.

@vinit717
Copy link
Member

How you will test your feature on staging and prod?

Will take up task to work on backend and then merge both the tasks.

So start working on the backend first

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.

Enhancement: Implement pagination for dashboard users
7 participants