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 19 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

Comment on lines 57 to 59
// createElement('span', {}, [
// user.first_name + ' ' + user.last_name + user.username,
// ]),

Choose a reason for hiding this comment

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

can we get rid of this if not needed?

Copy link
Author

Choose a reason for hiding this comment

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

Same, this is being currently used with the actual data I have just replicated my version to test out the mock data.

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

Hey who is working on backend for this?

@prakashchoudhary07
Copy link
Contributor

@IshanVeer Is your functionality behind a feature flag?

@prakashchoudhary07
Copy link
Contributor

Tests are missing?

Comment on lines +23 to +30
export const mockUsersData = {
in_discord: [
{
id: 'user_1',
discordId: '123456789',
username: 'Alice',
avatar: 'https://placekitten.com/50/50?image=1',
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Hey so for development, using mock data was suggested.
But not to push mock data code, in the PR
Make API calls according to the contract decided
and put it behind a feature flag

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
5 participants