- First commit to issue fork.
- Status changed to Needs review
about 1 year ago 11:34am 10 October 2023 - π·πΈSerbia finnsky
Hello all!
Currently Custom Elements supported by core:
https://caniuse.com/custom-elementsv1So i want to propose POC of creating custom element `drupal-responsive-table`. Responsive/sorting/selecting can be controlled with attributes.
Which will/may replace:
tableresponsive.js
tableselect.js
tablesort.jsI found simple responsive webcomponent and did quick POC with it: https://github.com/zachleat/table-saw
This table-saw can be used for inspiration, currently nothing even broken:
https://gyazo.com/ac400fd9515a6a1b74488eb44080dc58Please review.
- last update
about 1 year ago 30,391 pass, 1 fail - @finnsky opened merge request.
- πΊπΈUnited States smustgrave
Something also a fan of is USWDS approach https://designsystem.digital.gov/components/table/
- πΊπΈUnited States smustgrave
This a duplicate of #3068696: Tables overflow on mobile β by chance? See it was marked related
- Status changed to Needs work
about 1 year ago 3:10pm 2 November 2023 - πΊπΈUnited States smustgrave
This may be a duplicate but not entirely sure.
- π«π·France nod_ Lille
Not a duplicate, the related issue was meant for claro only, this one is the generic one for everything.
That table-saw library is pretty neat, seems like tabledrag still works and the result is pretty nice.
- πΊπΈUnited States mark_fullmer Tucson
That table-saw library is pretty neat, seems like tabledrag still works and the result is pretty nice.
There is a contrib module, Responsive Tables Filter, https://www.drupal.org/project/responsive_tables_filter β , which integrates the Tablesaw library. The module includes a configuration option for whether to include this automatically on all Drupal "Views" tables. When enabled, the administrative forms that are Views-based take on the "Tablesaw" library behavior:
Perhaps that could be a model here?
- π·πΈSerbia finnsky
@mark_fullmer hi!
Seems this module uses archived tablesaw version? Have you plans to update it to web components version?
https://github.com/zachleat/table-saw - πΊπΈUnited States mark_fullmer Tucson
Seems this module uses archived tablesaw version? Have you plans to update it to web components version?
It may not be accurate to refer to https://github.com/zachleat/table-saw as the web component *version* of the original library. Its README says that it was "heavily inspired" by the original library. It does not implement all of the features or display modes of Filament Group's Tablesaw implementation (see https://filamentgroup.github.io/tablesaw/demo/stack.html).
So, since the module Responsive Tables Filter supports those features, I wouldn't directly be able to switch it to use https://github.com/zachleat/table-saw
If the core approach only needs the "stack" display provided by https://github.com/zachleat/table-saw, that may be the better route to take.