liveview-native / liveview-client-swiftui

MIT License
375 stars 37 forks source link

Navigation issues present in 0.3.1 #1466

Open bcardarella opened 6 days ago

bcardarella commented 6 days ago

I'm using the latest release of LVN Go

https://github.com/user-attachments/assets/b8ce975a-3e49-4f0c-a39e-92fd469aa720

Note that the loading screen is still present when navigating. I was under the impression that this was fixed. While there is a disconnect from the live session changing on the Phoenix side we shouldn't see a loading indicator like this between navigation events as it looks more like a web app than a native app.

carson-katri commented 2 days ago

The issue we fixed was the DisconnectedView showing during navigation. The ConnectingView will still show, but you can customize it to display an EmptyView if you don't want that to be visible. This gives the most control over the pending state.

For example, you could have it show an EmptyView for the first second, then fade in a ProgressView if it still hasn't connected by that time for users on slow connections.

bcardarella commented 1 day ago

I think we need more granular control here for the context of the connecting view:

carson-katri commented 1 day ago

We can add an associated value to the connecting phase here: https://github.com/liveview-native/liveview-client-swiftui/blob/2b542438b0fc3e1fcfa4d51da0818daf128e2508/Sources/LiveViewNative/Live/LiveViewPhase.swift#L35

It could have those cases for launch, navigation, disconnected.

Timeouts/reconnecting is covered in the LiveSessionConfiguration.

carson-katri commented 1 day ago

Alternatively, we could split connecting into different phases for setup and navigating.