stable

Clone or download

Read-only

Refactoring: decrease number of nullable dates

A time period was depending on 3 different dates: - the first "start" date of tasks - the last "end" date of tasks - today (to be able to display Today indicator) Since tasks can have no start date or no end date, we had to pass Date|null dates everywhere. The current proposal moves the today date outside of time period construction. The code and the tests are now simpler to read (I hope). It is a technical refactoring, no functional changes are expected. Part of story #19734: have a Roadmap widget on dashboard Change-Id: I2e945ace13a13ffbc50d58a8da5414bda8c1de19

Modified Files

Name
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/GanttBoard.vue +6 −9 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/Task/BackgroundGrid.test.ts +0 −1 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/Task/DependencyArrow.test.ts +0 −1 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/Task/GanttTask.test.ts +0 −1 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/TimePeriod/TimePeriodHeader.test.ts +1 −2 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/TodayIndicator.test.ts +0 −1 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/begin-end-of-period.test.ts +18 −99 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/begin-end-of-period.ts +4 −36 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/first-date.test.ts +108 −46 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/first-date.ts +8 −2 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/last-date.test.ts +115 −45 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/last-date.ts +8 −2 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/left-position.test.ts +1 −4 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/tasks-dimensions.test.ts +0 −7 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/time-period-month.test.ts +55 −216 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/time-period-month.ts +6 −11 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/time-period-quarter.test.ts +30 −260 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/time-period-quarter.ts +5 −10 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/time-period-week.test.ts +0 −49 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/time-period-week.ts +5 −10 Go to diff View file