zulip/zulip-terminal

Add support for copying code snippets

Aperta

#1123 aperta il 20 ago 2021

 (30 commenti) (0 reazioni) (0 assegnatari)Python (352 fork)github user discovery
feature parity: 04good first issuehelp wantedmissing feature: user

Metriche repository

Star
 (853 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Often it's useful to extract code - or maybe any quoted text? - from a message.

The likely initial way to implement this would be to ultimately add an extra (optional) section to the message information popup. However, as with in-message links or topic links, this feature requires solid implementation of extraction of code blocks first into a format the popup can show.

Things to consider:

  • each code section may have a language (eg. bash, python), which it would be good to indicate in an entry
  • we don't want to list the full section in the message information popup, just enough to be unique
  • in the short term, activating the entry for the code could copy it
  • in the longer term we may want to extend the copy feature to other links too, and activation could instead trigger a feature like #985

NOTE: I've marked this as a good first issue, but this may require a deeper dive into multiple areas!

Guida contributor