Loading
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 theSourceEditorcontainer element and removes the unuseddirectivescomputed property. - Updates
v-dynamic-height(app/assets/javascripts/vue_shared/directives/dynamic_height.js) to skip initialization whenbinding.value === false, clean up when updated tofalse, and initialize when updated fromfalse. - Updates
source_editor_spec.js, its snapshot, anddynamic_height_spec.js.
References
Closes #595851