Skip to content

Conversation

@islam-abdel-halem
Copy link
Collaborator

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.

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
@islam-abdel-halem islam-abdel-halem merged commit 1d23063 into WAHID-QANDIL:main Jun 18, 2025
1 check passed
Copy link
Contributor

Copilot AI left a 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

Comment on lines +36 to +38
// splashScreen.setKeepOnScreenCondition {
// false
// }
Copy link

Copilot AI Jun 18, 2025

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.

Suggested change
// splashScreen.setKeepOnScreenCondition {
// false
// }

Copilot uses AI. Check for mistakes.
Text(instructor.title, style = MaterialTheme.typography.bodyMedium, color = Color.Gray)
}
}
TextButton(onClick = onToggleFollow, colors = ButtonDefaults.textButtonColors(contentColor = MahdELearningPlatformTheme.colors.primary) // Corrected line
Copy link

Copilot AI Jun 18, 2025

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.

Suggested change
TextButton(onClick = onToggleFollow, colors = ButtonDefaults.textButtonColors(contentColor = MahdELearningPlatformTheme.colors.primary) // Corrected line
TextButton(onClick = onToggleFollow, colors = ButtonDefaults.textButtonColors(contentColor = MahdELearningPlatformTheme.colors.primary)

Copilot uses AI. Check for mistakes.
Copy link
Owner

@WAHID-QANDIL WAHID-QANDIL left a comment

Choose a reason for hiding this comment

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

good

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