-
Notifications
You must be signed in to change notification settings - Fork 1
Implement course details feature #21
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
Conversation
Adds the core components for the course details screen. - Creates `CourseDetailsScreen.kt` for the main user interface. - Implements `CourseDetailsViewModel.kt` to manage the screen's logic and data. - Defines `CourseDetailsUIState.kt` for state representation. - Adds `course_details_image.jpg` and `instructor_sarah.xml` as visual assets. - Modifies `MainActivity.kt` to handle navigation to the new screen.
# Conflicts: # app/src/main/java/org/mahd_e_learning_platform/presentation/MainActivity.kt # app/src/main/res/values/strings.xml
# Conflicts: # app/src/main/java/org/mahd_e_learning_platform/presentation/MainActivity.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.
Pull Request Overview
This PR implements a new course details feature by introducing a dedicated screen, view model, and UI state along with supporting assets and navigation updates.
- Adds CourseDetailsScreen.kt to display course details using Jetpack Compose.
- Implements CourseDetailsViewModel.kt and CourseDetailsUiState.kt for business logic and state representation.
- Updates MainActivity.kt to handle navigation and integrates visual assets.
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| app/src/main/res/values/strings.xml | Added string resource for "Course Details" |
| app/src/main/res/drawable/instructor_sarah.xml | Introduced a new vector drawable asset for the instructor image |
| app/src/main/java/org/mahd_e_learning_platform/presentation/screens/course_details/CourseDetailsViewModel.kt | Created a view model with toggle functionality and placeholder TODOs |
| app/src/main/java/org/mahd_e_learning_platform/presentation/screens/course_details/CourseDetailsUiState.kt | Defined UI state data classes for the course details screen |
| app/src/main/java/org/mahd_e_learning_platform/presentation/screens/course_details/CourseDetailsScreen.kt | Built the UI components and layout in Jetpack Compose |
| app/src/main/java/org/mahd_e_learning_platform/presentation/MainActivity.kt | Updated navigation logic and removed commented splash screen code |
| // splashScreen.setKeepOnScreenCondition { | ||
| // false | ||
| // } |
Copilot
AI
Jun 18, 2025
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.
Consider removing commented-out splashScreen.setKeepOnScreenCondition code if it is no longer needed to maintain a clean codebase.
| // splashScreen.setKeepOnScreenCondition { | |
| // false | |
| // } |
| Text(instructor.title, style = MaterialTheme.typography.bodyMedium, color = Color.Gray) | ||
| } | ||
| } | ||
| TextButton(onClick = onToggleFollow, colors = ButtonDefaults.textButtonColors(contentColor = MahdELearningPlatformTheme.colors.primary) // Corrected line |
Copilot
AI
Jun 18, 2025
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.
[nitpick] Remove the inline comment '// Corrected line' from the TextButton declaration to keep the production code clean and clear.
| TextButton(onClick = onToggleFollow, colors = ButtonDefaults.textButtonColors(contentColor = MahdELearningPlatformTheme.colors.primary) // Corrected line | |
| TextButton(onClick = onToggleFollow, colors = ButtonDefaults.textButtonColors(contentColor = MahdELearningPlatformTheme.colors.primary) |
WAHID-QANDIL
left a comment
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.
good
Adds the core components for the course details screen.
CourseDetailsScreen.ktfor the main user interface.CourseDetailsViewModel.ktto manage the screen's logic and data.CourseDetailsUIState.ktfor state representation.course_details_image.jpgandinstructor_sarah.xmlas visual assets.MainActivity.ktto handle navigation to the new screen.