Problem/Motivation
When the Responsive Tables Filter module is enabled and its setting "Automatically add to all table-based Drupal Views and tables generated via theme rendering" is checked, resetting dismissals on /admin/reports/editoria11y/dismissals doesn't work.
The "Deleted" message appears at the top of the page, and the table cells get the hidden="true" attribute, but the table cells are not hidden and the dismissals remain.
Steps to reproduce
Enable responsive_tables_filter and check "Automatically add to all table-based Drupal Views and tables generated via theme rendering" on /admin/config/content/responsive_tables_filter.
Mark some items flagged by Editoria11y as OK or hidden, then go to /admin/reports/editoria11y/dismissals and try to remove any of them. There are no error messages in the browser console; just a silent fail (but with a success message).
Proposed resolution
I assume the JS in one or the other module would need to be tweaked in order to play nicely together. Maybe it's not something that either module team is interested in fixing, but I thought the conflict was worth noting in case anyone else trying to use both modules is as flummoxed as I was about why dismissals wouldn't clear.
Responsive Tables Filter doesn't offer a way to exempt particular tables from its process, and its library doesn't appear in page attachments (at least not with JS aggregated). As a quick workaround, I added this to a jQuery I'm already running on my admin theme:
// Remove tablesaw stuff (responsive_tables_filter) on Editoria11y dismissals page.
if (window.location.pathname == '/admin/reports/editoria11y/dismissals') {
$('table.tablesaw').each(function() {
this.classList.remove('tablesaw-stack');
});
$('strong.tablesaw-cell-label').each(function() {
this.remove();
});
}Thanks for Editoria11y! It is awesome.
Comments
Comment #2
itmaybejj commentedThanks for posting the workaround; I'll take a look at this in the next release cycle.
Comment #3
mark_fullmerMaintainer of Responsive Tables Filter here, chiming in. I think the problem stems from the fact that the reponsive tables logic wraps the "Reset" link in a span tag, as shown below, and the JavaScript in Editoria11y assumes that the
<a>is the immediate sibling of the<td>element here: https://git.drupalcode.org/project/editoria11y/-/blob/2.2.x/js/editoria1...Ideally, the targeting JS in Editoria11y can be more tractable and the two modules can play nice together.
Comment #6
itmaybejj commentedThat was indeed the issue.
This whole page should be rewritten; the code is far too fragile as it is. I may revisit in the 3.x branch. But in the interim -- I tagged a release with a quick fix.