element-hq / element-meta

Shared/meta documentation and project artefacts for Element clients
75 stars 12 forks source link

Render HTML tables in messages #2119

Open freelock opened 1 year ago

freelock commented 1 year ago

Your use case

What would you like to do?

Have HTML tables rendered in the message text.

Why would you like to do it?

We have daily and weekly activity summaries reported to a room by a bot. These use regular HTML tables to lay out data in columns.

In Element X, this content is entirely missing.

In the old Element Android, the content was there but unreadable -- there were line breaks between table rows but table cells were all smushed together with no separator.

How would you like to achieve it?

Use an actual table to render, the same way Element Web does. I think for the first cut, allowing horizontal scrolling on this element would be fine.

A future enhancement option could be to pivot the table to show all values for a row, using the th in column headers as labels for each value -- e.g. using "tablesaw" or equivalent: https://github.com/filamentgroup/tablesaw

Have you considered any alternatives?

No response

Additional context

No response

Are you willing to provide a PR?

No