Northeastern-Electric-Racing / Northeastern-Electric-Racing/FinishLine

[Maintenance] - Gantt Task Bar Collapsing

Open
#4,437 0 comments 0 reactions 1 assignee View on GitHub

@Santiordon is already working on this.

Since Sep 17, 2026.

maintenance
Dominant language
TypeScript
Stars
36
Forks
9
Avg merge
4d 21h
Merged PRs (30d)
11

Description

Description

https://github.com/user-attachments/assets/afb7116d-6c9d-4ddc-903a-342449d7fb07

The goal is to prevent Gantt Task Bars from randomly collapsing.

Acceptance Criteria
  • Prevent them from randomly collapsing
  • Test in multiple ways (tab in tab out, wait a few minutes, etc...)
Proposed Solution

Gantt Chart is inherently pretty unstable. Instead of attempting to do a big overhaul fix, here is a proposed easy fix for right now:

  • There is currently a state (showChildren) that tracks whether the task bar should show the children. This state is very unstable and prone to reset due to a long history of the Gantt Chart not being the most reliable bookkeeper (it reloads and remounts components like crazy). Due to this, that state is lost.
  • Try to move the showChildren upwards (Probably all the way up to GanttChart or ProjectGanttChartPage) and do something akin to this:
// GanttChart or ProjectGanttChartPage
const [expanded, setExpanded] = useState<Set<string>>(new Set());
const toggleExpanded = useCallback((id: string) => {
  setExpanded((prev) => {
    const next = new Set(prev);
    next.has(id) ? next.delete(id) : next.add(id);
    return next;
  });
}, []);

What does this allow? It allows the states to live comfortably in a place that does not change and remount constantly, therefore keeping the states secure and unchanged.

This is prop drilling. It's not necessarily a problem because the entire Gantt Chart itself is already a prop drill by design. For the scope of this ticket it is acceptable. For future designs and tickets, do not ever do this.

Mocks

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.