Code snippets takes way too many steps. The app needs a simple way to add a snippet directly from the clmessage box without needing to click on paragraph then code then language...
Also would be nice to have a raw view of code snippets for easier copy / paste
+1 to better markdown formatting and a quick way to enable wrap text along with full-width chat bubbles.I don't see any benefit of having a max width.
# python code here
perhaps an optional w at the end of the closing ``` to indicate wrap text
Dan Peterson commented
Also... make it so I can get a maximized view of the code someone just sent me. Horizontal scroll bars because Teams wants to keep tiny uniform chat bubbles. It's not good.
Our team was quite surprised that ``` doesn't insert a "Code Snippet" and instead inserts some kind of "preformatted block" instead. ``` should really generate the same thing as doing the whole Code Snippet insertion IMHO.
Chris Tobey commented
Add diff, vhdl, and verilog support while you're at it.
Joel Day commented
MINIMUM VIABLE PRODUCT. Ignore the vote count, put it at the top of the backlog. That thing with 3000+ tickets, I'm sure.
The current implementation is limited, weird, too complicated...and I can go on. Please build a propper snippets button for LARGE pieces of code.
Ramin Baradari commented
For development teams that communicate in Teams it is essential that we can exchange code snippets, stack traces, logs, formatted data (JSON,YAML,...) and other lengthy and often structured content with ease.
Slack is doing a great job in that regards. MS has a lot of expertise with VS Code and maybe they can give some hints and inspiration for MS Teams.
Ben Sanders commented
It'd be *really* helpful if we were allowed to completely re-order the toolbar to our liking.
It is heinously, laughably, horrifically bad.
Recently Slack has made it even easier to add code snippets, there is a first-class button in their app. Feel free to get rid one or more of the _many_ emoji quick buttons you provide under the text input field.
Zitrone Nussig commented
The way Slack handles code snippets with a simple `` wrapper is something really missed in Teams.
Please provide something simple and similar in functionality.
Joel Vasallo commented
This is my main grip with Teams. Over the months, its come a long way to get parity with Slack but man does it suck sharing code.
Also the code snippet message is not widen enough, nobody wants to scroll horizontally
wayyy to many clicks to enter code snipped. should just be /code and paste
Roberto Caminos commented
Yes I'm trying to get my Dev Teams to switch from Slack to Teams and Code Snippets are a very legitimate argument for the continued use of Slack.
Code Snippet formatting should be accessible right from the "Reply" or "Start conversation" without the need to click the "Format" button first.
This might also avoid the very common problem where Devs use the "Quotes" function instead of Code Snippets.
Ricardo Parada commented
I use code snippets a lot. I also find it that it takes too many unnecessary steps to get to it.
The code block should style the code as it is being typed in. Line numbers should also be displayed. All this without having to go into a separate compose window.
Then clicking on the paper airplane button should send the code block. Command+enter should also send the code block. Moving with the cursor past the last line in the block should allow the user to type a comment below the code block to accompany the code block. Then return there should send the code block and the comment.
I also suggest that the Teams app remember the language used last time so that next time I can simply type the three backticks without the language name.
Last but not least, the code block should resize automatically if the window is resized. Right now it is fixed width and stays that width even after resizing the window. That makes it very difficult to read most code as the width used for code blocks is too narrow.
Also the way the code is formatted is a bit terrible due to the margins... the scroll feels awkward and the line wrap is just bad.
In slack to paste a code snippet you click a + button, choose code snippet, paste, and it has "Auto detect language" that works fairly well, but you can also choose the language for the few times it fails. Then you click the submit button. Including the act of pasting (assuming you don't need to pick the language) its 3 steps total.
In contrast to paste code in teams you click the expanded message button, then the code button, then paste, then have to choose a language (otherwise its plain text) then have to click insert and then finally hit send for the expanded message. I like that you can add text to the same block as the snippet... however two buttons would fix this, plus auto language detection. A "paste code" (next to the expand text button), and a insert and send button (next to the insert button).