-
Notifications
You must be signed in to change notification settings - Fork 47
Feature: Add a loading screen tab to the room_screen page (Desktop). #640
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
base: main
Are you sure you want to change the base?
Feature: Add a loading screen tab to the room_screen page (Desktop). #640
Conversation
|
do we not have this already, with the Either way, we should just have one widget that offers this. I do agree with your approach that it should be a separate widget (instead of duplicating it in both the Thus, go ahead and modify the code to use your EDIT: now we have another screen where this should be used too, the |
Introduce RoomLoadingScreen with tab actions, and use it in room, invite, and space lobby screens to replace the old restore status UI.
9ada9f0 to
3a2daf1
Compare
|
Hi! @kevinaboos , sorry about too late to reply you. I kept the RestoreStatusView Widget and did not delete it, but I replaced all instances of the RestoreStatusView Widget with the RoomLoadingScreen Widget. |
No worries!
Ah ok, I see what you were going for. However, it's a lot different than the original goal I had for a "loading screen" (or "landing page" or "splash screen", whatever you want to call it). For now I'll call it the "LoadingScreen", although we can use it for many other purposes beyond just showing a loading message. The goal of the LoadingScreen should be to act as the one and only widget/view that handles any case where we cannot yet display the full contents of another top-level view (the RoomScreen, Invites reen, SpaceLobbyScreen). The entire point is to remove that "is loaded" logic from all of those other top-level views such that they don't have to be concerned with that, which will make them a lot simpler (like they were before). Thus, the LoadingScreen becomes another top-level view, alongside the other 3 I listed above. The LoadingScreen will have a room ID associated with it, which indicates what room it is waiting for. (later we can have it wait on other events, too) Then, when that room has been loaded, it can emit an Action that instructs the higher-level widgets (the MainMobileUi or MainDesktopUi) to replace that LoadingScreen with whatever other top-level view is appropriate, like a RoomScreen. So, in summary, the goal here is to remove the redundant "waiting to load" logic from all of the other views (RoomScreen, InviteScreen, SpaceLobbyScreen, etc) and to have just a single LoadingScreen widget that handles all of that. I realize that's a lot of work, so I'm happy to tackle that myself too, if you like, since it's such a complex change. |
|
Thanks for your review! i understand your mind. like remove the loading logic from RoomScreen, InviteScreen, or SpaceLobbyScreen. The loading screen view will handle loading status.
However, I still want to try to address the content of this PR. I will try and redesign it as soon as possible. |
Great! No rush. I took a second look at the code, and I think you're actually further along than I thought yesterday, so that's good. Hopefully it won't be too much extra work. Another thing that we can use this LoadingScreen for is to show it as a temporary view when the user has clicked on an unknown room/event link. We can then show the LoadingScreen while the room is being resolved & fetched. It could also be used as a intermediary/placeholder screen for other cases too. (These extra use cases will be added in the future, I'm just mentioning them now so you can get an idea of the bigger picture and my general goals for this widget 👍) |
PR Content
Add a loading tab to the room_screen page to handle the transition when users click to navigate to another page.
PR Feature
How to Use
Use the following code anywhere within your room screen pages:
Hide and close the loading tab with the given id, if it exists, use
hide_room_loading_tab(tab_id: LiveId)