User menu block render array is cached per user

Created on 25 April 2024, 2 months ago
Updated 20 May 2024, about 1 month ago

Problem/Motivation

@catch:

This preview is still user-specific, which undermines having the #lazy_builder since it means the user cache context for the non-placeholdered render array too. I'm not sure we have standard patterns for this in core yet, the preview stuff is quite new, but can it use 'blurred text' or similar? Or just no preview at all maybe if it's not above the fold? The preview is mostly useful to avoid CLS.

@plopesc:go

Good catch!

My understanding was that #lazy_builder_preview was a generic placeholder and was not affected by caching properties.

Current core implementations are adding an empty placeholder like ['#markup' => '<a href="#" class="toolbar-tray-lazy-placeholder-link">&nbsp;</a>'] or just ['#markup' => '&nbsp;']

Would that help to solve the performance concerns?

Removing the placeholder completely causes some undesired glitches in the navigation bar when big_pipe is enabled

@nod_ :

static string is fine, it'll get replaced once loaded anyway

Proposed resolution

Agree on a lazy load strategy.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component
NavigationΒ  β†’

Last updated about 2 hours ago

No maintainer
Created by

πŸ‡ͺπŸ‡ΈSpain ckrina Barcelona

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

Comments & Activities

Production build 0.69.0 2024