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

Ability to quote from previous messages #164

Closed
rockneverdies55 opened this issue Jun 6, 2015 · 25 comments · Fixed by #3109
Closed

Ability to quote from previous messages #164

rockneverdies55 opened this issue Jun 6, 2015 · 25 comments · Fixed by #3109
Assignees
Labels
Milestone

Comments

@rockneverdies55
Copy link

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.

@joepie91
Copy link

joepie91 commented Jun 8, 2015

+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.

@chrisidefix
Copy link

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

> This is a quote

This is a quote

@sampaiodiego
Copy link
Member

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?

@rockneverdies55
Copy link
Author

@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.

@sampaiodiego
Copy link
Member

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

@rockneverdies55
Copy link
Author

Sounds very good!..

@sampaiodiego sampaiodiego added this to the v0.3 milestone Jun 8, 2015
@joepie91
Copy link

joepie91 commented Jun 9, 2015

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.

@engelgabriel
Copy link
Member

We've implemented the basic > quote

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

@engelgabriel engelgabriel modified the milestones: v0.3, v1.1 Jun 17, 2015
@engelgabriel engelgabriel changed the title Feature Request: Ability to quote from previous messages Ability to quote from previous messages Jul 1, 2015
@rodrigok rodrigok modified the milestones: v1.1, Next Aug 15, 2015
@AntouanK
Copy link

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

@elwayman02
Copy link

@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.

@engelgabriel
Copy link
Member

@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

@mitar
Copy link
Contributor

mitar commented Oct 14, 2015

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

@engelgabriel
Copy link
Member

Ok, let's do that.

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

@AntouanK
Copy link

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?

@gmsecrieru
Copy link
Contributor

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

@AntouanK
Copy link

@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.

@engelgabriel
Copy link
Member

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?

@AntouanK
Copy link

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

@fduraibi
Copy link
Contributor

fduraibi commented Dec 9, 2015

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.

@leifkb
Copy link
Contributor

leifkb commented May 2, 2016

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();
    }
  })
});

@engelgabriel
Copy link
Member

Hi @leifkb why dont you submit a Pull Request for us?

@engelgabriel engelgabriel modified the milestones: 0.30.0, Important May 2, 2016
@leifkb
Copy link
Contributor

leifkb commented May 2, 2016

Sure, I can try. Not really familiar with the codebase -- is there a specific correct place for this code to live?

@marceloschmidt
Copy link
Member

Hey @leifkb thanks for your support!
I think you can add your code based on this code here https://github.com/RocketChat/Rocket.Chat/blob/develop/packages%2Frocketchat-lib%2Fclient%2FMessageAction.coffee#L169-L184
You could create your message action there.

@fduraibi
Copy link
Contributor

fduraibi commented May 4, 2016

@leifkb Great work, but shouldn't the user message be below the quoted message? Since naturally it is a response to the quoted text!

@engelgabriel
Copy link
Member

We agree.. and we will add that option later..

@pshute pshute mentioned this issue Oct 6, 2017
Peym4n pushed a commit to redlink-gmbh/Rocket.Chat that referenced this issue Jan 17, 2018
Peym4n pushed a commit to redlink-gmbh/Rocket.Chat that referenced this issue Jan 17, 2018
* Fixed Issues 87, 88

* Feature/mrsimpson#23 title first message to new request (RocketChat#149)

* Request title and first message while creating new request
* Make titles of inputs and placeholders more consistent
* Fix display issues:

- Dropdown overlapped by input field
- In English, the width of the creation dialog was not 100%, thus input fields within too narrow

* Minor corrections with respect to error handling:

- Refactor error display to an own template
- Show error if selected expertise on request creation is invalid (not chosen from the dropdown)
- Fix positioning of "at" on members selection if invalid

* Fixes RocketChat#151 - Misspelled label "jetzt chaten" (RocketChat#152)

* Corrections to creation dialog (RocketChat#154)

* Corrections to creation dialog

- Propagate first message properly (fixes RocketChat#153)
- Change "Name" to "Title"
- get rid of flashing error message on auto-complete-confirmation with tab

* Corrections to creation dialog

- more robust error handling
- prevent flashing of validation errors

* Fix improper clearing of request title

* Invalid Expertise field highlight

* RocketChat#156 Prefill request creation form (RocketChat#157)

* fixes RocketChat#156

- Pass topic as URL param (URL encoded) as `topic` or `expertise` (same effect)
- Title is focused if expertise is passed

* Allow pre-filling of title and question as well.

This way, fixes mrsimpson#20 : The consumer (e. g. the wiki page) can create a simple form an pass the content as parameter

* - Use the copied current() instead of the internal value
```
FlowRouter.current
ƒ () {                                                                               // 248
  // We can't trust outside, that's why we clone this                                                        …
```
- refactor query-selectors => reuse

* use FlowRouter API properly

* Setting based permissions - downport (RocketChat#158)

* Allow maintenance of per-setting permissions

(cherry picked from commit eed869a)

* Implicitly assign and revoke setting group permissions

(cherry picked from commit 28b769b)

* Improve Display of setting permissions

(cherry picked from commit 8523456)

* Add path to permission title

(cherry picked from commit c87a30d)

* Permission to access setting permissions

(cherry picked from commit 48b1076)

* Adapt wording

(cherry picked from commit daccad8)

* UI-adaptation: Allow users with permission 'manage-selected-permissions' to see and change the affected settings.
However, this is not reactive: Once the permissions for a particular setting are changed, the user needs to log  off and on again before it becomes effective in the UI.
This is most probably a consequence of the CachedCollection. This collection needed to be changed on permission-change.
In the backend however, the permissions become effective immediately.

(cherry picked from commit 00e4bb5)

* Don't adapt sorting on the client side

(cherry picked from commit 9b71b62)

* Fix: Apply changed setting permissions reactively

(cherry picked from commit 293ad73)

* Move setting-based permissions to own collection

(cherry picked from commit 8f59f1c)

* Unify collections for setting and other permissions again into one

(cherry picked from commit 8d923c2)

* Get rid of frontend exceptions on changing selected settings

(cherry picked from commit a7fdc87)

* - Sort permissions by group
- Do not try to create permissions for hidden settings in higher-level-callbacks
- Remove `setting-permissions` collection - fully integrated into `permissions`

(cherry picked from commit f007231)

* Harmonize wording in German

(cherry picked from commit 5cf5df2)

* German language informalized (RocketChat#160)

* German language informalized - Liebe Deutsche, wir kennen euch nun besser. Wir wollen ab jetzt “Du” zu einander sagen 😉

* Update de.i18n.json

* Update de.i18n.json

* Update de.i18n.json

* Allow administration even if user has got only `edit-privileged-setting` but not `view-privileged-setting`

* Revert "Fixed Issues 87, 88 (livechat on mobile devices)" (RocketChat#164)

* Create configuration expert role on startup (RocketChat#159)

* Allow maintenance of per-setting permissions

(cherry picked from commit eed869a)

* Implicitly assign and revoke setting group permissions

(cherry picked from commit 28b769b)

* Improve Display of setting permissions

(cherry picked from commit 8523456)

* Add path to permission title

(cherry picked from commit c87a30d)

* Permission to access setting permissions

(cherry picked from commit 48b1076)

* Adapt wording

(cherry picked from commit daccad8)

* UI-adaptation: Allow users with permission 'manage-selected-permissions' to see and change the affected settings.
However, this is not reactive: Once the permissions for a particular setting are changed, the user needs to log  off and on again before it becomes effective in the UI.
This is most probably a consequence of the CachedCollection. This collection needed to be changed on permission-change.
In the backend however, the permissions become effective immediately.

(cherry picked from commit 00e4bb5)

* Don't adapt sorting on the client side

(cherry picked from commit 9b71b62)

* Fix: Apply changed setting permissions reactively

(cherry picked from commit 293ad73)

* Move setting-based permissions to own collection

(cherry picked from commit 8f59f1c)

* Unify collections for setting and other permissions again into one

(cherry picked from commit 8d923c2)

* Get rid of frontend exceptions on changing selected settings

(cherry picked from commit a7fdc87)

* - Sort permissions by group
- Do not try to create permissions for hidden settings in higher-level-callbacks
- Remove `setting-permissions` collection - fully integrated into `permissions`

(cherry picked from commit f007231)

* Harmonize wording in German

(cherry picked from commit 5cf5df2)

* add configuration package

* Add default role configuration on startup

* set default system language to DE

* Reduce capabilities of config expert and introduce minor admin

* Parted the roles for configuration and managing the rest

- Manager - well - manages the application, like a minor admin. Target is that this role is capable of doing everything which is necessary while *regularly* running the application
- Config-expert is allowed to customize the application (affecting all users' experience)

* Informal german language for our custom texts (RocketChat#165)

* German language informalized - Liebe Deutsche, wir kennen euch nun besser. Wir wollen ab jetzt “Du” zu einander sagen 😉

* German texts of custom enhancement informalized

* Bump version to 0.5.0

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

Successfully merging a pull request may close this issue.