zulip-terminal
zulip-terminal copied to clipboard
Add support for copying code snippets
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!
@zulipbot claim
Hello @kingjuno, 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!
@zulipbot claim
Welcome to Zulip, @avats-dev! We just sent you an invite to collaborate on this repository at https://github.com/zulip/zulip-terminal/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!
Here's some tips to get you off to a good start:
- Join me on the Zulip developers' server, to get help, chat about this issue, and meet the other developers.
- Unwatch this repository, so that you don't get 100 emails a day.
As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.
See you on the other side (that is, the pull request side)!
@avats-dev I am currently working on this issue and is somewhat half-implemented except for the test. I request you to take a different issue. I apologize that I forgot to claim this after 2 weeks.
@kingjuno yeah sure. Sorry, I thought it was unaddressed. @zulipbot abandon
ERROR: You have not claimed this issue to work on yet.
@zulipbot abandon
@zulipbot claim
Hello @kingjuno, 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!
@zulipbot claim
Hello @kingjuno, 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!
Hello Mr @kingjuno are you still working on this issue?
If not, I'm fairly interested in completing this issue if that's fine with you :)
@neiljp I'd like to work on this. Looks interesting.
Important link that maybe should be added to the issue text:
https://zulip.com/help/code-blocks
Organization administrators can also configure a default language for code blocks, which will be used whenever the code block has no tag.
The stated language is going to be organization-default language, unless specified otherwise, I'm guessing.
The entire code snippet doesn't need to be in the pop-up, I suppose? We could cut it off at X lines of code.
The playground feature looks pretty neat -- could work on it over the summer, since that looks like a pretty substantial PR.
@zulipbot claim
Hello @yuktasarode!
Thanks for your interest in Zulip! You have attempted to claim an issue without the label "help wanted". You can only claim and submit pull requests for issues with the help wanted label.
If this is your first time here, we recommend reading our guide for new contributors before getting started.
Please see the existing PR for this at #1134 if you intend to work on this, with the notes I left there.
There is likely more we can add upon that, but a revised version of that PR that is mergeable would be a good building block.
For example, in a later PR we can show the language, which may require the organization-default settings to be used, and we could also provide a way of showing the code-playground for the language, if there is one.
@zulipbot claim
Welcome to Zulip, @yuktasarode! We just sent you an invite to collaborate on this repository at https://github.com/zulip/zulip-terminal/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!
Here's some tips to get you off to a good start:
- Join me on the Zulip developers' server, to get help, chat about this issue, and meet the other developers.
- Unwatch this repository, so that you don't get 100 emails a day.
As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.
See you on the other side (that is, the pull request side)!
@yuktasarode You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!
@zulipbot claim
@yuktasarode You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!
@zulipbot claim
@rsashank You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!
@zulipbot claim
Welcome to Zulip, @H4K3R13! We just sent you an invite to collaborate on this repository at https://github.com/zulip/zulip-terminal/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!
Here's some tips to get you off to a good start:
- Join me on the Zulip developers' server, to get help, chat about this issue, and meet the other developers.
- Unwatch this repository, so that you don't get 100 emails a day.
As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.
See you on the other side (that is, the pull request side)!
Hello @H4K3R13, I have an open PR for this already, I'd suggest looking into other issues.
Yep. I noticed that I was looking through your code . Good work 👍.
@zulipbot abandon