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

1166: Migration to Paging3 for MembersFragment #1221

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

Conversation

bosankus
Copy link

@bosankus bosankus commented Oct 4, 2022

Description

  • Currently the app is using a custom endless recycler view listener, which is replaced by Android Jetpack Paging 3 in this PR. The benefits are added below in a image as per the source

Screenshot 2022-10-04 at 10 22 29 AM

Fixes #1166

Type of Change:

  • Room and Paging 3 dependencies added.
  • Version upgrades were done on kotlin to support room & paging 3.
  • Methods added/altered in UserDataManager to get paged data from room handled by new class UserRemoteMediator.
  • FilterActivity removed as now filtering is done via ExtendedFloatingActionButton onClick. See details here.
  • Previous implementation of paging data is removed, which won't be used after using paging3.
  • New BindingUtil added for showing data on UI in list_member_item.xml.
  • Few spotless changes were done using command ./gradlew sA.
  • Few TAGs were removed which had no use and warning came during commit.

Code/Quality Assurance Only

  • New feature (non-breaking change which adds functionality pre-approved by mentors)

How Has This Been Tested?

  • This is a draft PR and yet to be tested.

Checklist:

  • My PR follows the style guidelines of this project
  • I have performed a self-review of my own code or materials
  • I have commented my code or provided relevant documentation, particularly in hard-to-understand areas

Code/Quality Assurance Only

  • My changes generate no new warnings
  • My PR currently breaks something (fix or feature that would cause existing functionality to not work as expected)
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

bosankus and others added 7 commits December 2, 2021 10:03
- Upon scroll MemberLoadingStateAdapter will show loading list or any error, with retry button to fetch further list.
- list items are bind to UI now using databinding. See BindingUtils.kt
- strings.xml have new additions.
- pbMember progress bar removed from fragment_members.xml
- yet to clean to codebase, and remove redundant methods.
…embersViewModel.kt

- local package: Room db created
- RemoteMediator added for fetching & storing data from remote to local room db.
- solved null check errors due to change of 'id' field in User.kt is changed to non-null
- compileSdk and targetSdk, Kotlin, paging library versions updated. Supports latest version of room
- Room dependencies added - Dependencies.kt
- solved errors caused due to change in UserDataManager.kt class parameters.
- Injection.kt added for injecting UserDataManager.kt to dependent classes
- fixed the crash due to passing null data from MembersFragment.kt to MemberProfileActivity.kt
- removed unused method from UserDataManager.kt
- removed unused code and imports from MembersViewModel.kt
- changed items per page to 50
- fixed spotless isssues.
@bosankus bosankus changed the title 1166: Paging3 member list 1166: Migration to Paging3 for MembersFragment Oct 4, 2022
@bosankus
Copy link
Author

The existing filter feature on member list was not working, and after implementinig paging3 , it is found that there is a issue with sorting and filtering the list. Refer here : https://issuetracker.google.com/issues/175430431. I am trying work around for this filtering feature at this moment, which will solve this issue.

@bosankus
Copy link
Author

bosankus commented Oct 17, 2022

@vj-codes @isabelcosta Two points I would like to raise: Please review this and this PR kindly.

  • The existing filter feature on member list was not working, and after implementinig paging3 , it is found that there is a issue with sorting the paged list. Refer to the issue raised here please : https://issuetracker.google.com/issues/175430431.

  • Filtering list as per skills, interest & location will be moved to changes made on Member search fragment.

Please share feedback on this

@bosankus bosankus marked this pull request as ready for review October 17, 2022 07:01
@bosankus bosankus requested a review from isabelcosta as a code owner October 17, 2022 07:01
@bosankus
Copy link
Author

@vj-codes A check is failing, however I am unable to understand what change to do. It's regarding collision of two kotlin-stdlib versions, but i removed the dependency since its deprecated. Still the same.

@bosankus
Copy link
Author

bosankus commented Nov 6, 2022

Hi @isabelcosta @vj-codes Can you please review ?

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.

Use paging 3 for members list
1 participant