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

[ETH-1756] Mobile MVP Bugs - Course Cards #4

Merged
merged 3 commits into from
Sep 26, 2024

Conversation

saksham115
Copy link
Member

@saksham115 saksham115 commented Sep 25, 2024

Adding course effort and course number to appear on the course cards

{D09E6704-2DBA-40C9-A00F-5CCDEB3B9D6B}

@saksham115 saksham115 changed the title feat: Adding the course number and course effort on the course cards [ETH-1756] Mobile MVP Bugs - Course Cards Sep 25, 2024
@@ -445,6 +456,42 @@ private fun CourseItem(
maxLines = 2,
overflow = TextOverflow.Ellipsis
)
Spacer(modifier = Modifier.height(4.dp))
if (enrolledCourse.course.number.isNotEmpty()) {
Copy link
Member

Choose a reason for hiding this comment

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

The course.number cannot be empty at all, there's no need for this check

Comment on lines 460 to 475
if (enrolledCourse.course.number.isNotEmpty()) {
Row(
Modifier
.fillMaxWidth()
.background(MaterialTheme.appColors.background),
verticalAlignment = Alignment.CenterVertically,
) {
Text(
modifier = Modifier.testTag("txt_course_number"),
text = enrolledCourse.course.number,
color = MaterialTheme.appColors.textFieldHint,
style = MaterialTheme.appTypography.labelMedium
)
}
Spacer(modifier = Modifier.height(4.dp))
}
Copy link
Member

Choose a reason for hiding this comment

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

Instead of a row just for the course number, it can be added to the org text, the same as the web app.
image

--- a/dashboard/src/main/java/org/openedx/dashboard/presentation/DashboardFragment.kt
+++ b/dashboard/src/main/java/org/openedx/dashboard/presentation/DashboardFragment.kt
@@ -437,7 +437,7 @@ private fun CourseItem(
             ) {
                 Text(
                     modifier = Modifier.testTag("txt_course_org"),
-                    text = enrolledCourse.course.org,
+                    text = enrolledCourse.course.org+"+"+enrolledCourse.course.number,
                     color = MaterialTheme.appColors.textFieldHint,
                     style = MaterialTheme.appTypography.labelMedium
                 )
Suggested change
if (enrolledCourse.course.number.isNotEmpty()) {
Row(
Modifier
.fillMaxWidth()
.background(MaterialTheme.appColors.background),
verticalAlignment = Alignment.CenterVertically,
) {
Text(
modifier = Modifier.testTag("txt_course_number"),
text = enrolledCourse.course.number,
color = MaterialTheme.appColors.textFieldHint,
style = MaterialTheme.appTypography.labelMedium
)
}
Spacer(modifier = Modifier.height(4.dp))
}

@saksham115
Copy link
Member Author

Updated the design @viadanna

fixed-course-card

Copy link
Member

@viadanna viadanna left a comment

Choose a reason for hiding this comment

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

Approved 👍

  • I tested this locally.
  • I read through the code.
  • I checked for accessibility issues.

@viadanna viadanna merged commit fc84b63 into eshe-mvp Sep 26, 2024
2 checks passed
@viadanna viadanna deleted the saksham115/course-cards branch September 26, 2024 19:24
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.

2 participants