integrations / microsoft-teams

Bringing your code and work to the conversations you care about with the GitHub and Microsoft integration
428 stars 95 forks source link

Collapse MS Teams preview of GitHub file link #295

Open DOH-SRE1303 opened 1 year ago

DOH-SRE1303 commented 1 year ago

Is your feature request related to a problem? Please describe. When linking to large files in MS Teams chats, such as scripts or markdown, the preview card is also huge. It displays ALL the lines of that file in the chat message.

Describe the solution you'd like MS Teams default view for inserted code blocks in chat is collapsed and the details can be expanded on request by clicking Expand or Collapse again to minimize. This would be adequate for ensuring large files do not spam chat. Alternatively, it would be nice for the previews of linked files to be disabled, as sharing links to specific files on specific branches is very useful to the teams I work with.

Describe alternatives you've considered The only real alternative for me is to not share links to GitHub files while using the GitHub + Teams integration apps, but this is impractical.

Additional context Example of 200 line script automatically previewed in MS Teams chat image

Example of a MS Teams code block with default collapsed view image

HaydenReeve commented 5 months ago

Related to #200

This is such a frustrating realisation that has made me uninstall the app from every chat service we wanted to use it in.

In a linear chat history we must be able to control the verbosity of the cards that this app generates. It's untenable to have such huge messages creating a constant stream of visual noise.

Please prioritise this.