-
Notifications
You must be signed in to change notification settings - Fork 116
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
Update GraphQL Queries with Pagination #3064
Open
suhaibabsi-inst
wants to merge
16
commits into
master
Choose a base branch
from
techdebt/MBL-18026-GraphQL-Pagination
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Release Note:Update GraphQL Queries with Pagination Affected Apps: Student, Teacher
|
refs: MBL-18026 affects: Student, Teacher release note: Update GraphQL Queries with Pagination
suhaibabsi-inst
requested review from
vargaat,
szabinst,
rh12 and
ndrsszsz
as code owners
January 21, 2025 17:54
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
refs: MBL-18026
affects: Student, Teacher
release note: Update GraphQL Queries with Pagination.
What's Changed
All GraphQL queries used to fetch a list of items were modified to include paging, and those are:
1- Teacher's Comments Library for Assignment Submission.
Request type:
APICommentLibraryRequest
Used in Teacher app.
2- Assignment Picker List of Submit Assignment Extension.
Request type:
AssignmentPickerListRequest
Used in "SubmitAssignment" extension of Student app.
3- Settings page course sections list of Assignment Submissions List.
GetAssignmentPostPolicyInfoRequest
type was splitted into two separate requests:A.
GetPostPolicyCourseSectionsRequest
: was modified to include paging.B.
GetPostPolicyAssignmentSubmissionsRequest
: paging was not included, because it was used to calculate counts rather than presenting information of submissions.Used in Teacher app.
Paging Logic
New main types were introduced to encapsulate paging logic for both UIKit and SwiftUI contexts:
PagingButton
- SwiftUI View to be added to the very bottom of the list.In UIKit context, to handle paging in UITableView, you need to consider the following ones.
Paging<C>
- A presenter object used to handle paging logic inUITableView
instances, you need to create one per a table view.PageLoadingCell
- A cell that can be dequeued in UITableView with loading & call-to-action variations, to be shown based on the logic encapsulated in thePaging
instance associated with.Test Plan
1 - Teacher's Comments Library:
2 - Assignment Picker List of Submit Assignment Extension.
3- Settings page course sections list of Assignment Submissions List.
Note:
"List loading in pages" means that you get to notice loading indicator when you scroll to the very bottom of it, if loading failed "Load More" button is shown to allow user to try fetching again.
Video Recordings
1- Comments Library
case1_comments_library.mp4
2- Assignment Picker List
case2_post_policy.mp4
3- Post Policy Settings Page
case3_assignment_picker.mp4
Checklist