Skip to content

Adds resize logic to contributors graphs to handle y-scaling at various screen sizess

Nate Geslin requested to merge n8rzz/gitlab:bug/contributor-graphs-resize into master

What does this MR do?

closes #22790 (closed)

  • Replaces static height and width with preserveAspectRatio and viewBox for Contributor graphs.
  • Updates CSS to better handle varying screen sizes.

I first attempted a JS-first approach, but after running into some dead ends and fighting the code a bit more than I should have, I decided to circle back to good 'ol CSS. There are some artifacts of my initial attempts left over here that I'll be removing before I remove the WIP.

Screenshots

breakpoint sm md lg xl
Screen_Shot_2019-10-12_at_10.33.25_PM Screen_Shot_2019-10-12_at_10.33.04_PM Screen_Shot_2019-10-12_at_10.32.44_PM Screen_Shot_2019-10-12_at_10.32.24_PM

Does this MR meet the acceptance criteria?

Conformity

Performance and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Nate Geslin

Merge request reports