Telegram-Mini-Apps / issues

Centralised storage of platform issues and enhancement proposals.
8 stars 1 forks source link

Display placeholder during Web App loading #11

Open heyqbnk opened 1 year ago

heyqbnk commented 1 year ago

Is your feature request related to a problem? Please describe. Currently, when Web App is loading, Telegram application does not display any loader. The only one thing user sees is a WebView with white background and missing content . To let user know that application is loading, Telegram application should display loader instead of white WebView. I saw loader in bottom right of shown popup, but white WebView breaks any sense of native application which Web App should look like.

Describe the solution you'd like To make it look the same on all platforms, you could see how it works in macOS version of Telegram:

I also provide some tip from official Telegram documentation about how loader hiding should work. Taken from description of web_app_ready method logic.

A method that informs the Telegram app that the Web App is ready to be displayed. It is recommended to call this method as early as possible, as soon as all essential interface elements are loaded. Once this method is called, the loading placeholder is hidden and the Web App is shown.

Describe alternatives you've considered You can find good solution made by Telegram macOS developers.

Additional context -

heyqbnk commented 1 year ago

Issues: https://github.com/telegramdesktop/tdesktop/issues/25792 https://github.com/Ajaxy/telegram-tt/issues/228 https://github.com/TelegramMessenger/Telegram-iOS/issues/976