zulip / zulip

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
https://zulip.com
Apache License 2.0
21.22k stars 7.67k forks source link

Enhancement: Highlight Text and type 'r' to Have Text Auto-Quoted in Reply #8951

Open stone212 opened 6 years ago

stone212 commented 6 years ago

It is difficult to know what another user is referring to when you receive a reply. A useful solution:

If I am reading a message from another user and I want to reply to part of that message, I would like to be able to do this:

  1. Highlight the text I want to reply to.

  2. Hit 'r'" to Reply

  3. Now my Compose box has the text that I highlighted preceeded by a chevron and the cursor beneath it so I can start my reply.

akashnimare commented 6 years ago

@stone212 you could use > to quote and reply to message though we don't support the highlight and reply.

stone212 commented 6 years ago

@akashnimare

you could use > to quote and reply to message

You mean quote the entire message right?

we don't support the highlight and reply.

That's why this is titled an "Enhancement" :)

zulipbot commented 6 years ago

Hello @zulip/server-message-view members, this issue was labeled with the "area: message view" label, so you may want to check it out!

timabbott commented 6 years ago

This is a great idea, and probably not hard. Thanks for the suggestion @stone212!

lonerz commented 6 years ago

@zulipbot claim

lonerz commented 6 years ago

This seems a little harder than it looks, especially if the highlighted text has some type of markdown applied. Any tips for taking care of those cases?

timabbott commented 6 years ago

You can try using toMarkdown to convert it back into input style syntax?

zulipbot commented 6 years ago

Hello @lonerz, you have been unassigned from this issue because you have not updated this issue or any referenced pull requests for over 14 days.

You can reclaim this issue or claim any other issue by commenting @zulipbot claim on that issue.

Thanks for your contributions, and hope to see you again soon!

eddyb commented 6 years ago

I would prefer to have this replace selecting a single message (which interferes with scrolling).

timabbott commented 6 years ago

@eddyb can you explain the problem you're bringing up more clearly?

eddyb commented 6 years ago

I suppose it wasn't brought up on this thread already, sorry for being so sparse.

What I mean is that there's a message selection behavior I dislike (for several reasons that may be hard to articulate, but mainly it overrides scrolling behavior and controls whether the reply box is visible), and I would prefer if the selection was per-topic not per-message, and clicking on messages (for links/selection/etc.) had no UI effect when staying all within one topic.

The connection with this issue is that the only usecase I've been told about for the current message selection behavior is being able to quote-reply to messages, and if quote-reply would be moved to selecting text within a message (which has better browser integration), I would prefer that.

rishig commented 6 years ago

Not sure if this exactly resolves what you're saying, but I think a cool thing could be that on selection, we open a little menu next to the selection that has:

stone212 commented 6 years ago

@rishig That's not what I'm suggesting. I think it would be weird and unnecessary. Weird because it would be unique. What other applications bring up a menu when you highlight something? You usually have to highlight and then click.

The other reason I think this is unnecessary is because if you have something highlighted you can type CTRL-C.

The idea here is to make a small change (in terms of UI, not sure about coding) to the UI. Now when you want to reply to a message you click inside and hit 'r'. I am suggesting it would be cool that you can highlight the actual text you want to reply to and hit 'r' and that text will automatically appear in a new box, under the same topic, and the text will have a '>' next to it and the cursor will be below the text.

As far as copying and copying to clipboard this already almost exists if the user's OS supports a right-click menu as most do. It is the one extra step but that extra step is consistent across all applications the user uses. Why "reinvent the wheel"?

gautelund commented 3 years ago

I second this. I want to be able to select text, reply and quote, and get just the selected text quoted. Today I reply and quote, or hit >, and then edit the quoted text. The ferature requested here would be faster and more intuitive.

camsteffen commented 3 years ago

FWIW GitHub has this feature. If you highlight text and click "Quote reply", it only includes the selected text. The main reason this feature is useful IMO is that it preserves formatting. Copy and paste loses formatting.