feat: [FC-0047] Course progress and collapsing sections - #446
feat: [FC-0047] Course progress and collapsing sections#446volodymyr-chekyrta merged 13 commits into
Conversation
|
Thanks for the pull request, @IvanStepanok! Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
volodymyr-chekyrta
left a comment
There was a problem hiding this comment.
Good overall; please address the following feedback
| Task { | ||
| await viewModel.getCourseBlocks(courseID: courseID, withProgress: false) | ||
| } | ||
| viewModel.updateCourseProgress = false |
There was a problem hiding this comment.
The View shouldn't update Published variables; please encapsulate this logic to the VM function, let's say updateCourseIfNeeded()
| public struct CourseProgressView: View { | ||
| private var progress: CourseProgress | ||
|
|
||
| public init(progress: CourseProgress) { |
There was a problem hiding this comment.
Please remove extra space
public init(progress: CourseProgress) -> public init(progress: CourseProgress)
| } | ||
|
|
||
| .cornerRadius(10) |
There was a problem hiding this comment.
Please remove extra line
}
.cornerRadius(10)
| Button(action: { | ||
| if let chapterIndex, let sequentialIndex { | ||
| viewModel.trackSequentialClicked(sequential) | ||
| viewModel.router.showCourseVerticalView( | ||
| courseID: viewModel.courseStructure?.id ?? "", | ||
| courseName: viewModel.courseStructure?.displayName ?? "", | ||
| title: sequential.displayName, | ||
| chapters: course.childs, | ||
| chapterIndex: chapterIndex, | ||
| sequentialIndex: sequentialIndex | ||
| ) | ||
| } | ||
| }, label: { |
There was a problem hiding this comment.
Please format Button to the "each param on own line" style.
Button(
action: {
...
,
label: {
...
|
It's not really critical, but the animation works weird when there is only 1 element in it. Screen.Recording.2024-05-31.at.17.18.45.mov |
|
@volodymyr-chekyrta Thanks for the review! All requested changes have been made🙌 |
volodymyr-chekyrta
left a comment
There was a problem hiding this comment.
Looks good to me.
PR is ready for product/design review.
|
Hi @IvanStepanok, this looks great overall! A couple of design questions/feedback I wanted to check on:
Both of these are color-related, and the video compression makes it a bit ambiguous whether these colors are already being used, so I wanted to confirm |
|
Hi @sdaitzman and thanks for paying so much attention to details! |
|
Thanks so much @IvanStepanok! Just to confirm, is the download icon in dark mode using Other than that, everything looks great to me/ready to merge from a design standpoint, thanks for these updates!
|
|
Hi, @sdaitzman |
| certificate = try values.decode(Certificate.self, forKey: .certificate) | ||
| org = try values.decode(String.self, forKey: .org) | ||
| isSelfPaced = try values.decode(Bool.self, forKey: .isSelfPaced) | ||
| courseProgress = try values.decode(DataLayer.CourseProgress.self, forKey: .courseProgress) |
There was a problem hiding this comment.
please add ? after try since this parameter is optional
| : viewModel.courseStructure { | ||
|
|
||
| // MARK: - Sections | ||
| if viewModel.config.uiComponents.courseNestedListEnabled { |
There was a problem hiding this comment.
@IvanStepanok
we had logic when courseNestedListEnabled==true we skip VerticalsView and go to content directly. Could you please add the same? Thank you
|
|
||
| var controllers = navigationController.viewControllers | ||
|
|
||
| if isCourseNestedListEnabled || currentCourseTabSelection == CourseTab.dates.rawValue { |
There was a problem hiding this comment.
this condition should be present. please use new added flag here. Thank you
| viewControllers.append(try await containerController(for: holder)) | ||
| } | ||
|
|
||
| if !isNestedListEnabled && holder.selectedCourseTab != CourseTab.dates.rawValue { |
There was a problem hiding this comment.
the same here - please use here new added flag. Thank you
|
@IvanStepanok 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
* feat: course home navigation * fix: address feedback * fix: merge conflicts * fix: address feedback * fix: address feedback * fix: address feedback * fix: address feedback * fix: address feedback * fix: address feedback * fix: address feedback * fix: address feedback





Quick Preview
Screen.Recording.2024-05-31.at.18.31.30.mov
Pay attention⚠️
❌ "COURSE_NESTED_LIST_ENABLED" removed
✅ "COURSE_DROPDOWN_NAVIGATION_ENABLED" added
Old implementations in CourseStructureNestedListView.swift and CourseStructureView.swift are removed.
Design:
https://www.figma.com/design/iZ56YMjbRMShCCDxqrqRrR/Open-edX-Mobile-App-All-Screens-v2.1?node-id=9177-44208&t=kHcQmxzck33FVrAT-0