vatesfr / xen-orchestra

The global orchestration solution to manage and backup XCP-ng and XenServer.
https://xen-orchestra.com
Other
775 stars 262 forks source link

Add color support for badges in VM Notes (Markdown) #7614

Open tuxpowered opened 5 months ago

tuxpowered commented 5 months ago

With the addition of VM notes being supported, it would be nice to support the colorized banner

https://github.com/orgs/community/discussions/16925

https://talk.commonmark.org/t/github-is-beta-testing-their-own-admonition-syntax-we-should-weigh-in/4173/21 as a way to draw attention to special instructions that might need to be taken.

It would also be nice to have the same not functionality at the Pool and Host layer.

Use case example, You have Pool that is using shared storage, adding a in the layers (Pool, Host, VM) allows a gentle reminder that they may have some special actions to take before shutting down the service.

pdonias commented 5 months ago

Hi, we rely on marked to parse Markdown in XO and they don't seem to be supporting those alert blocks for now.

julien-f commented 5 months ago

IMHO, we shouldn't link notes to a specific implementation, we should only support CommonMark and broadly supported extensions.

pdonias commented 5 months ago

Ok but even if we say we support CommonMark and even if those blocks get added to the CommonMark spec, we won't be able to render them in XO 5 until marked implements it.

julien-f commented 5 months ago

@pdonias Maked supports a number of extensions like maked-alert.

tuxpowered commented 5 months ago

The maked-alert is pretty much what the industry is supporting. Microsoft, Github, Obsidian. CommonMark made a comment that they will never support english word references [!WARNING] for example, however that already has push back.

[!WARNING] 
This is fire

Has much more readability than what common mark proposed

[!]

[!!]

[!*]

Giving that Github is implementing them, and oh, the repo is in git hub! it stands to reason that implementing a library that supports the extensions used here would be the most logical option.