Skip to content

Add volume slider in player controls sheet#1492

Merged
GianniCarlo merged 1 commit intodevelopfrom
feat/volume-slider
Mar 24, 2026
Merged

Add volume slider in player controls sheet#1492
GianniCarlo merged 1 commit intodevelopfrom
feat/volume-slider

Conversation

@GianniCarlo
Copy link
Collaborator

Purpose

  • Add volume slider to player controls

Copy link

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

Adds a system volume slider to the player controls sheet, alongside the existing “Boost Volume” toggle, and updates strings across supported locales.

Changes:

  • Introduces SystemVolumeSlider (SwiftUI wrapper around MPVolumeView) and displays it in the controls sheet.
  • Renames/reworks the boost volume section into a combined “Volume” section.
  • Adds the new player_volume_title localization key across all localized Localizable.strings files.

Reviewed changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
BookPlayer/zh-Hans.lproj/Localizable.strings Adds player_volume_title translation (Simplified Chinese).
BookPlayer/uk.lproj/Localizable.strings Adds player_volume_title translation (Ukrainian).
BookPlayer/tr.lproj/Localizable.strings Adds player_volume_title translation (Turkish).
BookPlayer/sv.lproj/Localizable.strings Adds player_volume_title translation (Swedish).
BookPlayer/sk-SK.lproj/Localizable.strings Adds player_volume_title translation (Slovak).
BookPlayer/ru.lproj/Localizable.strings Adds player_volume_title translation (Russian).
BookPlayer/ro.lproj/Localizable.strings Adds player_volume_title translation (Romanian).
BookPlayer/pt-PT.lproj/Localizable.strings Adds player_volume_title translation (Portuguese - Portugal).
BookPlayer/pt-BR.lproj/Localizable.strings Adds player_volume_title translation (Portuguese - Brazil).
BookPlayer/pl.lproj/Localizable.strings Adds player_volume_title translation (Polish).
BookPlayer/nl.lproj/Localizable.strings Adds player_volume_title translation (Dutch).
BookPlayer/nb.lproj/Localizable.strings Adds player_volume_title translation (Norwegian Bokmål).
BookPlayer/ja.lproj/Localizable.strings Adds player_volume_title translation (Japanese).
BookPlayer/it.lproj/Localizable.strings Adds player_volume_title translation (Italian).
BookPlayer/hu.lproj/Localizable.strings Adds player_volume_title translation (Hungarian).
BookPlayer/fr.lproj/Localizable.strings Adds player_volume_title translation (French).
BookPlayer/fi.lproj/Localizable.strings Adds player_volume_title translation (Finnish).
BookPlayer/es.lproj/Localizable.strings Adds player_volume_title translation (Spanish).
BookPlayer/en.lproj/Localizable.strings Adds player_volume_title (English).
BookPlayer/el.lproj/Localizable.strings Adds player_volume_title translation (Greek).
BookPlayer/de.lproj/Localizable.strings Adds player_volume_title translation (German).
BookPlayer/da.lproj/Localizable.strings Adds player_volume_title translation (Danish).
BookPlayer/cs.lproj/Localizable.strings Adds player_volume_title translation (Czech).
BookPlayer/ca.lproj/Localizable.strings Adds player_volume_title translation (Catalan).
BookPlayer/ar.lproj/Localizable.strings Adds player_volume_title translation (Arabic).
BookPlayer/Base.lproj/Localizable.strings Adds base player_volume_title key.
BookPlayer/Player/Views/Controls/SystemVolumeSlider.swift New UIViewRepresentable wrapping MPVolumeView for system volume control.
BookPlayer/Player/Views/Controls/PlayerControlsVolumeSectionView.swift Renames/extends section to include a “Volume” header + system volume slider + existing boost toggle.
BookPlayer/Player/Views/Controls/PlayerControlsView.swift Wraps content in ScrollView, inserts the new volume section, and updates toolbar buttons.
BookPlayer.xcodeproj/project.pbxproj Registers new Swift file in build sources and updates the renamed view file reference.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

.padding(.horizontal, Spacing.M)
.padding(.vertical, Spacing.S)
.background(theme.systemBackgroundColor)
.toolbarColorScheme(theme.useDarkVariant ? .dark : .light, for: .navigationBar)
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

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

PlayerControlsView no longer applies .tint(theme.linkColor) at the container level, and PlayerControlsSpeedSectionView's Slider doesn’t set a tint explicitly. This will cause the speed slider (and any other tint-driven controls in this sheet) to fall back to the system accent color instead of the app theme. Consider reintroducing a container-level .tint(theme.linkColor) (or tinting the specific controls like the Slider) to keep theming consistent with other themed screens (e.g. AudiobookShelfRootView uses .tint(theme.linkColor)).

Suggested change
.toolbarColorScheme(theme.useDarkVariant ? .dark : .light, for: .navigationBar)
.toolbarColorScheme(theme.useDarkVariant ? .dark : .light, for: .navigationBar)
.tint(theme.linkColor)

Copilot uses AI. Check for mistakes.
Comment on lines +60 to +66
ToolbarItem(placement: .cancellationAction) {
Button {
dismiss()
} label: {
Image(systemName: "xmark")
.foregroundStyle(theme.linkColor)
}
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

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

The close button was changed from a localized text button ("done_title") to an icon-only xmark. As-is, the button has no explicit accessibility label, which can be a VoiceOver regression compared to the previous text label. Add an .accessibilityLabel(...) (e.g. using an existing localized "close"/"done" key) so the action is announced clearly.

Copilot uses AI. Check for mistakes.
@GianniCarlo GianniCarlo merged commit f65dc81 into develop Mar 24, 2026
5 checks passed
@GianniCarlo GianniCarlo deleted the feat/volume-slider branch March 24, 2026 15:29
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