Remove inert compatConfig MODE 3 from Orbit
What does this MR do and why?
Removes compatConfig: { MODE: 3 } from the 44 Orbit components that set it. The setting has no effect today, so this MR changes no behaviour. It prepares Orbit for the Vue 3 migration, so its components behave like every other component when the Orbit pages move to Vue 3.
Why MODE: 3 has no effect:
- The Orbit pages have no
vue3_migration.yml, so they run on Vue 2. Vue 2 ignorescompatConfig. - On Vue 3,
@vue/compatreads a flag from the component'scompatConfigfirst, then from the global config. InMODE: 3, a flag stays on when its value istrueor'suppress-warning'.app/assets/javascripts/lib/utils/vue3compat/compat_config.jssets almost every flag to'suppress-warning', so those flags stay on. MODE: 3turns off only the flags that the global config does not list:PROPS_DEFAULT_THIS,V_ON_KEYCODE_MODIFIER,TRANSITION_CLASSES,TRANSITION_GROUP_ROOTandFILTERS. Orbit uses none of them.
The MR also removes the doubled cleanup hook in graph_canvas.vue and dashboard_app.vue. Each component ran the same cleanup in beforeUnmount and beforeDestroy. This MR keeps beforeDestroy:
- Vue 2 does not know
beforeUnmount. @vue/compatmapsbeforeDestroyon Vue 3.
Out of scope: the migration of the three Orbit pages to Vue 3. That is the next step.
How to verify
The Orbit Jest specs pass unchanged on both lanes (82 suites, 1359 tests each):
VUE_VERSION=2 yarn jest ee/spec/frontend/orbit
VUE_VERSION=3 VUE_COMPILER_VERSION=3 yarn jest --no-cache ee/spec/frontend/orbitThe "cleanup on unmount" specs in graph_canvas_spec.js cover the cleanup that beforeDestroy now does alone, on both lanes.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist.
References
- Closes #635406 (closed)
- Found in a sweep for local Vue 3 workarounds that started from !263712 (closed)