Vue Popover - Reduce technical footprint
What / Why
Follow up from conversation here: !154955 (comment 1932238035)
We have a new shared component VuePopover that allows for a lightweight way to include GlPopover in HAML files without the need to create new Vue applications/code.
However, the current implementation creates a new Vue instance for every popover. This is a bit inefficient and rather it would be nice to create one Vue instance that is able to handle/manage multiple popovers and their triggers on a single page through on Vue instance.
Proposal
- Refactor
vue_popovers.jsto be one Vue instance rather than multiple - This Vue instance is able to scan the DOM for all instances of
.js-vue-popoverand manage them all from that one Vue instance rather than multiple.
cc/ @pslaughter
Edited by 🤖 GitLab Bot 🤖