User popover issues w/ user avatars added after initial load of Standalone Vulnerability page
Problem to solve
When hovering over a user name, it should show a hover card:
![]() |
This is done by adding the CSS class js-user-link
to the user link. app/assets/javascripts/user_popovers.js
will find elements with that class and add the hover card to them. However, is only done once when the page is loaded:
This means that any user link added after it executes, for example any user links created from AJAX requests, will not get the hover card added. We should fix this.
Proposed solution
It seems that the current solution is for components to call the user_popover method manually to initialize any popovers that showed up after initial render (e.g. https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/javascripts/alert_management/components/alert_details.vue#L127).
Edited by Alexander Turinske