projectLEMDO / lemdoIssues

Repository for LEMDO issue tracking and related documents.
MIT License
1 stars 0 forks source link

DRE: Add table sorting to dre_editionsProgress #238

Closed JackWilton1594 closed 5 months ago

JackWilton1594 commented 5 months ago

Please add table sorting to dre_editionsProgress

JanelleJenstad commented 5 months ago

@martindholmes: I would like to learn how to make tables sortable. Would you please teach me?

martindholmes commented 5 months ago

We need to add the little sorttable.js file to the lemdo-dev repo and then devise a method for an encoder to specify that it should be invoked. Not difficult.

martindholmes commented 5 months ago

Question: should all tables in specific types of documents be sortable by default, or should this always be invoked using a specific encoding mechanism? For example, we could make all tables in documentation sortable by default, rather than confronting the reader with puzzling situations where one table is sortable but the next one isn't. Are there contexts in which tables should not be sortable?

JackWilton1594 commented 5 months ago

I can't think of any reason why all tables shouldn't be sortable.

martindholmes commented 5 months ago

OK, I'll implement that.

martindholmes commented 5 months ago

Tables can't be sortable unless they have column headings (meaning that in the TEI their first row has to have @role="label"). So for instance this table can't be sortable:

dre_eg_emendation.html

whereas this one can:

dre_editionsProgress.html

martindholmes commented 5 months ago

I also wonder whether chronological tables like this:

emdJC_Chronology.html

should be sortable, but I've gone ahead and made all viable tables sortable in rev 18173.

martindholmes commented 5 months ago

@JanelleJenstad All you need to do to make a table sortable, then, is to ensure it starts with a row with @role="label".

JanelleJenstad commented 5 months ago

Thank you!

martindholmes commented 5 months ago

I think this can be closed now.