Project

General

Profile

Actions

Patch #43845

open

Remove the Raphael.js dependency and use the SVG API

Added by Mizuki ISHIKAWA about 17 hours ago. Updated about 14 hours ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Third-party libraries
Target version:

Description

This issue proposes removing Redmine's dependency on Raphael.js.
The attached patch removes Raphael.js loading and related code, and unifies rendering on direct SVG drawing.

Background

  • The latest Raphael.js release is 2.3.0 (Aug 14, 2019).
  • Raphael.js was historically useful for SVG/VML compatibility, but VML is already deprecated, and Redmine no longer supports Internet Explorer.
  • In Redmine, Raphael.js is currently used only for relatively simple features, such as rendering the revision graph and some lines in the Gantt chart.

Proposal

  • Remove Raphael.js loading and related code
  • Switch to direct SVG generation in JavaScript

This should reduce frontend dependencies and improve long-term maintainability.

Screenshots

Before change After change

Files


Related issues

Blocks Redmine - Patch #43800: Manage third-party license files in doc/licenses directoryNewActions
Actions #1

Updated by Mizuki ISHIKAWA about 17 hours ago

Raphael.js had a color-selection method called getColor(), and revision graph colors were determined by that method.
0001-Replace-library-dependent-SVG-rendering-with-a-nativ.patch changes the color-selection logic, so the exact colors may differ slightly, but color distinguishability should remain sufficient.

Before change After change
Actions #2

Updated by Go MAEDA about 16 hours ago

  • Target version set to Candidate for next major release

In Redmine, Raphael.js was added in 2011. At that time, it was used to show revision graphs in the repository browser (#5501). Later, in 2013, it was also used to draw the progress line (#12122) and issue relations (#3436) in the Gantt chart.

At that time, Redmine needed to support older versions of Internet Explorer, such as IE8, which did not support SVG. Raphael.js worked across different browsers by using SVG in modern browsers and VML in older versions of Internet Explorer, so it was a reasonable choice.

Today, there is no longer a need to support Internet Explorer. Modern browsers provide consistent native support for SVG, so the compatibility-related need for Raphael.js is now very small.

Actions #3

Updated by Go MAEDA about 16 hours ago

  • Blocks Patch #43800: Manage third-party license files in doc/licenses directory added
Actions #4

Updated by Marius BĂLTEANU about 15 hours ago

  • Target version changed from Candidate for next major release to 7.0.0
Actions #5

Updated by Go MAEDA about 14 hours ago

  • Subject changed from Replace library-dependent SVG rendering with a native implementation to Remove the Raphael.js dependency and use the SVG API
  • Category changed from UI to Third-party libraries
Actions

Also available in: Atom PDF