Skip to content

Feat/navbar styling updates#106

Merged
theovilardo merged 15 commits intomasterfrom
feat/navbar-styling-updates
Sep 2, 2025
Merged

Feat/navbar styling updates#106
theovilardo merged 15 commits intomasterfrom
feat/navbar-styling-updates

Conversation

@theovilardo
Copy link
Copy Markdown
Owner

No description provided.

google-labs-jules bot and others added 15 commits September 1, 2025 03:49
…lt and Full Width.

The "Full Width" style extends the navigation bar to the edges of the screen and modifies the corner radius of the mini-player.

Changes include:
- Added a new preference in UserPreferencesRepository for the nav bar style.
- Updated SettingsViewModel and PlayerViewModel to handle the new preference.
- Added a new selector in SettingsScreen to choose the style.
- Implemented the conditional logic for padding and corner radii in UnifiedPlayerSheet.
…on bar style was applied to the outer container instead of the inner content.

This change moves the bottom inset padding to the inner `Row` of navigation items, but only for the 'Full Width' style. This ensures that the navigation bar's background extends to the bottom of the screen while preventing the navigation items from being obscured by the system navigation bar.
Instead of applying padding to the inner row of items, the container's vertical alignment is now changed. For the 'Full Width' style, the navigation items are top-aligned within the container. This allows the container's background to extend to the bottom of the screen while ensuring the navigation items are positioned correctly above the system navigation bar, without altering their own height.
…an external bottom margin, preventing it from sitting flush against the bottom of the screen.

This change makes the `collapsedStateBottomMargin` in `MainActivity` conditional on the selected `navBarStyle`. For the 'Full Width' style, this margin is now 0dp, allowing the `UnifiedPlayerSheet` to extend to the screen edge as intended.
- The collapsed mini-player now has a horizontal margin of 14.dp.
- The navigation items within the full-width bar now have a top padding of 10.dp to provide some spacing from the top edge.
- The navigation bar now correctly has 0.dp horizontal padding.
- The collapsed mini-player retains its 14.dp horizontal padding.

This is achieved by introducing a separate padding variable for the navigation bar within the UnifiedPlayerSheet, ensuring each component is styled correctly according to the user's requirements.
… improve visual spacing.

- A top padding of 4.dp and a bottom padding of 8.dp are applied to the row of navigation items.
…dding for the 'Full Width' style.

- `NavBarContentHeight` is increased to 74.dp.
- The top padding for the navigation items in 'Full Width' mode is increased to 14.dp.
…isible.

Instead of `CircleShape`, the navigation bar now uses a `RoundedCornerShape` with 32.dp top corners and 0.dp bottom corners. This provides a more integrated look with the rest of the UI.
…yer is visible in 'Full Width' mode.

The previous radius was too large (60.dp), making the corners look overly rounded. This has been changed to 22.dp for a more subtle and visually pleasing appearance.
…h' style based on detailed feedback.

- The mini-player's top and bottom corners are now 32.dp when collapsed.
- The navigation bar's bottom corners are now 0.dp when the mini-player is visible.
This commit removes unused imports of `NavBarStyle` from several files and organizes existing ones.

It also introduces `NavBarContentHeightFullWidth` in `PlayerInternalNavigationBar.kt` to define a specific height for the navigation bar when `navBarStyle` is `FULL_WIDTH`. This value is then used to set the height of the `Box` composable within `PlayerInternalNavigationBar`.

In `SettingsScreen.kt`, the `Spacer` preceding the "NavBar Corner Radius" setting is now conditionally rendered, only appearing if `navBarStyle` is `DEFAULT`.
This commit introduces several refinements to the navigation bar's styling and behavior based on the selected `navBarStyle`.

- The `NavBarContentHeight` constant has been updated from `74.dp` to `66.dp` as requested.
- The height of the navigation bar is now dynamically calculated. It correctly uses `NavBarContentHeight` (66.dp) for the `DEFAULT` style and `NavBarContentHeightFullWidth` (84.dp) for the `FULL_WIDTH` style. This logic is applied in both `PlayerInternalNavigationBar.kt` and `UnifiedPlayerSheet.kt` to ensure consistent behavior.
- Conditional corner radius styling has been implemented for the `DEFAULT` mode. When the mini-player is not visible, the navigation bar now has 32.dp top corners and 0.dp bottom corners. For the `FULL_WIDTH` style in the same state, it becomes a sharp rectangle.
- When the mini-player is visible, the navigation bar's shape and animation are preserved as they were.
This commit addresses the user's feedback on the previous change. The navigation bar in `DEFAULT` mode will now become fully rounded (60.dp on all corners) when the mini-player is not visible.

- The `conditionalShape` logic in `UnifiedPlayerSheet.kt` has been updated to apply `RoundedCornerShape(60.dp)` when `navBarStyle` is `DEFAULT` and `showPlayerContentArea` is false.
- This creates the desired 'pill' shape when the player is inactive but reverts to the previous animated shape when a song is playing.
- The behavior for `FULL_WIDTH` mode remains unchanged.
This commit addresses a positioning issue with the mini-player in full-width mode.

When the main navigation bar is hidden on certain screens (e.g., Settings), and the nav bar style is set to 'full-width', the mini-player would appear too low, partially obscured by the system navigation bar. This change introduces conditional bottom padding to prevent this.

- In `MainActivity.kt`, the logic for `actualCollapsedStateBottomMargin` is updated.
- If the `navBarStyle` is `FULL_WIDTH` and the navigation bar is hidden, a bottom margin equal to the system navigation bar inset is applied to `UnifiedPlayerSheet`.
- This pushes the mini-player up, ensuring it remains fully visible.
@theovilardo theovilardo merged commit 304211e into master Sep 2, 2025
@theovilardo theovilardo deleted the feat/navbar-styling-updates branch September 2, 2025 00:01
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.

1 participant