-
-
Notifications
You must be signed in to change notification settings - Fork 308
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] ErrorViews - Creation #1414
base: main
Are you sure you want to change the base?
Conversation
One another note, while I'm working on these CurrentSimulator.Screen.Recording.-.Apple.TV.4K.3rd.generation.-.2025-01-29.at.10.50.15.mp4Potential ChangeSimulator.Screen.Recording.-.Apple.TV.4K.3rd.generation.-.2025-01-29.at.10.49.20.mp4 |
Yes, let's please change the |
…t value using `maxHeight` to ensure that it doesn't exceed the `ListRow` sizing.
I've committed this change! This is what this now looks like.I changed the Technically, I don't think Simulator.Screen.Recording.-.Apple.TV.4K.3rd.generation.-.2025-01-29.at.12.51.21.mp4 |
} | ||
} | ||
.topBarTrailing { |
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.
I brought this over from iOS. It doesn't seem to do anything and it's always disabled. It makes sense to pull this IMO but, if I'm pulling it from this PR I think it makes sense to pull this from iOS as well? Unless we have a usage for this we want to do in which case I think it should be on both platforms and we should TODO this so we know what we want to do later.
Summary
This is a simplified rework of #1382 that exclusively focuses on the
ErrorView
.HomeView
does behave strangely when it needs to be reloaded but that will need to be handled in a later PR.This PR cleans up some of the buttons in tvOS to make then better reflect native
.card
functionality. Additionally, thePrimaryButton
is added to tvOS and is used in the newErrorView
. I then mirrored all of the locations in iOS that use theErrorView
and added them to tvOS.The only unique thing that isn't a direct mirror of iOS is that
HomeView
will appear next to 2PagingLibraryViews
. Since those views wrap theirErrorView
in aZStack
with aColor.xxx
above it, there is a vertical offset where thePagingLibraryViews
'sErrorView
is a tad higher than theHomeView
. This isn't an issue it just looks weird. So I added aColor.Clear
to theHomeView
as well to ensure they're vertically positioned the same. I only added this since you will be able to switch between theHomeView
andPagingLibraryViews
very quickly so it's a lot more noticeable than if other views have a different position for theirErrorView
.Offset Without
Color.Clear
Simulator.Screen.Recording.-.Apple.TV.4K.3rd.generation.-.2025-01-02.at.14.00.36.mp4
ListRowButton
for tvOS, I made a changeonFocus
andonDisabled
.onDisabled
the buttons should darken 50%.onFocus
the buttons would appropriately grow to mirror existing.card
buttons but they would stand out. Default.card
buttons in tvOS highlight lighter when they are focused while our customListRowButton
did not. This made the buttons stand out more as custom and also made it less visible to see when they were focused.ListRowButton
BeforeSimulator.Screen.Recording.-.Apple.TV.4K.3rd.generation.-.2025-01-29.at.10.25.56.mp4
ListRowButton
AfterSimulator.Screen.Recording.-.Apple.TV.4K.3rd.generation.-.2025-01-29.at.10.25.10.mp4
ErrorView
In ActionSimulator.Screen.Recording.-.Apple.TV.4K.3rd.generation.-.2025-01-29.at.10.28.08.mp4
For reference, here are all of the iOS
ErrorView
locations. I put the ones that exist in tvOS in red and the ones that ARE tvOS in yellow:`ErrorView` Locations pre-PR