Fix dynamic height directive in SourceEditor

What does this MR do and why?

Fixes a regression introduced in !214728 (merged) where v-dynamic-height in SourceEditor (app/assets/javascripts/vue_shared/components/source_editor.vue) was replaced with v-bind="directives", which bound dynamicheight="[object Object]" as an HTML attribute instead of invoking the Vue directive. As a result, DynamicHeightManager was never initialized for the pipeline editor or single-file editor.

This MR:

  • Applies v-dynamic-height="useDynamicHeight" directly on the SourceEditor container element and removes the unused directives computed property.
  • Updates v-dynamic-height (app/assets/javascripts/vue_shared/directives/dynamic_height.js) to skip initialization when binding.value === false, clean up when updated to false, and initialize when updated from false.
  • Updates source_editor_spec.js, its snapshot, and dynamic_height_spec.js.

References

Closes #595851

Merge request reports

Loading
Loading