Project

General

Profile

Actions

Patch #43397

open

Organize Gantt chart code by separating it into views and Stimulus controllers

Added by Katsuya HIDAKA 1 day ago. Updated about 23 hours ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Gantt
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Background/Purpose

I believe the Gantt chart is one of the important tools in project management. However, the Gantt chart in Redmine has seen little improvement in recent years.
One possible reason is that its code has become complex, making it difficult to maintain or extend.

This patch aims to reorganize the code to make future improvements and new features easier to implement.
Since the Gantt chart is a complex feature that must not display incorrect information, I plan to refactor it step by step.

The planned steps are as follows:

  1. Roughly reorganize the code using views and Stimulus controllers
  2. Remove dependencies on jQuery and jQuery UI
  3. Clearly separate the view, data, and business logic, and redesign the HTML structure (including removing the Raphael dependency)

This patch implements step (1) as the first step toward modernization.

In parallel with this work, I also plan to add and improve the following features:

  • Drag-and-drop editing
  • Manual reordering of issues and projects
  • Remembering column widths and adding a sticky header

Details

  • Add missing tests to ensure current behavior is preserved
  • Extract Gantt chart CSS into a separate gantt.css file
  • Reorganize the code for the query form, chart, and project/issue tree using views and Stimulus controllers
  • Keep the existing business logic as much as possible during reorganization
  • Leave partially separated code temporarily as acceptable
  • Make Stimulus controllers loosely coupled by communicating through events
  • Keep the current behavior, DOM structure, and styles unchanged in this step to ensure the UI and interactions remain consistent
  • Remove unnecessary addition of the CSS class gantt_content (a leftover issue from #32019)

Checks

Screenshots

Before:

After:

For full before/after comparisons, please refer to the Visual Regression Test (VRT) results:
https://github.com/hidakatsuya/redmine/actions/runs/18820868358


Files

Actions

Also available in: Atom PDF