- 🇫🇮Finland lauriii Finland
Removing the lazy builder could certainly help with the repaint but would likely cause other issues. 🤔 It looks like the removal of the lazy builder would require us to change the cache contexts because currently the only cache context that the
user_toolbar
is setting isuser.roles:anonymous
. The required cache context would beuser
since the toolbar item contains the name of the currently logged in user.Adding the
user
context would re-introduce #2899392: user_hook_toolbar() makes all pages uncacheable → and should lead into\Drupal\Tests\toolbar\Functional\ToolbarCacheContextsTest::testCacheIntegration
failing. 😭 Even with auto-placeholdering this would lead into more problems than it's solving because this would likely make the whole toolbar flicker. I'm personally leaning towards the approach similar to what is being proposed in 🐛 Improve rendering account link in the toolbar Fixed since it's less likely to have adverse side-effects.