Skip to content

Conversation

@tyreseluo
Copy link
Contributor

@tyreseluo tyreseluo commented Dec 15, 2025

PR Content

Add a loading tab to the room_screen page to handle the transition when users click to navigate to another page.

603b6797-8c20-4043-a495-a8803eb25403

PR Feature

  • Supports the loading status of multiple pages.
  • Prevents duplicate requests when users repeatedly click on the same content.
  • Supports modifying the text content and details content during loading.

How to Use

Use the following code anywhere within your room screen pages:

show_room_loading_tab(
      loading_tab_live_id(room_alias.alias()),Loading...”,
      Some(Loading...”.to_string()),
      Some(Loading Room Alias...”.to_string()),
);

Hide and close the loading tab with the given id, if it exists, use hide_room_loading_tab(tab_id: LiveId)

@kevinaboos
Copy link
Member

kevinaboos commented Dec 15, 2025

do we not have this already, with the restore_status_view? Or this is meant as a replacement for restore_status_view?

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 InviteScreen and the RoomScreen), and that's been on our to-do list for a while, so perhaps that's why you filed this PR.

Thus, go ahead and modify the code to use your LoadingScreen everywhere instead of the restore status view within the InviteScreen & RoomScreen. Otherwise it'll be too difficult to maintain two different versions of the same thing.

EDIT: now we have another screen where this should be used too, the SpaceLobbyScreen. So the new LoadingScreen can be shown in place of either the RoomScreen, InviteScreen, or SpaceLobbyScreen while they are waiting to be received from the homeserver.

@kevinaboos kevinaboos added the waiting-on-author This issue is waiting on the original author for a response label Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-on-author This issue is waiting on the original author for a response

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants