godot-asset-library icon indicating copy to clipboard operation
godot-asset-library copied to clipboard

Support Markdown or BBCode for asset descriptions

Open Calinou opened this issue 9 years ago • 7 comments

Markdown or BBCode should be supported in asset descriptions. See below for a comparison of each. Perhaps the asset store could use Markdown, and convert it to BBCode when needed for Godot's purposes.

Markdown

Upsides

  • Simple to use
  • Widely used and supported

Downsides

  • Currently not supported by Godot

BBCode

Upsides

  • Supported by Godot through the RichTextLabel node

Downsides

  • Not as easy to read and write as Markdown
  • Not very popular today

Calinou avatar Aug 08 '16 11:08 Calinou

PHP has a PECL extension + PEAR package for BBCode - http://php.net/manual/en/book.bbcode.php

Given that it is possible to install PEAR packages through composer, I guess we might use it just fine ^^

bojidar-bg avatar Aug 23 '16 08:08 bojidar-bg

Not blocking for beta.

akien-mga avatar Sep 14 '16 08:09 akien-mga

This is supported in the asset library rewrite, which will become the new official platform sometime in the future. I don't have an ETA for deploying it though.

Calinou avatar Mar 24 '22 16:03 Calinou

so, without the rewrite (https://github.com/Calinou/godot-asset-library-laravel/issues/467), will it be supported in this asset lib, or only in the next full rewrite mentioned in that issue?

Qubus0 avatar Jul 15 '23 15:07 Qubus0

so, without the rewrite (Calinou/godot-asset-library-laravel#467), will it be supported in this asset lib, or only in the next full rewrite mentioned in that issue?

This could be supported in the current asset library, with two conditions:

  • We find someone who's willing to integrate a Markdown parsing library in the current backend. This will require a database migration, as you need a new field to store the rendered HTML (existing field would store the source text). This HTML field would probably not be returned by the API.
  • We implement Markdown to BBCode conversion in the editor (could also be exposed to projects with a static function in RichTextLabel).

Calinou avatar Jul 15 '23 18:07 Calinou

Does it really need a backend parser? why not keep it in the frontend only with something like https://github.com/markedjs/marked? And, as much as I would love md to bbcode - is it really necessary? I've seen quite a few assets use markdown (mostly when the description is just the readme) and it looks completely fine

Qubus0 avatar Jul 15 '23 21:07 Qubus0

Does it really need a backend parser? why not keep it in the frontend only with something like markedjs/marked?

It can be done with a client-side library, but it may feel sluggish on low-end/mobile devices. While we may initially expect most descriptions to be short, many people will be copy-pasting their asset's entire README if we present them with an interface that allows them to do that :slightly_smiling_face:

And, as much as I would love md to bbcode - is it really necessary? I've seen quite a few assets use markdown (mostly when the description is just the readme) and it looks completely fine

For users, Markdown source is awkward to read unformatted when it contains named links. The rest is usually not too bad though.

Calinou avatar Jul 15 '23 21:07 Calinou