talawa-api
talawa-api copied to clipboard
Add more options to UserOrderByInput
Is your feature request related to a problem? Please describe. Implement more options to filter for users
Describe the solution you'd like
Add options like created_ASC
and created_DESC
to UserOrderByInput
Currently:
Additional context
Users are fetched on frontend in different sets, example $first:10
but API has no option to fetch Newest first or Oldest first, whereas Admin panel has the filtering on frontend which messes up the order.
Reference: PalisadoesFoundation/talawa-admin#1706
Potential internship candidates Please read this if you are planning to apply for a Palisadoes Foundation internship https://github.com/PalisadoesFoundation/talawa/issues/359
I would like to work on this
@pranshugupta54 @Huy1996 @palisadoes There is no need of adding more filtering options.
https://github.com/PalisadoesFoundation/talawa-api/assets/87270395/14add95e-1436-4ebf-8367-fa951cbfc0da
Out of all the fetched users the sortUsers function in User.tsx sorts all the user on basis of time at which they were created.
So, I think there is no need to add an option to fetch Newest first or Oldest first users.
Please provide your thoughts on this.
@rahulch07, check this - https://www.loom.com/share/5c39a600c172446fbb3c8fb6d2a7c30c?sid=47b71f0e-3566-4512-9dbe-31b7538aac37
So basically at first, backend sends us 12 users then frontend sorts it. Then on scrolling, backend sends us new 12 users so total 24 users and now frontend sorts them.
But backend doesn't send them in sorted order, so if we want NewestFirst then backend should send sorted 12 itself.
But is this the intended design goal? @Huy1996 @palisadoes Please clarify.
The infinite scroll design is intended but the data is incorrect. If user selects Newest then we should get newest sequence from all existing users and not only those 12 users
@pranshugupta54 @Huy1996
Is this the expected result?
https://github.com/PalisadoesFoundation/talawa-api/assets/87270395/d2c2a643-bb28-4186-9cd8-1a30bc6195d8
Scrolling is smooth and do not jump to last user
Yes looks good now, the data doesn't change on scrolling
UserThirtySix is the latest added user then UserThirtyFive and so on, therefore UserThirtySix appears first on newest. Similarly for oldest it goes last
This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.
Making PR soon.
Working on test cases
This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.
Unassigning due no activity or open PR
@Cioppolo14 I was not able to make a PR as I was working on another issue. Please reassign me I will open a PR this week. Thanks
This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.
working on it
This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.