diff --git a/frontend/src/components/gantt/GanttChart.vue b/frontend/src/components/gantt/GanttChart.vue
index 6941e6be4..642fe7792 100644
--- a/frontend/src/components/gantt/GanttChart.vue
+++ b/frontend/src/components/gantt/GanttChart.vue
@@ -51,9 +51,13 @@
:focused-row="focusedRow ?? null"
:focused-cell="focusedCell"
:row-id="rowId"
+ :indent-level="ganttBars[index]?.[0]?.meta?.indentLevel ?? 0"
+ :is-parent="ganttBars[index]?.[0]?.meta?.isParent ?? false"
+ :is-collapsed="collapsedTaskIds.has(Number(ganttBars[index]?.[0]?.id))"
@barPointerDown="handleBarPointerDown"
@startResize="startResize"
@updateTask="updateGanttTask"
+ @toggleCollapse="toggleCollapse(Number(ganttBars[index]?.[0]?.id))"
/>
@@ -203,8 +207,7 @@ const _hiddenToAncestor = computed(() => {
return map
})
-// Used in Task 5 for collapse/expand toggle
-function _toggleCollapse(taskId: number) {
+function toggleCollapse(taskId: number) {
const newSet = new Set(collapsedTaskIds.value)
if (newSet.has(taskId)) {
newSet.delete(taskId)
diff --git a/frontend/src/components/gantt/GanttRowBars.vue b/frontend/src/components/gantt/GanttRowBars.vue
index 3f476b16c..d83230b7c 100644
--- a/frontend/src/components/gantt/GanttRowBars.vue
+++ b/frontend/src/components/gantt/GanttRowBars.vue
@@ -8,6 +8,51 @@
:aria-label="$t('project.gantt.taskBarsForRow', { rowId })"
:data-row-id="rowId"
>
+
+
+
+
+
+
+
+
+
+
()
const emit = defineEmits<{
(e: 'barPointerDown', bar: GanttBarModel, event: PointerEvent): void
(e: 'startResize', bar: GanttBarModel, edge: 'start' | 'end', event: PointerEvent): void
(e: 'updateTask', id: string, newStart: Date, newEnd: Date): void
+ (e: 'toggleCollapse'): void
}>()
const {t} = useI18n({useScope: 'global'})
@@ -363,6 +412,28 @@ function startResize(bar: GanttBarModel, edge: 'start' | 'end', event: PointerEv
}
}
+.gantt-indent-line {
+ pointer-events: none;
+ opacity: 0.5;
+}
+
+.gantt-collapse-toggle {
+ pointer-events: all;
+ cursor: pointer;
+
+ &:hover polygon {
+ fill: var(--grey-700);
+ }
+
+ &:focus {
+ outline: none;
+
+ polygon {
+ fill: var(--primary);
+ }
+ }
+}
+
.gantt-bar-text {
font-size: .85rem;
pointer-events: none;
diff --git a/frontend/src/i18n/lang/en.json b/frontend/src/i18n/lang/en.json
index e10219f9b..d6bd83afb 100644
--- a/frontend/src/i18n/lang/en.json
+++ b/frontend/src/i18n/lang/en.json
@@ -406,7 +406,10 @@
"taskAriaLabel": "Task: {task}",
"taskAriaLabelById": "Task {id}",
"partialDatesStart": "Start date only (open-ended)",
- "partialDatesEnd": "End date only (open-ended)"
+ "partialDatesEnd": "End date only (open-ended)",
+ "expandGroup": "Expand group: {task}",
+ "collapseGroup": "Collapse group: {task}",
+ "toggleRelationArrows": "Toggle relation arrows"
},
"table": {
"title": "Table",