prose-im / prose-app-web

Prose Web application. XMPP client for team messaging.
https://prose.org/downloads
Mozilla Public License 2.0
20 stars 2 forks source link

Do not asynchronously wait for network in router pre hooks #20

Closed valeriansaliou closed 8 months ago

valeriansaliou commented 9 months ago

Reference: https://github.com/prose-im/prose-app-web/blob/master/src/router/index.ts#L130

This code creates a "white" transition screen between Prose main loader, and the actual messaging view. This might also induces navigation delays if connection is torn down, between conversations.

We want any network waits to be done whenever the view are all rendered, showing a loader where relevant, rather than blocking the app from loading.

nesium commented 9 months ago

Also show a skeleton view maybe?

valeriansaliou commented 9 months ago

Or else I could find a way to persist the startup logo until router completes its first view render. Issue is that it disappears as soon as the Vue App gets injected into the entrypoint HTML file, but I could change that to get it to disappear at a later stage.

nesium commented 9 months ago

Sounds good.

I guess overall we should get as much data from the cache on the screen as quickly as possible. But there's also a chance that we don't have anything cached - although that should be rare and most of the time only the case when you log in for the first time.

For the MUC rooms it would probably be better to change the core lib to pull them from the cache and display them immediately. Then - until all of the rooms are connected - treat this scenario the same as if the app was still in the process of connecting to the server.