asciidoctor-reveal.js icon indicating copy to clipboard operation
asciidoctor-reveal.js copied to clipboard

Support for table row fragments

Open johthor opened this issue 1 year ago • 2 comments

Currently the step option on a table is translated into the class fragment on the resulting HTML table. This differs from the translation for ordered and unordered lists where the step option leads to the class fragment being applied to the list items instead of the list itself.

I would like to have a possibility to apply the the fragment class to the <tr> instead of the <table>. Which should be possible if I didn't miss any specifics.

For backwards compatibility reasons this most likely should be accomplished via a new option instead of changing the step option.

johthor avatar Mar 14 '23 20:03 johthor

Interesting idea... we might need to introduce an attribute to control if we want to step per line or not. Should we also support per column? and per row per column?

ggrossetie avatar May 12 '23 07:05 ggrossetie

I did a small experiment where I took the implementation from lists and applied it to the table's rows via an option rowStep. While adding fragment on <tr> elements was simple I'm not sure how revealing per column would be supported by reveal.js.

I found this open issue https://github.com/hakimel/reveal.js/issues/2191. Otherwise the <td> would need to receive the class fragment and the data-fragment-index would need to be incremented by column and reset after each row to reveal all cells of a column at the same time (see https://revealjs.com/fragments/#fragment-order). The problem with that is, that I see a conflict between the automatic step order outside of the table and the forced step order inside the table.

I wouldn't want to support stepping per row per column. That would lead to some really busy slides. Although it would most likely be simpler than stepping only per column.

johthor avatar May 14 '23 16:05 johthor