Better support for tables
Current: we support GFMD syntax for tables Suggestions for improvements:
- Ability to use more complex tables such as merged cells e.g., https://www.npmjs.com/package/markdown-it-multimd-table
- Ability to create a table based on content in a csv file
- Ability to sort columns
- Ability to specify larger amounts and different varieties of content for a cell (e.g., a panel within a cell)
just a note: markdown-it-multimd-table's multiline feature (using \ to continue lines) is wildly incompatible with our current process unfortunately, as we parse html before markdown. It would require a significant architectural change and breaking footnotes to accomodate it.
It is toggleable though, so if the other features have no conflict we could still look to replace gfmd table with it
I think asciidoc has a more powerful tables syntax. Of course unlikely we can reuse their parser but we can get some inspiration for the syntax.
Would using our own tag (like <puml>) to surround the table content allow us to use an entirely different syntax and parse it at a later stage? Not sure about the technical side but I had a feeling that @crphang was aiming for that kind of flexibility to use different syntax schemes for different components.
unfortunately not as well, as you'd end up still having to parse the html inside the tag. (since tables can contain html) The ability to treat custom tags like script/style tags is more apt for an proprietary syntax, like puml.
unfortunately not as well, as you'd end up still having to parse the html inside the tag. (since tables can contain html) The ability to treat custom tags like script/style tags is more apt for an proprietary syntax, like puml.
Yes, that's true.
possible with processing order change in #1403
Will work on adding a table component that has a "src" attribute pointing to relative path to then csv file. Will try make the component to extensible.
I will look into enabling asciidoc syntax for tables. It seems possible with the current pipeline.
I am currently working on a baseline implementation that puts ASciidoc tables in a special tag like <table-pro>. It will then be processed by a plugin that works similarly to the PlantUML support. Users will have to download Asciidoctor first and then the plugin will use Asciidoctor to generate HTML from the Asciidoc syntax.
Users will have to download
Asciidoctorfirst and then the plugin will useAsciidoctorto generate HTML from the Asciidoc syntax.
It's best if users don't have do to extra work for this, unless unavoidable.
As discussed with Prof. Damith, the two features of priority would be:
- Making table sortable.
- Adding filtering functionality.
More specifically, filtering refers to having a search bar for the table. A specific use case would be the student progress page for CS2103/T.