Closed (fixed)
Project:
Drupal core
Version:
11.1.x-dev
Component:
navigation.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
11 Dec 2024 at 20:46 UTC
Updated:
12 Feb 2025 at 08:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
catchComment #4
catchNot a direct result, but this was found while working on #3491405: Add performance testing.
Comment #6
plopescAfter checking the MR I realized the resultant code was very similar to the original one we had in Navigation before merging it into core.
There were concerns about this approach expressed in a MR comment that were addressed in the following commit.
Are these concerns still valid and should we think in a different approach for this MR?
Comment #7
catchSo this is what I was worried about in that MR comment:
e.g. the cache context for the placeholder itself was user-specific (I think to show the username). In the shortcuts case, we can always show 'Shortcuts' there, so it's the same for everyone and won't affect cache granularity.
I did have a vague memory of that MR too and kept thinking I was missing something here while working on this, but so far it seems like for the shortcuts link it's always going to be the same for everyone. This might need some before/after manual testing when a user doesn't have access to shortcuts but does have access to navigation, or when their shortcuts are completely empty? But from reading the code if there's an issue with that it might be pre-existing.
Comment #8
smustgrave commentedAttaching before/after screenshots. Per slack this is seen when clearing cache but you can see even after the cache clear and MR applied the shortcut link block still flickers.
Let know if I tested wrong
Comment #9
catchI think you tested right and found a bug.
The placeholder markup looks like this:
This doesn't get rendered at all.
The replaced markup looks like this:
The placeholder markup had the 'invisible' class, grepped for that, found a template and hook_theme() template that needed deleting outright.
For me it actually works now.
Comment #10
smustgrave commentedThe block no longer appears to flicker. I do see the arrow flicker but imagine that's a separate issue.
Comment #11
catchYeah that's trickier, we'd have to fake having some shortcuts items for that. It is probably doable, but not by me in the ten minutes I just spent trying to get it to work.
#3493911: Add a CachedPlaceholderStrategy to optimize render cache hits and reduce layout shift from big pipe should help with this issue generically - if we make the shortcut block placeholder content render cacheable (it already might be), then on cache hits, bigpipe wouldn't be involved in rendering it at all, so zero flicker when browsing around with a warm navigation cache then.
Comment #12
quietone commentedI read the IS and the comments. I didn't find any unanswered questions or other work to do. Updating credit.
Comment #13
nod_Merge conflict
Comment #14
plopescConflicts solved and tests are still green. Moving back to RTBC.
Comment #15
nod_Committed a9ebc0c and pushed to 11.x. Thanks!
Comment #18
nod_we might want that for 11.1.x too, cherry pick isn't clean
Comment #22
nod_Committed bc08b60 and pushed to 11.1.x. Thanks!