feat: Add Pagination to Members Page #87
feat: Add Pagination to Members Page #87
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, great!
@@ -6,6 +6,7 @@ part of 'auth_service.dart'; | |||
// ChopperGenerator | |||
// ************************************************************************** | |||
|
|||
// ignore_for_file: always_put_control_body_on_new_line, always_specify_types, prefer_const_declarations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't include generated files under git.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I approved because it's a small change but please do not forget about it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We haven't made those changes in the documentation though. So I don't think we can remove it yet in case a new contributor comes...
What do you think @bartekpacia ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bartekpacia when you need a change request you might as well, request change. because once @techno-disaster changes, you review will be dismissed
i did not expect a straight away approve lol, no need to change variable names or something? xd Thanks @bartekpacia 👍 |
@anitab-org/qa-team can anyone test this? |
The steps you mention here can be mentioned on the how has this been tested section in your PR description. |
ok. thanks |
Not from QA team just tested this out of curiosity. Works perfectly fine on my phone. Great Work! @techno-disaster |
@techno-disaster What about increasing the number of paged records? Currently it seems to have to be reloaded a bit too often. |
you mean increasing the number of members we get on screen each load? |
Exactly. |
Thats just hardcoded to 10, are you saying we should increase it? 🤔 |
@isabelcosta what do you think about this? how many members should be loaded at once? |
@techno-disaster I have no idea what the criteria should be for deciding this number. @bartekpacia any idea? If in doubt, we can ask for help. @annabauza mind to give your opinion here? |
We could give the user the option, but considering what kind of app this is and what its purpose is, it feels a bit irrelevant also giving users technical options would confuse them i think |
Loading more number of users would obviously need more time to load. and the app kinda already feels slow, IMHO 10 is a good number. 15 looks good too |
I'd load 20-25. The app will get faster in the future as we'll improve it. Fetching just 10 users doesn't solve the problem of slowness. |
Here's how 30 looks. IMO 30 looks a bit slow cc: @isabelcosta @bartekpacia @annabauza |
@isabelcosta @bartekpacia @annabauza any updates? I attached a load 30 members per page video above for refrence |
@bartekpacia @techno-disaster My vote goes to 20, its a middle between 10 (too fast) and 30 (too slow). |
I am good with 20 too :) Waiting for one more opinion, will update PR then |
Small update, I was running this on the debug app version which is slower than the actual release apk. @bartekpacia what do you think we should go with? |
Let's stick with 20 :) |
Hey I'd love to gove you guys some input on this, this is kinda wrong way to do it! Why dont you guys do something like:
I've been using this, its a gud pattern i guess! It lets me define different limits for different things, like when i want to search for people i put limit to null and Put data returned in an infinite scroll. For when a user search in like a emailing box, it shows like 10-20 or so. What you guys say? |
Currently we only have a /users/verified endpoint from which we get the list and don't need it anywhere else apart from the members page. Also the backend team plans to change this soon, they are planning to change how users are sent, I'm not sure though and this might change how we fetch user list on the app, so I think we can write this part after thats done. .Maybe @isabelcosta could help you with this. Thanks for your update thought 👍😀 |
Updated code, app now loads 20 members per page. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good :)
…ip-flutter into issue-85-add-pagination
@anitab-org/qa-team can anyone test this PR, so we can consider it "Ready to Merge" if all goes well :) |
@isabelcosta I bet you meant |
@bartekpacia you correct! I just edited this :P |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes made in this PR were tested locally. Following are the results:
-
Code review - Done
-
All possible responses were tested as below:
Expected Result: The Members list cannot be scrolled fully. It'll only show the first 10 users.
Actual Result: Same as expected.Screenshot/gif/url:
Expected Result: The Members list can be scrolled fully and we can navigate the whole list now.
Actual Result: Same as expected. -
Additional testcases covered: N/A
-
Additional Comments: N/A
-
Status of PR Changed to: Changed from
Needs Review
toReady to Merge
-
Android Version: 9.0, Device: Android Emulator Pixel API 28
@isabelcosta looks like its ready to be merged 👀 |
Awesome @techno-disaster and @foongminwong 👏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great contribution @techno-disaster 👏 🎉
Description
Add Pagination to load the members list on members page
Fixes #85
Flutter Channel:
Type of Change:
Delete irrelevant options.
Code/Quality Assurance Only
How Has This Been Tested?
Physical Device.
Steps :
Go to members page and scroll down too see if pagination works as required.
Checklist:
Delete irrelevant options.
Code/Quality Assurance Only