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

Ability to quote from previous messages

Open rockneverdies55 opened this issue 11 years ago • 25 comments

It would be nice to be able to quote from earlier messages?

It's very helpful feature when referring to something that's said earlier in long conversations...

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

rockneverdies55 avatar Jun 06 '15 15:06 rockneverdies55

+1

I'm personally a fan of the way a Vanilla forum plugin does it; you select a snippet of text, it pops up a small 'Quote' button right below your selection, and you can click it to quote that specific snippet with the username and such prefixed.

Perhaps in combination with a 'quote' icon for the entire message, in the place where also the edit icon goes. That way you have an easy way to quote both partial and full messages.

joepie91 avatar Jun 08 '15 03:06 joepie91

also quoting yourself via > should be possible (you can even do this in this chat)

> This is a quote

This is a quote

chrisidefix avatar Jun 08 '15 07:06 chrisidefix

a link to quote a message that simply copy the message to "textbox" with the > character, is something easy to do. is it enough? or do you think it should link to the quoted message or something like that?

sampaiodiego avatar Jun 08 '15 17:06 sampaiodiego

@sampaiodiego - as my opinion it can be thought of as 2 steps process. Of course linking quoted texts to the originals would be very nice. However, if basic quoting functionality is easy enough to implement, then let's get that in asap. Then later, linking quoted texts to their originals can be done as an additional enhancement.

rockneverdies55 avatar Jun 08 '15 17:06 rockneverdies55

ok. I think we may change the pencil edit icon to an 'cog' icon with extra options, like edit, quote.. what you think?

sampaiodiego avatar Jun 08 '15 18:06 sampaiodiego

Sounds very good!..

rockneverdies55 avatar Jun 08 '15 18:06 rockneverdies55

Sounds good as initial implementation. I'd still support implementing "selection quotes" at a later point as well, though :)

EDIT: Hmm, do we need a cog icon? You'll rarely want to quote an editable message and vice versa, and it'd introduce an extra click.

joepie91 avatar Jun 09 '15 03:06 joepie91

We've implemented the basic > quote

So I'll move the issue to a later milestone as it is not a priority now.

engelgabriel avatar Jun 17 '15 05:06 engelgabriel

@engelgabriel Is the "quote" feature implemented in v0.5.0?

AntouanK avatar Oct 13 '15 16:10 AntouanK

@engelgabriel I can't pick a best implementation, as I think they could all be improved on; Gitter and PureCloud both take very different approaches to the UX of this type of feature. I think PureCloud's is a bit more efficient, though.

elwayman02 avatar Oct 14 '15 07:10 elwayman02

@elwayman02 the Gitter implementation is very simple, it only adds a button on the message that copies it to the textarea with a ">" in front. Is that enough? We can do that right now.

image

image

image

engelgabriel avatar Oct 14 '15 12:10 engelgabriel

And puts a cursor into a new line afterwards without the >. I think that would be enough.

mitar avatar Oct 14 '15 13:10 mitar

Ok, let's do that.

  • I mean, let's ask Diego to do that :smile:

engelgabriel avatar Oct 14 '15 13:10 engelgabriel

I think I was misunderstood. If I go in https://demo.rocket.chat and post this:

foo
> bar

I see this as expected: screen shot 2015-10-14 at 15 03 47

But, in the rocket.chat I deployed in my own server ( by cloning the repo and using the docker deployment ) I see that: screen shot 2015-10-14 at 15 04 43

So apparently there is a version mismatch... How can I inspect the versions on both of them and see what's what and what's implemented in each version?

AntouanK avatar Oct 14 '15 14:10 AntouanK

@AntouanK looks like you are running an outdated version. Can you just pull an updated version from GitHub?

gmsecrieru avatar Oct 14 '15 14:10 gmsecrieru

@gmsecrieru I'll do that.

Since I'll have to remove/restart the containers in the docker compose set up, that's brings another thing I would add in the README: How to update/restart without losing data. As in, mount a file-system directory, or a container as a volume, in order for data to persist even if you had to remove/restart the 2 basic containers ( meteor and mongo ). I got this problem yesterday when I restarted and I lost everything when I killed docker-compose ( users/message etc ). Now I got a FS directory mounted for the mongo files and the upload/avatars to persist.

I can help by making a PR for that, if you point out to me what exactly we want people to be aware of when they remove/restart containers.

AntouanK avatar Oct 14 '15 14:10 AntouanK

Sorry about you losing your data @AntouanK

@Sing-Li can you point him on the right direction on how to do the PR for that?

engelgabriel avatar Oct 14 '15 14:10 engelgabriel

@engelgabriel It's alright, I was just testing it anyway. But it's an important thing to point out for other people.

AntouanK avatar Oct 14 '15 15:10 AntouanK

It would be nice also if the quoted person gets a mention/alert. Since I think it is mostly used to reply to an old message.

So quoting the old message or a snippet if it was long maybe whit a link to the original if someone wants to see the whole thing or catch up with the conversation.

fduraibi avatar Dec 09 '15 18:12 fduraibi

I added a simple quote button to my RocketChat instance with the following script (you can paste it in the "layout" section of the admin section):

Meteor.startup(function() {
  RocketChat.MessageAction.addButton({
    id: 'quote-message',
    icon: 'icon-quote-left',
    i18nLabel: 'Quote Message',
    context: ['message', 'message-mobile'],
    action: function(event, instance) {
      var m = this._arguments[1];
      $('.message-dropdown').hide();
      var input = instance.find('.input-message');
      var text = input.value;
      if (text) {
        text += '\n\n';
      }
      text += '@' + m.u.username + ' said:\n';
      var lines = m.msg.split(/\r\n|\r|\n/);
      for (var i = 0; i < lines.length; i++) {
        text += '> ' + lines[i] + '\n';
      }
      input.value = text;
      input.focus();
      $(input).keyup();
    }
  })
});

leifkb avatar May 02 '16 17:05 leifkb