Skip to content

Reimplement contributor stat graphs

What does this MR do?

Reimplements the contributor stat graph feature using modern JS.

  • Use ES6 classes
  • Use lambas where appropriate
  • DRYed implementations
  • Ready for commit/addition/deletion UI via field
  • Adds a dependency on luxon for date manipulation

Very little logic was preserved from the previous implementation.

Adds the fillEmptyDates util function that fills the empty spaces in the date array that is used as the x domain for the graphs.

fillEmptyDates does not add commit data for every single empty day, only those surrounding non-zero days. This is preferable to simply filling every empty day which could presumably number in the 1000s for long running projects.

Are there points in the code the reviewer needs to double check?

Why was this MR needed?

See #43363 (moved).

Screenshots (if relevant)

Before

graph-before

After

graph-after

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #43363 (moved).

Edited by griest

Merge request reports