Instant View support
Please add support to IV articles

Instant view was made to provide ease of access using built in browsers in each operating system. Telegram desktop is built to be multi platform so if they want to add it they may need to include some kind of browser which I don't think would be easy. Safari and Firefox already provide a similar function.
@MHTE Instant view is not in HTML -- it's in tg's special format. However, IV pages can have "iframe" like parts -- for youtube, twitter, and a couple of other selected sites. So it is possible to render IV pages without a browser.
yes please ,,,,why don't you ask durov on telegram to implement it ??
@elswerky because it'll be very annoying for Durov? Problem with instant view are embeds, which would require TDesktop to either have a bundled browser (hi issues, vulns, even more complicated build process and larger binary size), or to handle API of every service which can be embedded (even worse)
Instant view works well on telegram desktop for MacOS. But doesn't work in windows desktop client. Screenshot from first post shows, how it looks on windows client.
@simple-elf no, it doesn't work on Telegram Desktop for macOS, only on Telegram native macOS app which is different from Telegram Desktop.
@AntonBoch1244 No, that's not how IV works. You're very very wrong.
IV is generated on server side.
But embeds will be painful. That's the only problem -- embeds in IV are normal web pages, which have to be parsed and displayed by client.
@stek29 i check how IV works. And drop my comments, as well. Because fully wrong answer(including step-by-step on server side) in my now removed comments.
Maybe this can help to implement IV: http://doc.qt.io/qt-5/qtwebview-minibrowser-example.html
Qt WebView can't be statically build, so no way for now...
iv of this issue

Qt WebView can't be statically build, so no way for now...
So I think Telegram should implement an instant view site that gets the link to a site that processes it on a server side, then returns it for viewing from any browser.
https://t.me/iv?url=https%3A%2F%2Ftelegra.ph%2Fapi&rhash=3aae0ab195c808
and this link should by used by Qt WebView
like

@stek29 since many pages don't have iframes, why not just render the rest and in case there is an iframe replace it with a warning that the content can't be diplayed and a button to open the page in a browser?
any updates on this? telegram desktop really needs instant view
maybe now that telegram desktop uses QT 5.12 WebEngine can be used to implement this.
maybe now that telegram desktop uses QT 5.12 WebEngine can be used to implement this.
I am afraid that QtWebEngine still can't be build statically... :(
@kirsan31 could you please tell me why my suggestion is not an option? This one:
since many pages don't have iframes, why not just render the rest and in case there is an iframe replace it with a warning that the content can't be diplayed and a button to open the page in a browser?
@alxlg
The problem not only in iframes, the problem is that we have no html render control (browser) in Qt, that can be used in TD.
QtWebEngine can't be build statically and other Qt controls have very limited html support...
@kirsan31 why do you need HTML support? Can't the text and the images, cached on the server as Instant View, be rendered without involving HTML? Does Telegram for Android use a web engine for Instant View? It doesn't look so...
I'm not sure where I can examine IV documents directly, but maybe it would make sense to fetch and then convert to markdown, then render with QTextDocument or QTextBrowser. While they support some html, maybe limiting to supported element types would be simpler this way :man_shrugging:.
From New Features in Qt 5.14:
- QTextDocument/QTextTable now support
- per-edge border styling via QTextTableCellFormat - border-collapse mode - HTML table style import (partial) and export
- QTextDocument supports reading and writing Markdown format, as an alternative to HTML. If you read HTML and write Markdown, or vice-versa, the formatting should be preserved to the extent that the CommonMark and GitHub specs allow (including headings, tables, bullet lists, block quotes and code blocks); but we don't guarantee all cases yet, because it's thinly tested so far.
- Qt Quick
- Text and TextEdit now support Markdown format (CommonMark and GitHub dialects) as an alternative to HTML. - Includes the GitHub checklist extension, such that you can click to toggle checkboxes in a TextEdit.