Open heyqbnk opened 1 year ago
The same issue, there is no a way to implement spoinner/loader before your webapp first page (telegram js) is loaded on Android and iOS.
I've found only one example when webapp starts without any white screen before loader/spinner in @DurgerKingBot. It looks like assets fot this bot added in telegram app.
https://github.com/telegramdesktop/tdesktop/assets/11719983/99b52f66-6917-4fbf-bcae-e423706404ca
Would like this feature as well. Should be easy enough to pass a URL of a custom loading anim via BotFather and have Telegram pipe it through. Durgerking anim example is just waving a carrot we can never reach.
Would like this feature as well. Should be easy enough to pass a URL of a custom loading anim via BotFather and have Telegram pipe it through. Durgerking anim example is just waving a carrot we can never reach.
IMHO it is currently enough to use built in loader. Custom loader implementation will take a time of many Telegram developers, which decreases the chance of soon feature completion. Telegram Desktop developers should just reuse the implementation from Telegram for macOS
IMHO it is currently enough to use built in loader
Ok, but why tease us with a demo app that has features we can't utilize? That wastes our time searching the docs for something that isn't there. Also I believe there is no open source for DurgerKing provided by the Telegram team, which is also a bit ridiculous when it's purpose is a "demo app"
@heyqbnk The original screenshot is from macOS version which is not Telegram Desktop. You can try Telegram Desktop from https://desktop.telegram.org, you show a different version, from https://macos.telegram.org
@titusdecali at least on Telegram Desktop (this issue tracker is only about this app) there is nothing special about DurgerKing bot, nothing built in to the app etc. There is a small loader in the corner:
For all web apps. So maybe this should be published on https://bugs.telegram.org or somewhere else? Not here.
@john-preston yeah, I added the screenshot as a reference, how it could work in Telegram Desktop. Currently, the problem is loading indicator is not that good as it could be. I understand now that documentation requirement is satisfied, but to be honest, I didn't pay any attention to the loading icon working with Web Apps for more than 1 year.
Could we make it better and display loading icon appropriate for a user? Current indicator doesn't seem to look like an application loader. It is more like "static assets loader", which means nothing to user.
I would also like to see the same behavior on all Telegram applications in context of Telegram Mini Apps.
Telegram Desktop developers should just reuse the implementation from Telegram for macOS
How do you imagine that? Telegram macOS is written with Swift and native macOS frameworks while Telegram Desktop is written with C++ and Qt.
@john-preston This is the loading animation I'm talking about, which is different from the default loading animation of other webapps, and is shown when the webapp is initially launched:
FYI: This is seen in every version of the TG app, including desktop
Telegram Desktop developers should just reuse the implementation from Telegram for macOS
How do you imagine that? Telegram macOS is written with Swift and native macOS frameworks while Telegram Desktop is written with C++ and Qt.
I am talking about reusing the same behavior. I want all Telegram applications to work the same, that's why we need normal loader.
You're wrong, the loader is sent from the web url and not from telegram app. It's just instant See https://tappscenter.org/twa on web browser
Is your feature request related to a problem?
Currently, when Web App is loading, Telegram application does not display any loader. The only one thing user sees is a WebView with missing content . To let user know that application is loading, Telegram application should display loader instead of empty WebView.
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.Describe alternatives you've considered
-
Additional context
No response