-
Notifications
You must be signed in to change notification settings - Fork 6
Add tab bar on home page #650
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
base: main
Are you sure you want to change the base?
Conversation
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 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
Copilot uses AI. Check for mistakes.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
Copilot uses AI. Check for mistakes.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
Copilot uses AI. Check for mistakes.
No description provided.