xen-orchestra icon indicating copy to clipboard operation
xen-orchestra copied to clipboard

Add color support for badges in VM Notes (Markdown)

Open tuxpowered opened this issue 1 year ago • 5 comments

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.

tuxpowered avatar Apr 29 '24 23:04 tuxpowered

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

pdonias avatar Apr 30 '24 07:04 pdonias

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

julien-f avatar Apr 30 '24 07:04 julien-f

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.

pdonias avatar Apr 30 '24 09:04 pdonias

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

julien-f avatar Apr 30 '24 09:04 julien-f

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.

tuxpowered avatar Apr 30 '24 21:04 tuxpowered