Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds a horizontal scrollable tab bar to the home page that displays quick access buttons for various app features like Dining, GSR, Laundry, News, Contacts, and Fitness.
- Added a new Compose-based sliding toolbar component with feature icons and navigation
- Integrated the toolbar into the home fragment layout with click handling for navigation
- Added necessary color resources and UI elements to support the new tab bar
Reviewed Changes
Copilot reviewed 6 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| colors.xml | Adds dark mode background color for the new toolbar |
| fragment_home.xml | Integrates ComposeView for the new toolbar and adjusts layout positioning |
| HomeFragment.kt | Sets up toolbar content and implements navigation logic for feature clicks |
| HomeSlidingToolbarElement.kt | Defines data class for toolbar items with icon and title properties |
| MainActivity.kt | Adds LAUNDRY_ID constant for navigation |
| HomeSlidingToolbar.kt | Implements the complete Compose UI for the sliding toolbar with feature items |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| import androidx.compose.ui.graphics.Color | ||
| import androidx.compose.ui.graphics.vector.ImageVector |
There was a problem hiding this comment.
These imports for Color and ImageVector are unused in the data class. They should be removed to keep the imports clean.
| import androidx.compose.ui.graphics.Color | |
| import androidx.compose.ui.graphics.vector.ImageVector |
| import androidx.compose.ui.unit.sp | ||
| import androidx.preference.PreferenceManager | ||
| import com.pennapps.labs.pennmobile.R | ||
| import com.pennapps.labs.pennmobile.data_classes.HomeSlidingToolbarElement |
There was a problem hiding this comment.
This import references the incorrect package name. It should be com.pennapps.labs.pennmobile.home.classes.HomeSlidingToolbarElement to match the actual file location.
| import com.pennapps.labs.pennmobile.data_classes.HomeSlidingToolbarElement | |
| import com.pennapps.labs.pennmobile.home.classes.HomeSlidingToolbarElement |
| onFeatureClick: (Int) -> Unit | ||
| ) { | ||
| val feature = homeSlidingToolbarItems[index] | ||
| val lastPaddingEnd = if (index == homeSlidingToolbarItems.size - 1) 12.dp else 0.dp |
There was a problem hiding this comment.
The variable lastPaddingEnd is declared but never used. It should either be applied to the layout or removed if not needed.
| val lastPaddingEnd = if (index == homeSlidingToolbarItems.size - 1) 12.dp else 0.dp |
No description provided.