telegramdesktop / tdesktop

Telegram Desktop messaging app
https://desktop.telegram.org/
Other
25.58k stars 5.07k forks source link

Option to disable the link preview #687

Closed Akamaru closed 7 years ago

Akamaru commented 9 years ago

Pls add an option to disable link previews. 2015-04-30_20-04-52

kirsan31 commented 7 years ago

@vdmit I agree.

auchri commented 7 years ago

moreover, don't do any http requests for these links

The requests are done by the server.

shrpne commented 7 years ago

In 3330 links still cluttered, I prefer option to fully disable rich links

animalillo commented 7 years ago

I agree with this

El 27 de abril de 2017 17:10:02 CEST, shrpne notifications@github.com escribió:

In 3330 links still cluttered, I prefer option to fully disable rich links

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/telegramdesktop/tdesktop/issues/687#issuecomment-297743661

-- Enviado desde mi dispositivo Android con K-9 Mail. Por favor, disculpa mi brevedad.

stek29 commented 7 years ago

3330 just allows to unhide hidden previews in case you want to see them. So there's an option to disable or enable link previews by default, and to hide/unhide specific ones.

Akamaru commented 7 years ago

3330 is not what I (and many other) want. So why is this closed? Please reopen it...

dhowe commented 7 years ago

Agree with @Akamaru

stek29 commented 7 years ago

@Akamaru the only difference is that #3330 would provide a way to unhide specific preview, while this one would force you to enable them in settings globally. Or are there any other differences I haven't thought of?

vdmit commented 7 years ago

@stek29: I could only repeat my previous comment https://github.com/telegramdesktop/tdesktop/issues/687#issuecomment-297739648: we all want to see simple blue links and don't waste space on the screen by preview box. Is it too hard to realize? That's why collapsed form is not aceptable.

kirsan31 commented 7 years ago

@stek29 I think if it will hide whole preview, so yes. But I need collapsed by default, and I swear, I will never expand it :))) But other guy will need expanded by default :-) So, basically I think simple option "disable link preview" will be best solution... image We don't need red, we only need green :-)

stek29 commented 7 years ago

Why no one in this thread thinks about actual implementation? You just keep saying "I want this" without even thinking of how it can be implemented and what it would affect. Both #3330 and this request same thing -- an ability to hide/collapse/disable web previews. The only difference is some people want it enabled by default, and others want it disabled by default. Just one Boolean in settings. That's why it's impractical to fix one without fixing another.

kirsan31 commented 7 years ago

@stek29 We want ability to disable some current functional - link preview - one Boolean in settings ;) But #3330 want current functional improvements - ability to collapse link preview. Imho, our request more simple to implement, and it can easy be done first. Then, if still needed, authors can implement collapse individual preview feature... But if collapse feature is in priority, than yes, while implementing it, it's good idea to implement our request to.

vdmit commented 7 years ago

@stek29: Some time ago, I've even found place in code when this option should be checked. But, I failed to build tdesktop on Ubuntu 16.04 regardless of all my SE experience :( I've wasted several hours, but got finally stuck on 7-th or 8-th step of this "short, simple build instruction" https://github.com/telegramdesktop/tdesktop/blob/dev/docs/building-cmake.md Of course, I need another try

ralesk commented 7 years ago

Also, if anything, the new bug does not invalidate this one, nor does it make this one "done". Most of the discussion about the issue happened here, closing this bug (instead of the newer one) is simply sweeping it under the rug.

But of course the other bug is also not in any serious consideration as per last comment in April, so it's not like it matters terribly much either way.

maxim-ge commented 7 years ago

+1, please remove this or give an option to disable!

grasmanek94 commented 7 years ago

Why is this closed? I vote for reopen. This is a real issue. Link previews are generated and users can't control it!

stek29 commented 7 years ago

@grasmanek94 If you're the sender, you can disable preview by closing the suggestion. If you're reciever, see #3330.

grasmanek94 commented 7 years ago

@stk29 What if people want only the text and absolutely no preview (or the other side forgot to remove it), even not a title and short description? I cannot disable that anywhere in the options. I'm going to try and make this in my own fork, because I reaaaaallllyy want that and I have the feeling it's not going to be added anytime soon.. :( #3330 still leaves the title/text description, that's not a complete removal of the preview, and requires user interaction in the chat itself (unwanted).

Edit: I also think I understood the initial issue here wrongly, my issue is that I want previews to be completely gone, only text visible, sorry for the trouble, but this was the first google result and I was a bit too impatient and skimmed though too fast.

stek29 commented 7 years ago

requires user interaction in the chat itself

No, #3330 doesn't require previews to be enable by default Also, what's so wrong with preview? Why don't you like it?

lees commented 7 years ago

I don't like it, because I don't need it. If I want to look up the link, I'll do it by myself. And #3330 not solving my problem. I vote for reopen. And I really don't understand why it is so hard to understand. You need a scenario when I don't need a previews?

grasmanek94 commented 7 years ago

Also, what's so wrong with preview? Why don't you like it?

Well when I use Telegram Desktop on my desktop, I click the links my friends send me anyway, so why would I want to waste space and have less compact chats? It feels good when I can access as much information as I want without scrolling. And this is especially true when running a multi monitor setup while I'm gaming, if I need information and I need to scroll, I'm f****d, especially in first person shooters. Plus it just looks way nicer if I only have the messages, less cluttering overall.

grasmanek94 commented 7 years ago

If someone wants a version of Telegram with all link previews disabled you can find it here, I'm not going to make a pull request because I don't know if this is the correct solution to the problem.

If someone tells me how to make this into a proper pull request (mostly which code changes would be really needed) I can do that.

vdmit commented 7 years ago

@grasmanek94, you've done a great work. However, I've studied your patch and it appeared a bit complicated to me: actually we don't need to fix (hide) preview itself and change it's geometry. After some code exploring, i've done this patch: https://gist.github.com/vdmit/f490be029544d728657ac6f2e53fb61c I've not tried to build your fork yet, but it seems that it has more-or-less same effect. With my dirty hack, it shows simple blue links for web pages, and small thumbs for images (which is acceptable).

P.S. Build sequence is terrible, but finally, I've defeated it!

grasmanek94 commented 7 years ago

@vdmit ah good job! I was actually looking for such code, I didn't know to look in history_message for that. So I just did it by trial and error :) After taking around 3 hours to setup the build environment for VS2015 I really didn't have much time left to study the Telegram code thoroughly. Thanks for the much better solution, works exactly (visually) as my solution. We should make a boolean in settings which controls the break behaviour but I don't think I can free up some time to figure out how to do that. So lets wait it out :p

grasmanek94 commented 7 years ago

@vdmit I have compiled your changes into a Windows Release executable here, if anyone can't compile the source for themselves and really wants a binary with @vdmit 's patch, there you go.

dhowe commented 7 years ago

How about an osx executable?

vdmit commented 7 years ago

@dhowe currently I don't have osx environment to build it. Maybe other users can help. However, the build instructions seem to be correct, just follow this: https://github.com/telegramdesktop/tdesktop/blob/dev/docs/building-xcode.md In fact, they are not complicated, but there are a LOTS of steps and no complete build script supplied. (I'm going to make such all-in-one build script for Linux and push it upstream) So, read build messages carefully and don't skip any errors: if something went wrong, that means that you had mistaken in libraries layout above, etc. Finally, allocate couple of hours, brew a large cup of coffee, and... go on! =) It's a great sense when you made something good for the Community! :)

stek29 commented 7 years ago

@vdmit @dhowe https://github.com/stek29/homebrew-tdesktop But I think produced app is dynamically linked to some libs, I might have to look into that

vdmit commented 7 years ago

Good news, now I have some progress with settings: no-web-preview Surprisingly, it was quite easy to extend settings box. There are some problems with layout left... well, copypaste is your friend, but not the best one :) I'm pretty sure that I'll fix this.

When I started new (own) version, it appeared to work like fresh installation (with sms passcode and default settings). I'm not sure if it's correct, but... still, it works.

stek29 commented 7 years ago

@vdmit Nobody said adding settings is hard -- it's super easy (but having to deal with manual layout is kinda gross...) The problem is that settings adding more and more settings is not a sane thing to do -- not for Telegram. Telegram is not WeeChat or Pidgin.

Also, if I understood correctly, you're just setting height of preview to 0, or am I wrong?

vdmit commented 7 years ago

@stek29

  1. On settings number: Yeah, you're right. Good app should have no control panel like aircrafts do. But how many times a day you visit your settings? Typically it's zero, I suppose. And how many times do you deal with links? Everyday. In our work, we send tons of links among our collegues, and these previews waste all the history area, and looking through the history makes the mousewheel burn.

  2. On implementation: No, I don't deal with geometry at all. I just don't load preview itself - just like in case of empty page. I've almost finished my fix with 2 new checkboxes and it looks pretty cool, so I'm going to make a PR in a while. You may observe implementation there.

shrpne commented 7 years ago

@stek29 one more checkbox on the settings page is bad, but one more toggle button on every link is pretty fine, right?

grasmanek94 commented 7 years ago

@stek29 going by that logic, why does Telegram fetch web content if it's not a web browser? It's fine if Telegram has a well defined boundary as to what it should do and what not, but wouldn't it be better to expand those boundaries to allow for useful and significant features? In my opinion it would indeed be better.

I'm really happy @vdmit made a PR with the feature! Thank you so much.

If there are too many options to change according to you @stek29, look at how Chrome and Firefox solved this issue: an advanced settings menu for less used settings (used only by few % of people). Or Windows, you have different menu's depending on what you want to configure (group policy, registry, and for normal/majority of the users the "Settings" app). Games solve the buttload of video options by making the most used settings accessible first (like full screen, resolution, anti alias) and making an advanced options menu for tweaking all the other stuff.

My point trying to be: If there is room for improvement, even for a small percentage for people (not everyone has a $6,000 gaming rig that can support the highest settings, yet they do make them, 4K textures, 4K res support, SLI support, etc, just for those 1%), then just find a way to give those 1% people that option (if it's feasible of course, in this case a PR has been made, so the features and options are there).

stek29 commented 7 years ago

@shrpne Why not?

@vdmit

No, I don't deal with geometry at all. I just don't load preview itself - just like in case of empty page.

Well, TDesktop loads it. You just don't process it I guess :)

Dimtar commented 7 years ago

@grasmanek94 I mean this with all respect but could you please explain how your build would be safe? I assume that it uses the telegram API as the desktop version does so credentials couldn't be taken?

stek29 commented 7 years ago

@grasmanek94 just noticed your edited comment. Please, have look at https://core.telegram.org/tsi/feature_philosophy. Tbh I highly doubt this would be merged.

why does Telegram fetch web content if it's not a web browser

Telegram app does not fetch web content. It just shows whatever server provides to users. And Telegram as a whole solution does fetch web content since it's useful. There are many cases: starting from not having to open the browser to look at something, and ending with search improvement.

Also, I don't think your example about 4K games fits here, but I'm not going to comment on that since it's not up for me or you to decide what features would be supported and what features won't.

grasmanek94 commented 7 years ago

@Dimtar someone else (you trust) would need to verify this by either compiling the patch and comparing the diffs (none if all settings are the same) or doing an assembly comparison. The binary I provided is just telegram desktop source, applied with a patch, compiled for Release x86 on Windows 10 with VS2015. One line has changed so the diff shouldn't be that different? I would think VS2015 produces the same code every time you compile the source somewhere.

@stek29 thanks for the link to the feature philosophy, very interesting and eye opening read. As for settings are evil, it's very true, but how could I determine if at least 5% of the users would use "disable link preview" option? I think there would be at least 5% but I have absolutely nothing to support that statement.

stek29 commented 7 years ago

@grasmanek94 I don't know :( We can't be sure if everyone who wants this feature had reached this GH repo. It was requested to Support already more than a year ago, and it's still in TG's internal requested features list.

vdmit commented 7 years ago

It's in the top 10 by comments, however, and could be googled easily (that's why I'm here). And even #277 (which irritates me too!) has currently "only" 57 likes for the first post, comparing to 80 likes here.

vdmit commented 7 years ago

@john-preston, we have an interesting discussion here. Could you please tell us your own opinion about this feature (and PR maybe too)?

stek29 commented 7 years ago

@vdmit I think he's a bit busy now with new features, and he would have a look at it after upcoming release.

andrew-phi commented 7 years ago

Please disable those damn annoying previews! Not only they steal privacy, but also valuable traffic! Add an OPTION, because USER should decide what HE needs!

ulrickno94 commented 7 years ago

+1

stek29 commented 7 years ago

@andrew-phi

they steal privacy

No, they don't. They are NOT fetched BY APP, BUT they're fetched BY SERVER. If they steal privacy by being processed by telegram servers, than it has nothing to do with TDesktop.

valuable traffic

MTProto is good at traffic usage. Really good. And those previews are usually sent in message, they're not fetched separately. To disable them you'd have to do that on server side, you can't just load part of server answer.

USER should decide what HE needs

No, asking a user what (s)he wants isn't always a good thing. Neither is polluting settings with OPTIONs.

shrpne commented 7 years ago

@stek29

No, asking a user what (s)he wants isn't always a good thing. Neither is polluting settings with OPTIONs.

Not asking isn't always good too.

I like, that telegram team trying to make app clean and simple as possible. But here is the problem, that link previews does not look clean at all, they are generated automatically and make chat window to look like a mess.

Adding toggle buttons to each link is not very useful. If it will be opened by default, user will need to close every preview on incoming and outcoming links, it consumes too much time to keep chat clean. If it will be closed by default, user will need to click each time, when he wants to see preview. If he needs to make a click, in most cases it will be faster to click straight on the link instead of preview button.

So I think this issue should be reopened and have more priority than #3330

Gubarev commented 6 years ago

I am using Telegram about a year and a half. I use it both for personal chats and for my work, so I chose Telegram as default messenger for my company. I see that Telegram gets better (super groups, voice calls, etc), however automatic link preview is the most annoying and biggest issue I ever experienced with Telegram. I would exchange all new features appeared past year just to disable preview. I think that disabling link-preview is the hottest and most desired feature and should be top-1 priority for Telegram dev team (after security updates of course).

Beside the fact it annoys me (I can handle my anger), it makes difficult to read messages for my interlocutors. In most cases people ignore the text of sibling messages if it contains link, because they are focused on title and image of preview. It leads to persistent misunderstanding. People simply do not notice messages right before or right after previews.

So I see only three options that may satisfy our needs:

  1. Completely remove preview (ideal case).
  2. Make it disabled by default. Users that want to see preview should enable preview for certain message (e.g. by clicking toggle button or display popup by mouse hover) or enable preview by default in settings.
  3. Make possible for sender to choose to insert or not insert preview for his message.

Please, let us hope that it will be resolved once! I am afraid that despite other good features of Telegram we are really have to migrate to other message services.

dhowe commented 6 years ago

I've already moved back to whatsapp and signal b/c of this issues. What a shame...

john-preston commented 6 years ago

@Gubarev 3. is possible right now.

cryptobug commented 6 years ago

I need an option to remove link preview in Telegram completely. In settings, in config, in registry, whatever. It's a shame such a software team adds an option I don't need without disabling possibility. Looks like they say for a reason that if you don't buy product means YOU are the product. Will start using Telegram again only after this option is in place. Thank you.

dariox2 commented 6 years ago

To those who are against an option to disable the preview: do you know what a "one-time link" is?

I personally find auto-recognising links annoying (i.e. auto-prepend number sequences with "http://" when they aren't links but the editor assumes they are).

A possible workaround is to send everythink enclosed in the pre-formatted text markers, as in: `\``your.link.here```