MicrosoftDocs / msteams-docs

Source for the Microsoft Teams developer platform documentation.
https://aka.ms/teamsdev
Creative Commons Attribution 4.0 International
287 stars 510 forks source link

Markdown action for code block with language specification not possible #11368

Open saulipurhonen opened 3 months ago

saulipurhonen commented 3 months ago

Steps to reproduce

The documentation states that the code block with language specification should be written as ```\

OS: Mac OS 14.2.1 (23C71) Teams: 24165.1406.2974.9471

When inputting the backticks, the third backtick triggers the code block immediately making it impossible to add the language specification.

This seems to happen with both U.S. and Finnish keyboard layouts.

Expected behavior

User should be able to specify the code block language specification after the third backtick.

Actual behavior

Code block triggers in plain text mode when the third backtick has been pressed. The code block language does not seem to be accessible for keyboard users.

Error details

No response

Meghana-MSFT commented 3 months ago

@saulipurhonen - Based on description it seems like a Teams product issue, we are mainly responsible for Microsoft Teams app development related issues. If that is not the case, could you please share which document are you referring to?

saulipurhonen commented 3 months ago

@Meghana-MSFT the documentation for code block with language specification can be found in https://support.microsoft.com/en-us/office/use-markdown-formatting-in-microsoft-teams-4d10bd65-55e2-4b2d-a1f3-2bebdcd2c772

This used to work and therefore it seems to be in regression as is the inline code blocks (https://github.com/MicrosoftDocs/msteams-docs/issues/9126) and therefore it seems to be an app development related issue.

anbah34 commented 3 months ago

@saulipurhonen Please note that we changed how code block is invoked in the product. To start a code block just do a triple back tick and select the language from the drop down. We are making further improvements in code block area, so stay tuned. image

The issue with inline code blocks is very different and complex. It is also only an issue with EU language keyboards on Mac.

Note: We are updating the docs to reflect code block accurately

saulipurhonen commented 3 months ago

@anbah34 thanks for the update. Unfortunately the language selection does not seem to be accessible by keyboard and thus makes it way harder (and for some users impossible) to use than in previous CKEditor version.

BTW I'm using Finnish keyboard layout and the backtick problem of keyboards with backticks with dead keys affect triggering the code block too. It used to work until the language specification code block trigger by markdown was removed.

oldYell0wBricks commented 2 months ago

@saulipurhonen If you need keyboard access to the language selector, you can do the following:

  1. use ``` to trigger code block
  2. press the up arrow key and the cursor will move above the code block
  3. use the tab key and you will be able to navigate to the language selector
saulipurhonen commented 2 months ago

@oldYell0wBricks thank you! Not the most intuitive approach but seems to do the job.