Patch #43397
openOrganize Gantt chart code by separating it into views and Stimulus controllers
0%
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:
- Roughly reorganize the code using views and Stimulus controllers
- Remove dependencies on jQuery and jQuery UI
- 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.cssfile - 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¶
- All tests pass: https://github.com/hidakatsuya/redmine/pull/31/checks
- Verified that the appearance remains unchanged with Visual Regression Tests (VRT): https://github.com/hidakatsuya/redmine/actions/runs/18820868358
There are minor font rendering differences due to environment differences between baseline and actual screenshots, but no significant visual differences were found. - The printed output (HTML to PDF) remains identical before and after the change.
- Tested on macOS with Chrome, Firefox, and Safari
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
Updated by Katsuya HIDAKA 1 day ago
You can also check the patch diff in the following pull request:
https://github.com/hidakatsuya/redmine/pull/31
Updated by Go MAEDA 1 day ago
- Target version set to 7.0.0
Setting the target version to 7.0.0.
Katsuya HIDAKA wrote:
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
I found some issues that requests the features described above.
Drag-and-drop editing: Manual reordering of issues and projects: Remembering column widths: Sticky header:
Updated by Anonymous about 20 hours ago
- File New Microsoft Excel Worksheet.xlsx added
Updated by Go MAEDA about 8 hours ago
- File deleted (
New Microsoft Excel Worksheet.xlsx)