Project

General

Profile

Actions

Patch #43845

closed

Remove the Raphael.js dependency by switching to SVG API

Patch #43845: Remove the Raphael.js dependency by switching to SVG API

Added by Mizuki ISHIKAWA 9 months ago. Updated 9 months 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 1 (0 open — 1 closed)

Blocks Redmine - Patch #43800: Add local license files under doc/licenses for bundled third-party componentsClosedGo MAEDAActions

Updated by Mizuki ISHIKAWA 9 months ago Actions #1

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

Updated by Go MAEDA 9 months ago Actions #2

  • 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.

Updated by Go MAEDA 9 months ago Actions #3

  • Blocks Patch #43800: Add local license files under doc/licenses for bundled third-party components added

Updated by Marius BĂLTEANU 9 months ago Actions #4

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

Updated by Go MAEDA 9 months ago Actions #5

  • 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

Updated by Go MAEDA 9 months ago Actions #6

  • 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: PDF Atom