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
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).