Project

General

Profile

Actions

Patch #43845

closed

Remove the Raphael.js dependency by switching to SVG API

Added by Mizuki ISHIKAWA 25 days ago. Updated 21 days ago.

Status:
Closed
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 25 days 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 25 days 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 25 days ago

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

Updated by Marius BĂLTEANU 25 days ago

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

Updated by Go MAEDA 25 days 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 #6

Updated by Go MAEDA 21 days ago

  • Subject changed from Remove the Raphael.js dependency and use the SVG API to Remove the Raphael.js dependency by switching to SVG API
  • Status changed from New to Closed
  • Assignee set to Go MAEDA

Committed the patch in r24469. Thank you for your contribution.

Actions

Also available in: Atom PDF