[WIP] [tvOS] Letter Picker / Filters #1407
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Takes the same logic from the LetterPickerBar on iOS and implements it to tvOS. Spiritual successor to: #1177
This PR is functional and 'ready' but there is still a lot of discussion that needs to occur before tvOS filters are implemented. This is a precursor to that conversation and, hopefully, somewhat reusable if we end up going another direction.
This PR stands as more of a placeholder for the logic opposed to what the final version of this will look like. I've rebased this on Main again so it should be up-to-date compared to my old version of this PR which was very far behind without a reasonable path to rebase.
Image
Outstanding Issues
On Main, tvOS
PagingLIbraryView
jump their focus to the top of the page whenever a new page of data is loaded. Since the Letter Picker is the tallest item, this is now capturing the focus. I think this is more of an issue with thePagingLIbraryView
and knocking out that TODO. I am not sure if this is a package issue where the Focused item just gets lost when new items are added in?If you are hovering a letter that is above, below, or between posters, it cannot jump to them. Instead, you have to go back up to a letter that in even to a poster to move the cursor back to the posters. I will need to figure out the FocusGuide to use this appropriately but this should be doable.
Letter Picker font size, coloring, position on the screen etc.. This current implementation fails to match some of our more native SwiftUI components. These changes would fall under a greater tvOS UI discussions. See below!
Outstanding Discussions
There is a whole conversation about tvOS UI I know LePips wants to have. This should provide some clarity on what we want this to look like so we aren't reworking the same view multiple times to no benefit. This PR's work should hopefully be re-usable when that conversation is had but this is likely not our ideal version of this. I personally have a poor eye for UX/UI so I want to leave plenty of room for news items/revisions. However, this PR introduces the FULL
FilterViewModel
so any filter logic we need to do should be feasible.