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
After
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Review
-
Has been reviewed by UX -
Has been reviewed by Frontend -
Has been reviewed by Backend -
Has been reviewed by Database
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together -
Internationalization required/considered -
End-to-end tests pass ( package-qa
manual pipeline job)
What are the relevant issue numbers?
Closes #43363 (moved).
Edited by griest