Remove unused roadmapShellEl from milestones list section

What does this MR do and why?

Removes the unused roadmapShellEl data field from both roadmap list sections.

  • ee/app/assets/javascripts/roadmap/components/epics_list_section.vue
    • roadmapShellEl in data()
    • its assignment from this.$root.$el.querySelector('.js-roadmap-shell') in initMounted()
  • ee/app/assets/javascripts/roadmap/components/milestones_list_section.vue
    • roadmapShellEl in data()
    • its assignment from this.$root.$el.firstChild in initMounted()

Nothing reads the field in either component or in their specs.

Why it went out of use

  • 2019-11, !19875 (merged): buffered rendering for the roadmap. roadmapShellEl held the roadmap shell element and was passed as :scrollelement to vue-virtual-scroll-list in epics_list_section.vue, behind the roadmap_buffered_rendering flag.
  • 2020-01, !22748 (merged): milestones added to the roadmap. milestones_list_section.vue was modelled on the epics section and copied the field and the assignment, but it never rendered a virtual list. The field was unused in this file from day one.
  • 2020-08, !40243 (merged): the epics section changed the lookup from firstChild to querySelector('.js-roadmap-shell') because firstChild did not return the shell. The milestones copy was not updated.
  • 2021-03, !57486 (merged): the roadmap_buffered_rendering flag and the <virtual-list> element were removed because buffered rendering had been broken for a while. That removed the only reader of roadmapShellEl. The field and its assignment stayed in both files.

The firstChild lookup was the reason this came up: under Vue 3 it can return a text or comment node instead of an element. Since the field is unused, removing it is the fix.

How to set up and validate locally

yarn jest ee/spec/frontend/roadmap/components/epics_list_section_spec.js ee/spec/frontend/roadmap/components/milestones_list_section_spec.js

The roadmap page has no visible change.

References

Edited by Miguel Rincon

Merge request reports

Loading
Loading