Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

[BUG]: Unable to replace the query string parameter; it instead appends to it.

Open Spiral-Memory opened this issue 2 years ago • 1 comments

Description:

Currently, when quoting a message and sending it, the message link gets wrapped inside the time text/box, which is inappropriate behavior. It doesn't make much sense. Instead, the quoted message should be wrapped over the complete box so that if anyone clicks on that box, they will be scrolled towards that message easily.

Steps to reproduce:

  1. Open Rocket.Chat.
  2. Send a message, for example, "Hi," with mentioning someone in the channel.
  3. Open the mentions tab and click on Jump to Message.
  4. Click it multiple times; the query parameter will get added multiple times rather than replacing it.
  5. Also, this will prohibit us from jumping to another message if I have already jumped to one.
  6. The same behavior is present in pinned messages or starred messages.

Expected behavior:

Every time we jump to a message, it should replace the query parameter to go to the specific message.

Actual behavior:

The query parameter gets appended to the previous one, causing unexpected behavior.

https://github.com/RocketChat/Rocket.Chat/assets/78961432/3c45656a-2d33-43e6-a456-f61d85baef60

Server Setup Information:

  • Rocket.Chat Server Version: 6.7.0-develop
  • Operating System: Ubuntu 22.04.3 LTS
  • Deployment Method: Local development server deployment
  • NodeJS Version: 14.21.4 - x64
  • MongoDB Version: 6.0.3

Client Setup Information

  • Desktop App or Browser Version: Microsoft Edge Version 120.0.2210.133 (Official build) (64-bit)
  • Operating System: Ubuntu 22.04.3 LTS

Spiral-Memory avatar Feb 16 '24 05:02 Spiral-Memory

@hugocostadev @dougfabris @tassoevan , I would like to work on this issue. I tried debugging the problem, but it seems like replace: true is already being sent to the navigate function. Could you please help me understand what might be the issue then? I suspect it might be related to the navigate function itself, which could be associated with the @rocket.chat/ui-contexts module. I am not sure; I need a little guidance to move forward with it. If you also feel that it needs to be fixed, your assistance would be greatly appreciated.

image

Spiral-Memory avatar Feb 27 '24 14:02 Spiral-Memory