Install VueApollo where the markdown editor is mounted
What does this MR do and why?
Adds Vue.use(VueApollo) at module scope in mount_markdown_editor.js.
mountMarkdownEditor creates new VueApollo(...) for the editor app, but never installs the plugin. Under @vue/compat, the provider works only if some other bundle on the page called Vue.use(VueApollo) before the editor app was created. Today the Vue 3 super sidebar usually does that, so the gap is hidden.
When nothing else installs VueApollo first, the check in !260635 (merged) stops the editor app from mounting in development and test builds. On milestone pages the form then has no description field. The stress pipeline found this, with the super sidebar kept on Vue 2:
- 8 spec files fail with
MarkdownEditorRoot was given an option that needs Vue.use(VueApollo). - About 5 more milestone specs fail because
#milestone_descriptionis missing, for examplespec/features/projects/milestones/new_spec.rb.
Without the check, the same page would mount the editor, but with Apollo silently off.
References
- Found by the stress pipeline https://gitlab.com/gitlab-org/gitlab/-/pipelines/2926428135 of !255334 (closed)
- Check that reports it: !260635 (merged)
- Same fix for the milestone time tracker: !260738 (merged)
- Same bug class as !259575 (merged)
Screenshots or screen recordings
None. There is no visible change.
How to set up and validate locally
- Visit Project > Plan > Milestones > New milestone.
- Confirm the description field shows the markdown editor and accepts input.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.