Problem/Motivation

Toggling the toolbar tray can change a table's width, and sticky header calculations rely on this width.
Currently, toggling the tray does not recalculate the width, so things like this can happen:

To reproduce,
1. Go to admin/content, scroll to where the header is sticky.
2. Open the tray.
3. Refresh the page and the tray should still be open.
4. Close the tray and the sticky header will still be at the tray-open settings.

Proposed resolution

tableHeaderResizeHandler should also fire on drupalToolbarTrayChange

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bnjmnm created an issue. See original summary.

bnjmnm’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
210.67 KB
684 bytes
msuthars’s picture

Assigned: Unassigned » msuthars
msuthars’s picture

Assigned: msuthars » Unassigned
Status: Needs review » Needs work
FileSize
374.28 KB

@bnjmnm I reviewed the patch. I applied the patch & clear the cache but the issue is still there.

bnjmnm’s picture

Looks like the compiled .js file was not included in the patch. Took care of that here.

@msuthars, in future js/css reviews, could your screenshots include evidence that the browser is loading the changes in the patch? I attached an image on how this should look. For JS and CSS issues, it's often not clear if a problem is simply due to an uncleared cache, and that can slow down progress.

msuthars’s picture

Assigned: Unassigned » msuthars
msuthars’s picture

Assigned: msuthars » Unassigned
Status: Needs review » Reviewed & tested by the community
FileSize
602.19 KB
618.81 KB

@bnjmnm Thanks for the suggestion. I retested the patch #2 but I have to manually compile that js then it works.
I tested the patch #5 and it is working as expected. No need to manually complie. Moving to RTBC.

Before:

After:

nod_’s picture

RTBC+1

seems like the tableresponsive script doesn't trigger a columnschange event when showing/hiding columns. Tableheader works because it is itself a responsive table. Out of scope though.

  • lauriii committed ca0af47 on 9.1.x
    Issue #3145930 by bnjmnm, msuthars, nod_: Tableheader should recalculate...
lauriii’s picture

Version: 9.1.x-dev » 9.0.x-dev
FileSize
1023 bytes

Also tested manually and could reproduce the problem and that it's fixed by this.

Committed ca0af47 and pushed to 9.1.x. Thanks!

This is adding another event to the event listener which doesn't seem disruptive. Leaving as RTBC for perspective from another committer whether this should be backported or not..

alexpott’s picture

+1 for the backport - I'd go for 8.9.x if this still applies there...

lauriii’s picture

Opened follow-up to add test coverage for table header (including this use case) #3155053: Add tests for the table header.

lauriii’s picture

Rerolled this to 8.9.x

  • lauriii committed bc3e313 on 9.0.x
    Issue #3145930 by bnjmnm, msuthars, nod_: Tableheader should recalculate...

  • lauriii committed eb1b062 on 8.9.x
    Issue #3145930 by bnjmnm, lauriii, msuthars, nod_: Tableheader should...
lauriii’s picture

Version: 9.0.x-dev » 8.9.x-dev
Status: Reviewed & tested by the community » Fixed

Backported to 8.9.x and 9.0.x.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.