Skip to content

Add tab bar on home page - #650

Draft
Akula112233 wants to merge 2 commits into
mainfrom
kaushik/homepage-redesign-rb1
Draft

Add tab bar on home page#650
Akula112233 wants to merge 2 commits into
mainfrom
kaushik/homepage-redesign-rb1

Conversation

@Akula112233

Copy link
Copy Markdown
Contributor

No description provided.

@Akula112233
Akula112233 marked this pull request as draft September 28, 2025 18:55

Copilot AI left a comment

Copy link
Copy Markdown

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.

Comment on lines +4 to +5
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.vector.ImageVector

Copilot AI Sep 28, 2025

Copy link

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.

Suggested change
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

Copilot AI Sep 28, 2025

Copy link

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.

Suggested change
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

Copilot AI Sep 28, 2025

Copy link

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.

Suggested change
val lastPaddingEnd = if (index == homeSlidingToolbarItems.size - 1) 12.dp else 0.dp

Copilot uses AI. Check for mistakes.
@anli5005
anli5005 force-pushed the kaushik/homepage-redesign-rb1 branch from e65c142 to 7246a06 Compare June 6, 2026 06:09
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