stable

Clone or download

Read-only

fix: use v-show to hide closed items

Given a tracker that contains 1000 artifacts (50% closed) [0] And they are displayed in a roadmap widget, When user wants to toggle the display of closed elements, Then the UI should not take ages to reflect the change. The idea here is to use `v-show` instead of removing completely the node from the dom, so that vuejs/browser does not spend too much time at diffing and removing nodes. It's not perfect but improves a little bit performances: +--------+--------+--------+-----------------------------------+ | | Show | Hide | | | | closed | closed | Profile | +--------+--------+--------+-----------------------------------+ | Before | 11s | 70s | https://share.firefox.dev/2TepXBO | +--------+--------+--------+-----------------------------------+ | After | 6s | 6s | https://share.firefox.dev/3hpcM9b | +--------+--------+--------+-----------------------------------+ During this 6s, the browser is blocked therefore I didn't find a way to display a spinner (loading state in the tlp switch) because no animations are available. This should not have any impact on: * placement of popovers * dependencies arrows * toggle of children Bonus: * Now closed elements are hidden by default. * Use `v-once` on tasks popovers since their content is not supposed to change. Part of request #22193: Slow performance when there is a lot of closed item to hide [0] See XML structure and CSV examples in attachment of the linked request. Change-Id: I80abea35bf9f07ba2441185c76b976c314c05f63

Modified Files

Name
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/DependencyNatureControl.test.ts +4 −5 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/DependencyNatureControl.vue +14 −7 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/GanttBoard.test.ts +60 −27 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/GanttBoard.vue +18 −1 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/Task/BarPopover.vue +1 −1 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/Task/DependencyArrow.test.ts +1 −1 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/Task/GanttTask.test.ts +1 −1 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/TimePeriod/TimePeriodControl.test.ts +2 −3 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/TimePeriod/TimePeriodControl.vue +14 −9 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/LoadingState.vue +3 −0 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/tasks-dimensions.test.ts +23 −11 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/store/index.ts +1 −1 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/store/tasks/tasks-getters.test.ts +69 −34 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/store/tasks/tasks-getters.ts +27 −9 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/type.ts +5 −0 Go to diff View file