-
-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[tvOS] Settings Cleanup #1163
[tvOS] Settings Cleanup #1163
Conversation
… Ensure Forms don't get clipped by their boundries. Create consistent, reusable button sizing/coloring. Apply to all Settings Pages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for taking a look at this and the localization but I apologize to say that the clipping issue could just be fixed [1] with the following in SplitFormWindowView
and attached to other Form
s [2] if necessary:
Form {
contentView()
.eraseToAnyView()
}
.scrollClipDisabled()
Additionally, this keeps the Form
styling instead of moving to Button
s in a VStack
.
[1] That modifier came in tvOS 17 which I just now set as the minimum but I would have pursued a way to prevent the clipping somehow with overlay
or whatever and still use Form
.
[2] The entire server selection will be changed to use a Menu
which was introduced in tvOS 17, so I wouldn't worry about my ugly replication.
That is so much cleaner of a solution than this whole build out! I can't believe I didn't find this when I researching this. Let me re-submit this with just that single line change. |
@LePips I've moved back to just using the standard form items again with that one Lastly, I added that padding to the Server Selection Form. Let me know if you want me to keep the padding or if that should also just be I've updated the original post with screenshots to reflect the current state of this PR! |
…ver Details Server non-focusable. Create a new menu for Server Details selection. This is a WIP awaiting feedback from jellyfin#1163 (comment)
@LePips It looks like I can for the SettingView > Username that I did here: #1163 (comment) The focus appears to work as we expect it to but I would agree it feels a little weird. Let me know if you want me to include this here: Simulator.Screen.Recording.-.Apple.TV.4K.3rd.generation.-.2024-08-06.at.15.19.49.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good as is. The user button should be changed to match iOS soon and I'll probably clean up some other things here as well. I'm experiencing some bugs in the iOS 18 simulator around losing focus when popping a settings view but that can be fixed later.
Thanks for doing this work and going through my requests!
Goal
This PR originally started with the goal of fixing a slight peeve I had with the settings. All buttons in Forms would clip into their boundaries when focused. See:
Following the changes here: #1163 (review), I've removed the clipping. Additionally to the clipping, I have added labels to the settings items and updated it to ensure that all sections have headers.
Settings
I created a custom SettingsViewForm and SettingsViewFormSection to handle the Form and Section actions from a single location. The goal was to centralize the button/form configuration in single struct so they could all be updated if there are any customization that we want to apply to all sections. These settings can be seen reflected here:
Settings Main
Server Details
Video Player
Maximum Bitrate
Customize
Experimental
This last section was not part of the Setting Form Changes but instead just a padding(.horizontal) to resolve this clipping.
Server Selection