Table filter creates jank (layout shift) on page load

Created on 26 November 2023, 7 months ago
Updated 30 November 2023, 7 months ago

When a path is initially navigated that utilizes a table filter (like the modules or permissions pages). The page is initially viewable without the table filter. Then the JavaScript kicks in and modifies the DOM so that the page layout shifts as the table filter appears.

This issue is intended to mitigate or remove this jankiness (as much as possible).

Plan

The plan is to use the new at-media scripting feature to reduce the jank as much as possible in browsers that support this. For older browsers, the current behavior will still persist.

Testing

Note that the at-media feature is not supported in the latest version of Chrome (119). It is supported in the next version of Chrome (120), Safari 17, and Firefox. So, if you're testing on Chrome, please verify that you're on 120 or later (you can use Chrome Canary if you'd like).

  1. Navigate to the page in question (in this case /admin/modules), and open developer tools. Go to the network tab and set throttling to "Fast 3G") and ensure that "Disable cache" is checked.
  2. Reload the browser and notice how the "filter" pops in and shifts the layout.
  3. Apply the patch.
  4. Test again and note how the "filter" is there on page load and does not "pop in".
  5. Test the page without JavaScript (you can disable this in dev tools)
  6. Test the page on an older browser that doesn't support this new feature. The behavior should not change.
  7. Test the page on other browsers to ensure it works as expected.
๐Ÿ› Bug report
Status

Fixed

Version

10.2 โœจ

Component
CSSย  โ†’

Last updated 1 day ago

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States mherchel Gainesville, FL, US

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024