zulip-terminal icon indicating copy to clipboard operation
zulip-terminal copied to clipboard

Copy/pasting links to messages

Open neiljp opened this issue 4 years ago • 2 comments

While autocomplete does handle #stream and (eventually) #stream>topic name, it would be useful to have ZT be able to copy a link to a selected message both optionally more specifically (id) and perhaps in different formats.

This could be of benefit both for:

  • moving from a message context in a ZT session to a web-browser case (URL), including indirect cases such as sending a link out-of-band via eg email or pasting a link into markdown in a PR/issue (ie. outside the remit of #698)
  • referring to messages better internally to ZT, ie. providing an easier way to guarantee a cross-reference is good by reading one topic, copylinking it, then composing in another location with a pastelink. Autocomplete only goes so far - where was that topic?!

The form of such a link could be:

  • pm or pm+near (of no use outside of other PMs - we could warn this?)
  • stream+topic or stream+topic+near

These URLs are managed by the server and already interpreted by ZT as usable jumping/narrowing opportunities (PMs will be soon).

One challenge is how to determine/specify the style/format:

  • include 'near' or not? (ie. specific message or not?)
  • internal link format (#stream>topic name - no near available?) vs simple absolute URL vs combined (eg. markdown)

neiljp avatar Jan 28 '21 19:01 neiljp

I would like to work on this issue.

mkp6781 avatar Mar 29 '21 18:03 mkp6781

@mkp6781 Thanks for your interest in this issue, but I have already been discussing/working on this for a while now. I have been meaning to add a reliable copy-paste mechanism for ZT in #880 (currently only for stream-email but could be easily extended for MessageLinks as well). I didn't claim this issue, since some discussion is likely pending, plus, the copy/paste mechanism is not finalized, since #880 is not merged yet.

Here are some of the recent discussion revolving around this issue on CZO, if you want to have a read or an opinion that you want to share:

zee-bit avatar Mar 29 '21 18:03 zee-bit