[tvOS] PagingLibraryView - Mirror iOS "Hot Reload" Functionality #1408
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
This is almost just a complete copy / paste of the iOS functionality into tvOS. The only changes I made to this on this tvOS side is the
.onChange( before, after...
that tvOS wants. Additionally, tvOS only needs one layout while iOS needs Phone vs Tablet.Finally, I just added the settings to the
CustomizeSettingsView
. The Remember Sort / Layout work but since we don't have filters/sorting they aren't really usable. I know that is another conversation so I'm fine to disable those as well but I thought I would start with those enabled for now.I have tested this and confirmed that this works as intended. I left a comment in place of where a LetterPicker would go. See the video for an example of this.
This is a continuation / resolution to this:
#1213 (review)
Additionally, this is a good starting point for #1407 but without the UX/UI discussions that are needed to make that work appropriately.
The only other change that shows up in iOS as well is adding Remember Sort/Layout labels instead of plaintext.
Edit: See additional examples of hot reloading the
PagingLibraryView
Videos
Poster Change
Simulator.Screen.Recording.-.Apple.TV.4K.3rd.generation.-.2025-01-23.at.10.57.13.mp4
Grid/List Change
Simulator.Screen.Recording.-.Apple.TV.4K.3rd.generation.-.2025-01-23.at.17.26.11.mp4
Column Change
Simulator.Screen.Recording.-.Apple.TV.4K.3rd.generation.-.2025-01-23.at.17.26.27.mp4