-
Notifications
You must be signed in to change notification settings - Fork 28
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
style: Dates Tab Shift Due Dates Success SnackBar Design Changes #264
style: Dates Tab Shift Due Dates Success SnackBar Design Changes #264
Conversation
fixes: LEARNER-9868
@@ -8,5 +8,7 @@ sealed class UIMessage { | |||
val duration: SnackbarDuration = SnackbarDuration.Long, | |||
) : UIMessage() | |||
|
|||
class DatesShiftedSnackBar : UIMessage() |
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.
What if we relocate class DatesShiftedSnackBar: UIMessage()
within the course module?
It appears unnecessary to inform the core module about Dates functionality.
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.
Inheritance of sealed classes or interfaces from different module is prohibited
, to move Dates Shifted SnackBar
into the course module need to make open
instead of sealed
.
thoughts?
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.
relocated.
@Composable | ||
fun DatesShiftedSnackBar( | ||
showAction: Boolean = false, | ||
onViewDates: () -> Unit? = {}, | ||
onClose: () -> Unit? = {}, | ||
) { |
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.
Can be moved as well to the CourseUI.kt
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.
moved.
val snackState = remember { SnackbarHostState() } | ||
if (uiMessage is UIMessage.DatesShiftedSnackBar) { | ||
LaunchedEffect(uiMessage) { | ||
snackState.showSnackbar(message = "Dates Shifted", duration = SnackbarDuration.Long) |
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.
Please move this text to resources
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.
moved.
val snackState = remember { SnackbarHostState() } | ||
if (uiMessage is UIMessage.DatesShiftedSnackBar) { | ||
LaunchedEffect(uiMessage) { | ||
snackState.showSnackbar(message = "Dates Shifted", duration = SnackbarDuration.Long) |
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.
Please move this text to resources
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.
moved.
course/src/main/java/org/openedx/course/presentation/ui/CourseUI.kt
Outdated
Show resolved
Hide resolved
modifier = Modifier | ||
.padding(top = 4.dp) | ||
.fillMaxWidth(), | ||
text = stringResource(id = org.openedx.core.R.string.core_dates_shift_dates_successfully_msg), |
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.
please move org.openedx.core.R to import import org.openedx.core.R as CoreR
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.
moved.
Description
Jira: LEARNER-9868
Github issue: [Android] Shift Dates (PLS) Design Changes