microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
161.78k stars 28.44k forks source link

[Feature request] Native VS Code support for GitHub Alerts #209652

Open d-kleine opened 4 months ago

d-kleine commented 4 months ago

Please add native VS Code support for GitHub Alerts, e.g.:

[!NOTE]
Highlights information that users should take into account, even when skimming.

[!TIP] Optional information to help a user be more successful.

[!IMPORTANT]
Crucial information necessary for users to succeed.

[!WARNING]
Critical content demanding immediate user attention due to potential risks.

[!CAUTION] Negative potential consequences of an action.

Right now in VS Code, you need an external extension for displaying the markdown for these alerts, lacking features like creating snippet commands to quickly add alerts.

sinsukehlab commented 4 months ago

I think a GitHub official extension, which does not exist currently, will suffice.

d-kleine commented 4 months ago

I think a GitHub official extension will suffice.

Which one? Can you link that one please? Afaik there is "GitHub" extension. All official extension from GitHub are related to special services, like "Git Pull Requests", "GitHub Actions", etc., but there is no "GitHub" or any official extension released by Microsoft that deals with markdown.

I have several official extensions from Microsoft for GitHub services installed, and this did not resolve the markdown issue. And by this feature request, I am asking for a feature that VS Code would do the rendering for the GitHub Alerts natively (=by its own, without having any extension enabled) for the preview.

Right now, the native preview is: grafik

When having for instance this external extension enabled: grafik

So, currently displaying the GitHub Alerts markdown in the preview does only work with external extensions only. With this, I am asking for an integration of a feature displaying GitHub Alerts markdown in VS Code natively, without needing any extension.

sinsukehlab commented 4 months ago

Oh, I mean GitHub should make a new extension to support GitHub Flavored Markdown in VSCode instead of VSCode supporting GitHub Flavored Markdown natively, for this rendering is specific to GitHub Flavored Markdown.

alexr00 commented 4 months ago

@mjbvz would you be amenable to our built in markdown rendering including support for GitHub alerts?

VSCodeTriageBot commented 4 months ago

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

mjbvz commented 4 months ago

@alexr00 I'm more likely to say yes if we can keep this functionality isolated to the comments view. Should be possible by changing markdownRenderer to take an github option or something like that

pboling commented 4 months ago

Please don't.

Until GitHub Alerts have more widespread usage, I'd be a bit concerned that this would encourage coders to mistakenly use them in environments where they're not supported. For example, my work uses Bitbucket ( 🤮 ) and I think there's a decent chance I'd have to waste time explaining that just because it looks pretty in VS Code doesn't mean it will look pretty on the web 😆

Things like tables are "extended syntax" but are supported in so many environments that it makes sense for VS Code to also render them. But I don't think GitHub Alerts have enough wide-spread support yet IMO.

For this reason I feel like it shouldn't be part of the default behavior, and should be part of a "GitHub Markdown" extension (microsoft/vscode#209652 (comment)) or at least a setting that you'd have to opt in to.

d-kleine commented 4 months ago

@mjbvz This question might go beyond the scope of this feature request, but if it's not useful to implement GitHub-only markdown (incl. Alerts) directly into VS Code, is there any chance Microsoft provides (and maintains) an official GitHub Markdown Preview extension like the ones you have privately developed for VS Code?

https://marketplace.visualstudio.com/items?itemName=bierner.markdown-preview-github-styles https://code.visualstudio.com/Docs/languages/markdown#_markdown-preview

Even though users would still need an extension to display the markdown as on GitHub, I believe there's a significant opportunity here. If Microsoft could provide an official All-in-One GitHub Markdown Preview tool, it would bridge the gap between GitHub and VS Code. From my point of view, this would not only allow users to preview their GitHub Markdown within the VS Code environment but also ensure its compatibility and reliability from an official source, as it would be maintained by Microsoft.

sinsukehlab commented 4 months ago

Any native support for the alerts feature of GitHub Flavored Markdown is an absurd idea. Let a GitHub-made extension (should be disabled by default) support the feature. No support is much better than native support.

VSCodeTriageBot commented 2 months ago

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

sinsukehlab commented 2 months ago

@VSCodeTriageBot Close this feature request now.

VSCodeTriageBot commented 2 months ago

:slightly_smiling_face: This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

sinsukehlab commented 2 months ago

@alexr00 Close this feature request.

pboling commented 2 months ago

The wisdom of crowds is terrible. 😭

alexr00 commented 2 months ago

@mjbvz, what do you think of a new property on the MarkdownString, similar to supportThemeIcons: supportAlerts?