Skip to content

Unified & Composite FilterView#1823

Open
JPKribs wants to merge 10 commits intojellyfin:mainfrom
JPKribs:unifiedFilterView
Open

Unified & Composite FilterView#1823
JPKribs wants to merge 10 commits intojellyfin:mainfrom
JPKribs:unifiedFilterView

Conversation

@JPKribs
Copy link
Member

@JPKribs JPKribs commented Nov 19, 2025

Summary

Reviewing #1770 I was finding that there was a good opportunity to make a shared FilterView for both iOS and tvOS. Right now, on tvOS, there isn't a way to call this but this sets that up for success as we build out #1770 further so that item can be more manageable for review.

Please confirm that I am correct in my assumptions here first. If I am incorrect there, this PR is not required and we can close this out.

While working on the FilterView, I also addresses an outstanding TODO to allow multiple filters on the same FilterView. This changes the init to take [ItemFilterType] instead of a single ItemFilterType. This loops over each ItemFilterType to build it out in the same way this was built prior with the exception that we are using section headers when there are multiple filters (see screenshots). Additionally, the bindings are created inside the selectorView(for:) function.

Currently, I am not using multiple filters on the same view since I think that will require a bit of a rework of the navigationBarFilterDrawer and I wanted to keep this a little more focused than I normally do.

Other Cleanup

  1. The checkmark we were using on the SelectorView was the same as the ListRowCheckbox. I've just added an optional parameter to remove the O when the item was not selected. Functionally, there are no changes but this lets us re-use the sizing for the checkmark so we don't end up with any variations in that over time.
  2. I added the NavigationBarCloseButton to tvOS to prevent the build errors when sharing a view with tvOS. This also enables this as an option moving forward if we want it. If we don't want it, I think this makes more sense to put a placeholder instead. Similar to...
  3. I added a placeholder for tvOS and navigationBarTitleDisplayMode to prevent build issues for PlatformViews.
  4. To get the icon for the filter on tvOS, I made ItemFilterType systemImageable. I also made it Identifiable to help with the ForEach.

Outstanding Questions

  • For a composite FilterView, I am currently making the title types.map(\.displayTitle).joined(separator: " & ") which works for 2 filters well (see screenshots) but more filters this would be an issue. What would be the correct title for this composite FilterView?
  • For a composite FilterView on tvOS, I am currently getting the systemImage from the first element with a fallback to "line.3.horizontal.decrease". What would be the appropriate way to get the SplitFormWindowView.descriptionView value? I had an idea of making a grid of all elements' systemImage but that seemed like a lot so I thought I would ask first.
  • If there are no filters in a selectorView(for:) in returns "None" (as this does prior to this PR) but do we want this to show as "None" for a secondary filter on a composite FilterView as well? Or would we rather have the empty filters just not show on a composite FilterView so long as another filter has values?

Screenshots

iOS

Single Filter Simulator Screenshot - iPhone 17 Pro - 2025-11-18 at 21 22 24
Composite Filters Simulator Screenshot - iPhone 17 Pro - 2025-11-18 at 21 22 35

tvOS

Single Filter Simulator Screenshot - Apple TV 4K (3rd generation) - 2025-11-18 at 20 46 39
Composite Filters Simulator Screenshot - Apple TV 4K (3rd generation) - 2025-11-18 at 20 46 59

@JPKribs JPKribs added developer Alters the developer experience iOS Impacts iOS or iPadOS tvOS Impacts tvOS labels Nov 19, 2025
@JPKribs

This comment has been minimized.

@JPKribs JPKribs marked this pull request as draft December 6, 2025 09:04
@JPKribs JPKribs marked this pull request as ready for review December 17, 2025 00:37
@JPKribs JPKribs requested a review from LePips December 17, 2025 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

developer Alters the developer experience iOS Impacts iOS or iPadOS tvOS Impacts tvOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant