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

feat: Course Level Error Handling for Empty States #12

Merged

Conversation

farhan-arshad-dev
Copy link
Member

Description

Course Level Error Handling for Empty States

  • Empty state for Home, Videos, Dates, and Discussion tabs.
  • Empty state for handouts, and Announcements screen.

Tickets

Home Tab Video Tab Dates Tab
Discussion Tab Handouts Screen Announcements Screen

- Empty state for Home, Videos, Dates, and Discussion tabs.
- Empty state for handouts, and Announcements screen.

fixes: LEARNER-10039
Copy link
Collaborator

@k1rill k1rill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one question

@@ -224,6 +227,10 @@ private fun CourseOutlineUI(
Box {
when (uiState) {
is CourseOutlineUIState.CourseData -> {
if (uiState.courseStructure.blockData.isEmpty()) {
NoContentScreen(noContentScreenType = NoContentScreenType.COURSE_OUTLINE)
return@Surface
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange to se return inside compose

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NoContentScreen is a fullscreen error, so we don't want to show other content, so if the dates are empty return the flow, after showing the No content screen.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid that return will broke a compose tree, can you please use else in the CourseOutlineUIState.CourseData

@k1rill k1rill self-requested a review July 22, 2024 07:02
Copy link
Collaborator

@k1rill k1rill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove return from compose

@farhan-arshad-dev farhan-arshad-dev merged commit 19666eb into edx:2U/develop Jul 22, 2024
4 checks passed
@farhan-arshad-dev farhan-arshad-dev deleted the farhan_ar/LEARNER-10039 branch July 22, 2024 08:14
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.

4 participants