unleash icon indicating copy to clipboard operation
unleash copied to clipboard

feat: Markdown support in flag description

Open ivarconr opened this issue 1 year ago • 4 comments

Describe the feature request

Adding support for simple syntax like bold, italic and links would help. Unsure about "heading" etc due to limited space for descriptions.

Background

Adding links to descriptions is not rendering nice.

Solution suggestions

Reuse the <Markdown> component in the rendering.

ivarconr avatar Mar 01 '24 08:03 ivarconr

In the feature page: image

Also in feature list: image

ivarconr avatar Mar 01 '24 08:03 ivarconr

The biggest challenge seems to be to add it to the "search tables" because of the highlighter code. The highlighter only support "string" and not ReactElement.

Adding highlighter when it needs to span multiple Nodes does not seem super-intuitive.

ivarconr avatar Mar 01 '24 13:03 ivarconr

I think we can do the highlight inside of the markdown component as a customer renderer. https://github.com/remarkjs/react-markdown/issues/218

ivarconr avatar Mar 01 '24 14:03 ivarconr

I think we can do the highlight inside of the markdown component as a customer renderer. https://github.com/remarkjs/react-markdown/issues/218

After thinking a bit more on this I am not sure if it really makes sense to allow markdown in the descriptions when it is in table view. This will lead to a messy table that can be hard to read. The built-in description pop-over can still be rendered as markdown.

Instead the in-cell descriptions should be rendered as readable text.

Example input:

*some* text here [link](http://somewhere.com)

Example output:

some text here link

ivarconr avatar Mar 04 '24 14:03 ivarconr