microsoft-teams icon indicating copy to clipboard operation
microsoft-teams copied to clipboard

Suggestion comment rendered in Teams as HTML

Open MichaelUrman opened this issue 4 years ago • 5 comments

Describe the bug Suggestion-only PR comment on rendered incorrectly in Teams comment

(I don't know what related scenarios may have similar rendering problems. For instance does additional text before or after the suggestion resolve the problem? Do channel and chat subscriptions match?)

To Reproduce Steps to reproduce the behavior:

  1. Subscribe to a repository, including pulls, in a teams chat with the GitHub app. subscribe redacted/redacted (A channel subscription may or may not match this behavior.)
  2. Comment as part of a PR review with a suggested change for a specific region. (When I did this I selected a few lines, added the suggestion, clicked start a review, then submitted a PR review approval with a brief parent comment.)
  3. View the Teams message from the GitHub app.

Expected behavior See a message listing the repository and either the parent or child comment.

I'm not quite sure what can and should appear in teams here. Possibly a colored text variant of the suggestion, possibly omit the suggestion. Since the suggestion was the entirety of the comment it appears to be displaying, it may be hard to omit.

Screenshots In Teams the comment was mostly HTML excerpts: image The content of the suggestion is included in the displayed HTML. The HTML excerpt ends with: image

The appearance on the Teams app for Android is similar: the HTML is visible, but it was reflowed so has lost indentation.

Desktop (please complete the following information):

  • OS: Window 10 21H1
  • Browser: Microsoft Teams Version 1.4.00.22472 (64-bit)

Additional context In the browser the (redacted) comment appears fine: image

MichaelUrman avatar Sep 22 '21 14:09 MichaelUrman

Saw another variant of this with a fenced codeblock appearing twice. First as <div class="snippet-clipboard-content position-relative" data-snippet-clipboard-copy-content="..."/> (text in the ...) followed by the content as a teams code block. As before the appearance in the PR on GitHub is fine.

Ah, this appears to be a duplicate of #103 and #112. I disagree with the categorization of it as a feature request, but either way clearly there's some code that needs writing.

MichaelUrman avatar Sep 24 '21 01:09 MichaelUrman

Any update on this one? The experience is really bad - it's impossible to read code suggestions.

MunifTanjim avatar Feb 27 '22 06:02 MunifTanjim

Bump - also from me, not a great user experience given how frequently our team uses code suggestions.

joe-warrington avatar May 20 '22 16:05 joe-warrington

We're seeing this as well. Someone missed a test case... ;-)

askpatrickw avatar Aug 03 '22 17:08 askpatrickw