Commit Graph

2766 Commits

Author SHA1 Message Date
Arkadiusz Fal
71dd956f18 Show left-column icon and title for Home and Sidebar settings on tvOS 2026-04-18 20:38:01 +02:00
Arkadiusz Fal
e2f3107833 Use menu-style pickers in tvOS settings
Introduce PlatformMenuPicker that wraps short-option pickers in
LabeledContent + .pickerStyle(.menu) on tvOS so they render as a
compact dropdown instead of pushing a full-screen option list. On
iOS/macOS it falls through to a plain Picker, leaving rendering
unchanged.

Applied across Playback, Subtitles, Sidebar, Privacy, and Advanced
settings. Long language lists in PlaybackSettingsView are left as
push-style.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
df232ad69a Rework tvOS Subscriptions view as two-column layout
Replace the tvOS Subscriptions header (All Channels link + View Options
button) with a left-column channels sidebar that filters the feed in
place, and move view options into a button at the top of the sidebar.
Drops the channel strip size picker from the tvOS options sheet since
the strip does not apply there, and mirrors the ContinueWatchingView
focus pattern so initial focus and post-filter focus land on the first
video row.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
f52ece330e Resize TV controls 2026-04-18 20:38:01 +02:00
Arkadiusz Fal
033c93e542 Make Subscriptions view focusable on tvOS
Move the channel-link button and View Options into a top safe-area inset
on tvOS so they are reachable with the remote, mirroring the Continue
Watching pattern. Wrap chrome and content in focus sections with a
default-focus namespace so initial focus lands on the first video. Hide
the duplicate in-content section header on tvOS, and add
scrollClipDisabled to VideoListContainer so focus scaling on rows is
not clipped at the scroll edges.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
70a5375b7e Focus first video by default in Continue Watching on tvOS
Use @FocusState with programmatic assignment on appear instead of
prefersDefaultFocus, which is broken when the target sits inside a
ScrollView/LazyVGrid on tvOS. A 0.15s delay gives the grid time to
materialize cells before the focus write.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
65724ae201 Extract TVSidebarDetailContainer to its own file
Now used by multiple tvOS tabs beyond Settings, so move it out of
SettingsView.swift into Views/Components/ where reusable view primitives
live.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
68ab994798 Drop redundant navigation titles in tvOS Open URL and Remote Control
The sidebar decoration added by TVSidebarDetailContainer already shows
the screen title, so the navigation title would duplicate it on tvOS.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
a6cfccf5ed Make Continue Watching view focusable on tvOS
Replace the toolbar-based controls with an inline header row on tvOS so
the View Options and clear buttons are reachable with the remote. Drop
the navigation title, add an inline title, and disable ScrollView
clipping so the focus scale effect isn't clipped.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
b8390577cc Rename TVSettingsContainer to TVSidebarDetailContainer
The container is now used beyond settings (Open URL and Remote Control
tabs), so the name is broadened to reflect its general role as a
tvOS sidebar-decorated detail container.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
29e8d64c35 Use settings container layout for tvOS Open URL and Remote Control
Wrap OpenLinkView and RemoteControlContentView in TVSettingsContainer on
tvOS so they get the same left sidebar with large SF Symbol icon and
title as settings detail screens, for visual consistency.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
82a8ac2afa Fix storyboard downloads with yattee-server direct YouTube URLs
yattee-server returns direct YouTube CDN URLs in the storyboard `url`
and `templateUrl` fields instead of an Invidious-style VTT proxy path.
Two resulting issues:

- `Storyboard.directSheetURL` was replacing the whole `M$M` token with
  just the index, producing `.../0.jpg` (404) instead of `.../M0.jpg`.
  Replace `M$M` with `M\(index)` to preserve the literal `M` prefix;
  matching the full token also avoids clobbering `$M` sequences that
  may appear in `sigh=rs$...` query params.
- The download code fetched `proxyUrl` as if it were a WebVTT file;
  with yattee-server that downloads a JPEG that fails UTF-8 parsing.
  Skip the VTT round-trip when `proxyUrl` obviously points at an image.

Also align the on-disk filename with the local-playback template
(`sb_M$M.jpg` → `sb_M{N}.jpg`) so offline seek-bar previews resolve,
and add [Storyboard] debug logs at each decision point so future
failures can be diagnosed without guessing.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
58f1b8c1ad Use two-column layout for tvOS playlist detail view 2026-04-18 20:38:01 +02:00
Arkadiusz Fal
a6d1c840f9 Hide non-working external links in tvOS settings
tvOS cannot open URLs in a browser, so the Community section
(GitHub/Discord) is omitted and Acknowledgements dependencies
render as plain text rather than tappable buttons.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
f2748bead6 Add tvOS app icon and top shelf images for Yattee2 brand
Generated from the existing 1024x1024 iOS icon — gradient extended
horizontally to fill the 5:3 tvOS canvas without stretching the symbol.
Top shelf images are pure blue gradients sampled from the icon.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
f49dfd6246 Hide description header in tvOS video info right column
The right column is already dedicated to video info so the "Description"
label is redundant. Add an opt-out `showsHeader` parameter to
`TVScrollableDescription` (default true) and pass false from
`VideoInfoView`; the player overlay and channel view keep the header.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
9b55ee7127 Add tvOS setting for video click behavior 2026-04-18 20:38:01 +02:00
Arkadiusz Fal
fb2db35fe8 Use two-column layout for tvOS channel view 2026-04-18 20:38:01 +02:00
Arkadiusz Fal
0aac9168cb Use two-column layout for tvOS video info view
Reworks VideoInfoView on tvOS into a persistent 30% left sidebar
(thumbnail, title, channel, Play / Add to Playlist / Bookmark) with a
scrollable right pane for description, stats, comments, related, and
watch history. Reuses the player's TVScrollableDescription (refactored
to self-manage focus) so the description supports click-to-lock
scrolling, and the outer ScrollView is disabled while locked. Comments
full-screen on tvOS, with commenter avatars no longer tappable and
accent-colored link text replaced with the default foreground.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
6a45ed7d0f Show video title and channel in tvOS sidebar Now Playing 2026-04-18 20:38:01 +02:00
Arkadiusz Fal
d4f8cade90 Let tvOS chapter capsule grow with its title 2026-04-18 20:38:01 +02:00
Arkadiusz Fal
851c7e2ebf Fade out tvOS player controls on auto-hide 2026-04-18 20:38:01 +02:00
Arkadiusz Fal
944f849929 Revert "Fade out tvOS player controls on auto-hide"
This reverts commit a65fbc44ff721a7cb73afd04c41bd44d58bcb034.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
eb697b7bbc Add List/Grid layout option for Home sections
Introduces a "Display sections as" picker in Home settings with List and
Grid modes. Grid renders each section as a horizontal shelf of video
cards, defaulting to Grid on tvOS and List on iOS/macOS. Per-platform
defaults are preserved via a platform-specific settings key.

On tvOS the shelf is a focus section so swiping up/down between rows of
different lengths works without getting stuck at the end of a row.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
758f4a678d Fade out tvOS player controls on auto-hide 2026-04-18 20:38:01 +02:00
Arkadiusz Fal
c52796db75 Remove seek time overlay from tvOS storyboard preview 2026-04-18 20:38:01 +02:00
Arkadiusz Fal
d422bf13e5 Add Open URL and Remote Control as sidebar items
After disabling home shortcuts on tvOS, Open URL and Remote Control had
no entry point. Add them as configurable sidebar main items. Remote
Control defaults to visible on tvOS; Open URL defaults to hidden on all
platforms.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
e141a168f0 Use video context menu ControlGroup only on iOS 2026-04-18 20:38:01 +02:00
Arkadiusz Fal
43f62d997f Match tvOS seek preview to iOS glass design 2026-04-18 20:38:01 +02:00
Arkadiusz Fal
7067413b9b Push channel onto nav stack from tvOS details panel
The "View Channel" button in the tvOS video details panel only dismissed
the player; the channel was never pushed. Delegate to
NavigationCoordinator.navigateToChannel(for:collapsePlayer:) so
UnifiedTabView's pendingNavigation observer appends the destination,
matching iOS behavior and handling extracted/media-source cases.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
c3de87a12e Add channel avatar to tvOS player controls
Matches the iOS controls by showing the channel avatar next to the
video title and channel name, reusing ChannelAvatarView and the
Yattee Server fallback.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
4837fc6548 Make tvOS details panel use full screen 2026-04-18 20:38:01 +02:00
Arkadiusz Fal
f2c2a86d47 Reorder tvOS player controls and add Previous button
Close button is now the rightmost action (after Queue), matching the
user-requested layout. A Previous button sits before Next and appears
whenever a queue is present, disabled until history accumulates.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
29782035f7 Open queue sheet from tvOS player controls
Turn the tvOS bottom-row queue count indicator into a focusable button
that opens QueueManagementSheet in a fullScreenCover with an
ultraThinMaterial backdrop, matching the Settings sheet pattern. Hide
the sheet's close toolbar button on tvOS (Menu button dismisses) and
replace the unusable Menu-based queue mode picker with an icon-only
tap-to-cycle button.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
9aeb329b64 Remove tvOS scrub hint labels from progress bar 2026-04-18 20:38:01 +02:00
Arkadiusz Fal
24a728e692 Cancel tvOS scrub with Menu button instead of seeking
Pressing Menu while scrubbing now discards the pending scrub and leaves
playback time unchanged, instead of committing the seek via the
focus-loss path.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
bfc646a73f Scale tvOS scrub step by swipe rate
tvOS rasterizes Siri Remote touchpad swipes into discrete onMoveCommand
events at ~300-400ms, so a fast swipe and a single tap delivered the
same fixed step. Track gap between events: rapid same-direction events
(under 500ms) build a streak that multiplies the step via a power curve,
while deliberate taps still land on the base step.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
4c29ca9455 Seek with remote arrows when tvOS scrubber is focused
Pressing left/right on the focused progress bar now triggers the same
accumulating 10s seek as the hidden-controls flow, but updates the
visible scrubber in place with no overlay. Both tvOS arrow-seek paths
accumulate a signed net offset so a reverse press subtracts from the
pending amount instead of restarting from the current playback time.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
9260d48f4c Make tvOS sidebar main navigation toggles focusable
The tvOS Main Navigation list relied on .onMove with native Toggle
rows inside editMode, which leaves only the drag handle focusable on
tvOS. Replace it with a TVSidebarMainItemRow modeled on the home
customization screen: explicit up/down chevrons on the left and a
tap-to-toggle checkmark button as the row body. Required items render
disabled with a dimmed checkmark.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
2dcfe52bfb Fix broken modifier chain around playback speed menu style 2026-04-18 20:38:01 +02:00
Arkadiusz Fal
c7d1f1c20b Seek with remote arrows when tvOS player controls are hidden
Left/right on the Siri Remote now seek instead of revealing controls,
reusing the iOS tap-seek accumulation handler and feedback overlay so
rapid presses compound into a single "+30s" / "-20s" jump. Up/down
still show controls.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
f5ddcd0fa5 Keep tvOS seek bar stationary and float preview above 2026-04-18 20:38:01 +02:00
Arkadiusz Fal
0d5a733b0b Remove redundant center transport controls on tvOS
Siri Remote already handles play/pause and seeking natively, so the
on-screen skip/play/pause cluster was duplicate UI. Initial and
restored focus now targets the progress bar.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
c7942ef555 Rework tvOS player controls and settings sheet
Replace the tvOS bottom action bar with Settings / Info / Comments /
Next / Close. Settings reuses QualitySelectorView (video, audio,
subtitles, speed); Comments opens TVDetailsPanel directly on the
comments tab; Close stops playback and dismisses.

Debug button is hidden by default and can be re-enabled via a new
tvOS-only Advanced Settings > Developer toggle.

Present the settings sheet as a fullScreenCover with a centered
material card, fix the "Normal" hyphenation, and restyle row selection
throughout the quality selector on tvOS: per-row rounded backgrounds
with focus tint + stroke, vertical spacing instead of dividers, and a
focusable speed-rate menu.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
4f9285686a Avoid collapsed sidebar pill overlapping search on tvOS
Use the tab root's top safe-area inset instead of a fixed 20pt, so the
search/options header in History and Bookmarks clears the floating "Home"
pill drawn by the sidebarAdaptable TabView.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
d111f93462 Add vertical space between Home section header and rows on tvOS 2026-04-18 20:38:01 +02:00
Arkadiusz Fal
39a04ba7a4 Hide Home shortcuts on tvOS 2026-04-18 20:38:01 +02:00
Arkadiusz Fal
babaca74f2 Keep playback alive when dismissing tvOS player with Menu button
Calling stop() on Menu-button dismiss cleared currentVideo and tore down
the backend, so audio did not continue and the "Now Playing" sidebar
tab never appeared. Match the iOS/macOS dismissal path instead and just
collapse the fullScreenCover.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
2c49a5e65a Update localizable 2026-04-18 20:38:01 +02:00
Arkadiusz Fal
9e95a91284 Sync sidebar/tab bar/home layout per-platform via iCloud
Extends `SettingsKey.isPlatformSpecific` to cover home, tab bar, and
sidebar layout, plus player details panel and video swipe actions, so
iOS devices sync these with other iOS devices (and tvOS with tvOS,
macOS with macOS) instead of overwriting each other via the shared
iCloud key. Adds a one-shot migration that copies legacy unprefixed
values into the new platform-prefixed slots locally and in iCloud,
preserving protected-key timestamps.
2026-04-18 20:38:01 +02:00