25 Commits

Author SHA1 Message Date
Arkadiusz Fal
cc50c88d75 Fix Clear All Recents button stretching full width on macOS 2026-07-11 20:25:10 +02:00
Arkadiusz Fal
1157eef201 Fix macOS native styling for search toolbar pickers and view options
The content type segmented picker rendered as a Liquid-Glass pill instead
of a native macOS segmented control. Wrapping a `.segmented` Picker in
`.opacity`/`.disabled`/`.accessibilityHidden`/`.fixedSize` (used to keep
toolbar items mounted-but-invisible for stable layout) inserts a hosting
layer that makes the toolbar fall back to the pill rendering.

- SearchView: filters button and content type picker are now always
  visible on macOS, rendered bare so `.segmented` keeps native styling.
- SearchView: don't reset the content type to .video on submit on macOS,
  so a pre-selected type (e.g. Playlists) is preserved (iOS unchanged).
- InstanceBrowseView: same pill fix, rendering the tab / content type
  pickers bare via conditional `if` instead of opacity-masking.
- ViewOptionsSheet / MediaBrowserViewOptionsSheet: use `.formStyle(.grouped)`
  for native macOS form styling in the options popover.
2026-06-15 08:07:40 +02:00
Arkadiusz Fal
77720ccea1 Pin view options button to leading toolbar edge on macOS
Place the view options control on the leading (`.navigation`) edge on
macOS so it is consistently the first/leftmost toolbar button across all
views, instead of sitting on the right next to the search field in
search views and on the left in non-search views.

Each affected view gains a computed `viewOptionsPlacement` (`.navigation`
on macOS, `.primaryAction` elsewhere) so iOS/iPadOS/tvOS keep the
button trailing. Search-style views (Search, InstanceBrowse) declare the
view options item first so it renders left of the search-filters button;
their flexible spacer is kept to right-pin the search field. Channel's
fixed spacer between view options and the channel menu is now iOS-only.
2026-06-14 16:03:10 +02:00
Arkadiusz Fal
ad14c0129c Fix recent search tap showing suggestions instead of results on macOS Sequoia
Tapping a recent search (or suggestion, or opening a query deep link) mutates
the searchable text, which fires the onChange handler that clears results and
re-fetches suggestions. That raced against the search Task started by the same
tap: on Sequoia the onChange settled last, cancelling the in-flight search and
leaving suggestions visible instead of results.

Suppress the onChange-driven suggestion fetch for the single programmatic text
mutation via a one-shot flag, so the execute paths go straight to results
regardless of onChange-vs-Task ordering. Manual typing is unaffected.
2026-06-13 13:59:27 +02:00
Arkadiusz Fal
271aff86b5 Present view options and search filters as popovers on macOS
Plain-Form sheets rendered as columns-style content floating inside
oversized fixed frames on macOS. Anchor these panels to their toolbar
buttons as popovers instead, sized to content; iOS/tvOS keep sheets.

- Search and PeerTube explore filters apply live (Cancel never
  reverted anything anyway) and dismiss on outside click
- Subscriptions/Manage Channels "Subscriptions Data" opens as a sheet
  from the popover's onDisappear via a pending flag, since presenting
  while the popover dismisses gets swallowed
- Media browser view options drop navigation chrome on macOS
2026-06-06 22:59:36 +02:00
Arkadiusz Fal
dbe494f18a Move search filters to the toolbar on macOS
Relocate the funnel filter button and the content-type picker
(All/Videos/Playlists/Channels) from the inline results strip into the
window toolbar on macOS. The inline strip remains iOS-only.

Like on iOS, the controls appear only after a search is submitted
(gated on hasSearched). To keep the toolbar stable:

- Items stay in the toolbar permanently but are invisible and inert
  before a search, so the search field keeps a constant size; their
  liquid-glass backgrounds are suppressed with
  sharedBackgroundVisibility(.hidden) (macOS 26, with a conditional
  fallback on macOS 15).
- A flexible ToolbarSpacer pins the view-options button and search
  field to the trailing edge so they no longer shift when items
  appear.

The filters type onChange handler moved from the strip to the shared
iOS/macOS branch so both the strip and the toolbar picker reuse it.
2026-06-05 22:23:17 +02:00
Arkadiusz Fal
7c1549ed35 Show watch progress bar on thumbnails in playlist, channel, and search views
These views rendered video thumbnails without passing watchProgress, so the
progress bar was silently missing. Apply the existing pattern from
SubscriptionsView: maintain a watchEntriesMap and forward watchProgress(for:)
to VideoRowView/VideoCardView at each call site.
2026-05-08 20:58:13 +02:00
Arkadiusz Fal
181cf2f73a Fix collapsed sheets on macOS across the app
Add macOS-only minimum frame sizing to sheets that wrap a
NavigationStack/Form without intrinsic size, so they render properly
instead of collapsing to just the toolbar. Affects Customize Home,
subscription/channel view options, playlist create/edit, search
filters, media browser options, instance picker, log filters, preset
editor, and legacy data import result.
2026-04-19 11:33:16 +02:00
Arkadiusz Fal
663e96c859 Polish Search view layout on tvOS
- Disable scroll clipping so focused source/channel/playlist cards show full halo
- Remove rounded clip on source picker row that cut the Menu focus effect
- Replace tappable recents header Button with a plain label on tvOS
- Add vertical spacing between recent search items
- Widen recent channel and playlist cards and reserve space for two-line titles
- Increase horizontal spacing between cards so focus halos don't collide
2026-04-18 20:38:02 +02:00
Arkadiusz Fal
6eec42241d Disable scroll clipping for tvOS video listing grids
Allows focus-scaled cards to render past scroll view bounds on History,
Bookmarks, Search, and Instance browse screens.
2026-04-18 20:38:02 +02:00
Arkadiusz Fal
281f5e0f13 Hide tvOS search type/filters until query entered
Match iOS behavior by gating the type switcher and filters menus on an
active query, and drop the .caption font so they render with the same
default button font as View Options.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
8253b1a247 Hide dividers between recent search items on tvOS 2026-04-18 20:38:01 +02:00
Arkadiusz Fal
454f10b3ab Show selected content type in tvOS Type filter button
Display the current selection (All/Videos/Playlists/Channels) instead
of the static "Type" label so users can see the active filter at a
glance.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
d8722e6150 Remove overlay pattern from tvOS search results to fix focus clipping
The backgroundStyle.ignoresSafeArea().overlay(ScrollView) pattern
clips the tvOS focus effect at the overlay boundary. On tvOS, render
the ScrollView directly so focus highlights can extend naturally.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
885c478857 Increase top spacing for tvOS focus effect on first content row
Add padding above the content area so the tvOS focus highlight on the
first row isn't clipped by the search header above it.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
c3a2f7a965 Add bottom padding to tvOS search header for focus effect clearance 2026-04-18 20:38:01 +02:00
Arkadiusz Fal
5417374275 Consolidate tvOS search header: search, type, filters, view options
Reorganize the tvOS search UI into a single header row with search
field, type filter menu, combined filters menu (sort/date/duration
with reset), and view options button. Removes the separate filter
strip between search and results on tvOS.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
3c7581de1a Replace search content type segmented picker with Menu on tvOS
Unifies the filter strip on tvOS so all filters (sort, date, duration,
content type) use the same inline Menu style instead of mixing menus
with a segmented picker.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
831773a609 Replace search filters sheet with inline menus on tvOS
The filters sheet is too small and awkward on tvOS. Replace the filter
button with inline Menu pickers for Sort By, Upload Date, and Duration
directly in the filter strip. Applied to both SearchView and
InstanceBrowseView.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
bcb0864fca Fix tvOS search view: replace searchable with inline TextField, fix clipped focus
Use inline TextField with focusSection instead of .searchable() on tvOS
to prevent keyboard/navigation title overlap. Remove clipShape on recent
search items so tvOS focus effect is not cut off.
2026-04-18 20:38:01 +02:00
Arkadiusz Fal
a7e5ebb068 Fix 5 TestFlight crash types from builds 250-254
- Fix BGTaskScheduler assertion crash on Mac Catalyst by guarding all
  iOS background task APIs with isMacCatalystApp check
- Fix iPad popover crash in UIPopoverPresentationController by adding
  .presentationCompactAdaptation(.sheet) to all 27 confirmationDialogs
- Fix SwiftData assertion crash when accessing deleted Bookmark model
  properties during SwiftUI hit testing in BookmarkRowView
- Fix UICollectionView invalid item count crash on queue swipe-to-delete
  by using ID-based removal with withAnimation instead of stale index
- Fix Range crash in storyboard download when storyboardCount is zero
2026-04-18 20:38:00 +02:00
Arkadiusz Fal
f8da242968 Fix ContentUnavailableView centering on Apple TV
On tvOS, ContentUnavailableView inside a Group doesn't expand to fill
available space — it sizes to content and aligns top-leading. Add
.frame(maxWidth: .infinity, maxHeight: .infinity) to all instances
so they center correctly in their parent containers.
2026-04-18 20:38:00 +02:00
Arkadiusz Fal
2e37873a12 Remove duplicate navigation titles on tvOS
The sidebarAdaptable TabView already shows tab names in the sidebar
pill, so the large .navigationTitle() was redundant on tvOS.
2026-04-18 20:38:00 +02:00
Arkadiusz Fal
11a8c79e21 Refactor views 2026-04-18 20:37:25 +02:00
Arkadiusz Fal
100df744d9 Yattee v2 rewrite 2026-04-18 20:37:24 +02:00