Turn BlobLinePermalinkUpdater into a renderless Vue component
The following discussion from !181901 (merged) should be addressed:
-
@markrian started a discussion: issue: This function doesn't clean up after itself.
It's being treated like a class, as we
newit inapp/assets/javascripts/repository/components/header_area/permalink_dropdown_item.vue. I see wenewit elsewhere in the code base as well.No need to fix that in this MR, but I think it's worth addressing this in a follow up (issue or straight to MR).
Possible approaches:
- Make
BlobLinePermalinkUpdateractually a class, with state, and adestroymethod that can be called at the right time by the caller. - Turn
BlobLinePermalinkUpdaterinto a renderless Vue component, which does its own clean up. - Return a clean up function from
BlobLinePermalinkUpdater, and update callers to call that when appropriate.
- Make