Page MenuHomePhorge

Update d3 from version 5.9.2 to 6.7.0
ClosedPublic

Authored by aklapper on May 9 2024, 15:21.

Details

Summary

Update the d3 library to its last 6.x version available on https://github.com/d3/d3/releases

This also requires updating the tooltip event handling of dots in Chart.js to avoid an Uncaught TypeError: d3.event is undefined per https://observablehq.com/@d3/d3v6-migration-guide#event-management linked from https://github.com/d3/d3/releases/tag/v6.0.0

Closes T15820

Test Plan
  • Enable the Facts application, go to the Reports of a Project with task changes over time, look at charts, hover over data points, read the tooltip - e.g. on http://phorge.localhost/project/reports/1/ or http://phorge.localhost/maniphest/report/burn/
  • Check HTML source of above URIs for the <script type="text/javascript"> loading d3.min.js and open the JS file to verify the d3 version number bump.
  • Check Console of web browser's developer tools for no errors.

Diff Detail

Repository
rP Phorge
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

aklapper requested review of this revision.May 9 2024, 15:21
speck subscribed.

I take it the api used by Phorge hasn’t updated or changed in the update?

We can try it. I think d3 is little used and where it is, they are not popular apps (that I’m aware of) so seems like we can update and not have a large impact.

This revision is now accepted and ready to land.Jun 22 2024, 03:15

Thanks for taking a look! Grep'ing the Phorge codebase I could not find any other consumers of d3 than Chart.js used by the Facts application. The d3 API has changed between 5.9.2 and 6.7.0 but the only changes relevant to Phorge which I found are covered in the three lines touched in Chart.js in this very patch.

Great, I appreciate your thoroughness here!