Problem/Motivation
\Drupal\comment\CommentViewBuilder::buildComponents()
within loop checking $this->moduleHandler->moduleExists('history') && $this->currentUser->isAuthenticated()
for every comment and attach indication of unread comments.
But history module works only for node entities which is a bug when comments attached to other entities.
Also it creates placeholder for each comment to attach similar settings for JS which is needed only once (so could be optimized)
Proposed resolution
- Add condition to attach history libraries to node entities only
- Move common condition check out of loop
-
Remaining tasks
- create a patch
- review
- commit
User interface changes
no
API changes
no
Data model changes
no