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 ignores compatConfig.
  • On Vue 3, @vue/compat reads a flag from the component's compatConfig first, then from the global config. In MODE: 3, a flag stays on when its value is true or 'suppress-warning'. app/assets/javascripts/lib/utils/vue3compat/compat_config.js sets almost every flag to 'suppress-warning', so those flags stay on.
  • MODE: 3 turns off only the flags that the global config does not list: PROPS_DEFAULT_THIS, V_ON_KEYCODE_MODIFIER, TRANSITION_CLASSES, TRANSITION_GROUP_ROOT and FILTERS. 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/compat maps beforeDestroy on 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/orbit

The "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

Merge request reports

Loading
Loading