-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
caa9f37
to
e2c4e46
Compare
e2c4e46
to
d0021eb
Compare
@@ -445,6 +456,42 @@ private fun CourseItem( | |||
maxLines = 2, | |||
overflow = TextOverflow.Ellipsis | |||
) | |||
Spacer(modifier = Modifier.height(4.dp)) | |||
if (enrolledCourse.course.number.isNotEmpty()) { |
There was a problem hiding this comment.
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
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)) | ||
} |
There was a problem hiding this comment.
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.
--- 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
)
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)) | |
} |
fc0a03d
to
15f5805
Compare
Updated the design @viadanna |
There was a problem hiding this 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.
Adding course effort and course number to appear on the course cards