c2corg / v6_ui

UI for c2c.org v6
GNU Affero General Public License v3.0
7 stars 12 forks source link

Parsing of tags used for articles #1517

Closed desnoes closed 7 years ago

desnoes commented 7 years ago

Implement the parsers for tags used in Petzl articles: [important col_25][/important] [important col_50] [/important]

[warning col_66][/warning]

[p]

[video 852,533][/video] [col 0] [/col] [col 0 left alone][/col] [col 25 alone] [/col] [col 33 text_left] [/col] [col 50 alone] [/col] [col 50 left alone] [/col] [col 33 inline_left text_left] [/col] [col 66 text_left][/col]

[img=714797 orig no_border legend_top no_picto left] [/img] [img=714798 orig no_border legend_top no_picto inline_left][/img]

[picto picto_open /] [picto picto_m /]

[acr=Force de choc][/acr]

stef74 commented 7 years ago

For picto is not an good idea ... You have just to use image balise (et store image on server).

For other no opinion ... but we have to challenge if really necessary, reproduce the complexity of v5 is not an good idea.

asaunier commented 7 years ago
[important col_25][/important]
[important col_50] [/important]
[warning col_66][/warning]

Tags "important" and "warning" are already supported. I recommend to remove the extra "col_*" options. Ditto for the "img" tag: do we really need all those options?

[p]

Is this tag really needed? Adding a blank line already creates a paragraph I think.

For picto is not an good idea

+1

desnoes commented 7 years ago

I have no opinion yet, i've just copied the list of balises used in Petzl's articles.

brunobesson commented 7 years ago

Video is now handled (although I decided not to support sizing - TBD if needed)

brunobesson commented 7 years ago

Is this tag really needed? Adding a blank line already creates a paragraph I think.

I think we can get rid of it too.

desnoes commented 7 years ago

Here is an update of the list of parsers:

[col 0] [/col] [col 0 left alone][/col] [col 25 alone] [/col] [col 33 text_left] [/col] [col 50 alone] [/col] [col 50 left alone] [/col] [col 33 inline_left text_left] [/col] [col 66 text_left][/col]

[img=714797 orig no_border legend_top no_picto left] [/img] [img=714798 orig no_border legend_top no_picto inline_left][/img]

[acr=Force de choc][/acr]

TBD: do we need all these options for [col] and [img] ? Maybe not.

stef74 commented 7 years ago

What do col ?

asaunier commented 7 years ago

Columns. A bit like cards next to each other but without a fixed height (but I guess cols next to each other have the same height). Perhaps it could be converted to <div> elements with a display: inline-block; style (or flex like for cards?) and a width depending on the numeric attribute.

But yes, we need more details on what each of the attributes does. Else it is impossible to figure out what work is implied.

asaunier commented 7 years ago

[acr=Force de choc][/acr]

Do we really really need this? OK this is probably an easy conversion to the HTML tag <abbr>: https://www.creativejuiz.fr/blog/veille-technologique/lelement-abbr-les-specifications-html5

But adding tags as a cost on the server load and the performances. I would recommend to keep the number of supported tags as low as possible.

desnoes commented 7 years ago

Do we really really need this?

I don't know. I need to figure out where and why it was used. I'll do that when i come back from my ski tour (departure tonight).

asaunier commented 7 years ago

@desnoes Have you figured out if we really need the [acr] tag?

Could you please also provide explanations about the various options mentioned in your examples?

[col 0] [/col] [col 0 left alone][/col] [col 25 alone] [/col] [col 33 text_left] [/col] [col 50 alone] [/col] [col 50 left alone] [/col] [col 33 inline_left text_left] [/col] [col 66 text_left][/col] [img=714797 orig no_border legend_top no_picto left] [/img] [img=714798 orig no_border legend_top no_picto inline_left][/img]

Do we really need all those options? I'm pretty sure we don't.

desnoes commented 7 years ago

@asaunier : i am modifying all Petzl's articles without using all these balises (all french version are already modified). We don't need the [col] and [acr] balises. This is the same for all the options for [img]. I suggest to close this issue.