webtrees icon indicating copy to clipboard operation
webtrees copied to clipboard

Datatables v2 breaks table layouts

Open ddrury opened this issue 11 months ago • 6 comments

At commit e124422,

Cell borders missing and cell alignment is wrong (visible on latest demo)

ddrury avatar Mar 19 '24 10:03 ddrury

This is caused by commit https://github.com/fisharebest/webtrees/commit/d11b6d871f0ef4a835494c1d71b139bb6dc3209d updating datatables.net-bs5 to version 2.0.2

1.13.11 works, 2.0.1 doesn't

See Upgrading to DataTables 2

ddrury avatar Mar 21 '24 14:03 ddrury

Oops - that's not good.

fisharebest avatar Mar 21 '24 22:03 fisharebest

I think it's related to https://github.com/DataTables/Dist-DataTables-Bootstrap5/issues/11

fisharebest avatar Mar 22 '24 00:03 fisharebest

There are at least another couple of things that need attention,

  1. resources/views/lists/datatables-attributes.phtml will need significant work (in particular the new layout attribute)
  2. something I've not fully figured out yet, take the Individual surname list (resources/views/lists/surnames-table.phtml), the first column is right justified and examining the html it gets the class dt-type-numeric. Changing it in the html does correct the alignment but changing the code has no effect so I guess it's added as a default by datatables - does this mean we have to define all columns for every table?

ddrury avatar Mar 26 '24 09:03 ddrury

I have downgraded to datatables 1.x until the upstream issue is fixed.

Keep this issue open until we can work with 2.x.

fisharebest avatar Apr 03 '24 11:04 fisharebest

I thought it was intentional. I like the wider name fields. Maybe just row borders should come back.

miqrogroove avatar Apr 14 '24 12:04 miqrogroove