Problem/Motivation
Found when double checking some CSS loading things, didn't find anything from those but discovered this by accident instead.
Steps to reproduce
Turn of js aggregation.
Load the front page of Standard, logged out, with chrome performance profiling.
Look for style recalculations - you'll find one triggered by search.js
It adds an aria-expanded="false" attribute to search-wide, but that's the default when the page is loaded anyway, so we can add that in the template then it won't change on page load, only when the visibility is actually toggled.
Proposed resolution
Preload aria-expanded="false" to the template
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | Screenshot from 2026-01-18 09-17-58.png | 140.29 KB | catch |
Issue fork drupal-3567983
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3567983-olivero-search.js-causes
changes, plain diff MR !14387
Comments
Comment #2
catchComment #3
catchRe-titling since this doesn't actually change the js at all, just adds a default in the markup that matches the state the js will set anyway on page load.
Comment #4
dcam commentedDid you forget to push the changes? I pulled the issue branch and rebased it, but there's no diff with main.
Comment #5
catchI did forget... MR up now.
Also attaching a screenshot of what the stylesheet recalculation looks like in chrome performance profile.
Comment #7
catchWhile I was double checking this prior to making the MR, found another one #3568141: Try to avoid style recalculation in Olivero's isDesktopNav.
Comment #8
smustgrave commentedSeems like a straight forward fix, since this is Olivero only assuming we don't need a CR for the twig change.
Comment #13
nod_Committed and pushed 54944f5faaa to main and 3cb92c2c1a8 to 11.x and 019f773107d to 11.3.x. Thanks!