Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open channel description links in a new tab #28167

Closed
ecke101 opened this issue Feb 24, 2023 · 9 comments
Closed

Open channel description links in a new tab #28167

ecke101 opened this issue Feb 24, 2023 · 9 comments
Assignees

Comments

@ecke101
Copy link

ecke101 commented Feb 24, 2023

Description:

In Rocketchat most links open in a new tab by default which makes sense.
The exception is channel description links.
This is an example from the blender.chat python channel. All these links open in the same tab:
bild

Steps to reproduce:

  1. Go to a channel with a link in the description.
  2. Click the link with the left mouse button.
  3. Compare the behaviour with clicking on the link with the middle mouse button.

Expected behaviour

All links should open in a new tab by default. That is they should have target="_blank".

@sufiiyan
Copy link

hello @ecke101 assign me this issue, i might solve it.

@ecke101
Copy link
Author

ecke101 commented Feb 25, 2023

hello @ecke101 assign me this issue, i might solve it.

Hello. I don't think I have the rights to do that.

@TafreedAhmad
Copy link

How to claim this? Anyone?

@Tejasp2003
Copy link

Description:

In Rocketchat most links open in a new tab by default which makes sense. The exception is channel description links. This is an example from the blender.chat python channel. All these links open in the same tab: bild

Steps to reproduce:

  1. Go to a channel with a link in the description.
  2. Click the link with the left mouse button.
  3. Compare the behaviour with clicking on the link with the middle mouse button.

Expected behavior

All links should open in a new tab by default. That is they should have target="_blank".

It's opening in a new tab only. Can you elaborate more on the issue or provide any video of the issue?

@yash-rajpal
Copy link
Member

Hey @ecke101! This works fine on the new 6.0.0 release. Can you please provide your server version on which it doesn't work? Thanks!

@yash-rajpal yash-rajpal self-assigned this Mar 17, 2023
@dudanogueira
Copy link
Contributor

This is fixed in 6.0.0
I believe by this PR #27554

Closing for now. Thanks for reporting!

@thw0rted
Copy link

There's a small issue with this fix. If your channel description links to another channel on the same server, as a user I would expect it to open in the current window. With this implementation, it opens a new tab, so now I have two RocketChat tabs going on the same server.

I made a suggestion on #6595 that channel references (#otherchannel) should be linkified automatically, but unless/until that gets implemented it isn't possible to create a channel link in the description that doesn't open a second chat tab.

Would it make sense to add an exception so that links to the current server aren't forced into a new tab?

@ecke101
Copy link
Author

ecke101 commented Apr 21, 2023

This is slightly off topic but I also noticed that clicking the "Download" button next to an image or video still opens it in the same tab.

bild

@aurisnoctis
Copy link

aurisnoctis commented Jan 29, 2024

I think this was reverting the fix of #27491

See my comment and @Gummikavalier 's comment below mine

Yes, the state of the issue seems to fluctuate. I think it broke again in RC 6.x.

Edit: Copy of my comment why new tabs are a problem

source: #27491 (comment)

Hello and thank you for Rocket.Chat!

This is not fixed, actually. I use the web client and when clicking on a link like https://chat.somedomain.cloud/channel/peer-support from another channel or channel topic in the same Rocket.Chat instance, a new browser tab opens.

At the moment # links cannot be generated in channel topics so the workaround for links in topics are https links (e.g. formatted as markdown links). They are the only way at the moment to link from one channel to another via topic, for example in a channel topic:

This channel is for general discussion, please use #peer-support to discuss technical issues.

In the above example, #peer-support is not auto-converted to a link to the channel because this is not supported in the topic field, apparently. So the workaround is to use e.g. #peer-support in the channel topic. Clicking that link, however, has undesirable effects at the moment:

  • opens a new tab when clicking it from a channel like https://chat.somedomain.cloud/channel/general instead of switching to the channel in the already open Rocket.Chat tab
  • does not open in the same Rocket.Chat desktop instance when clicking on it in the desktop client; instead, a browser window is opened and users are moved from the desktop client to the browser
Rocket.Chat version 6.3 (info from /api/info)
no further information about server available as I am a user on that Rocket.Chat instance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants