Repository analytics graphs don't adapt to changes in viewport width
Summary
On repository analytics pages, when the viewport is resized, the graphs don't shrink/grow with the window.
Steps to reproduce
Navigate to Analytics
=> Repository
for a project ( GitLab Free ) or for a group ( GitLab Premium ) and resize the browser window:
for a project | for a group |
---|---|
Screen_Recording_2022-05-17_at_12.04.26 | Screen_Recording_2022-05-17_at_11.56.03 |
The graph does not shrink when the viewport gets narrower; when the page is refreshed it starts at the correct size, but it doesn't grow when the viewport gets wider.
Example Project
Repository analytics for the gitlab
project: https://gitlab.com/gitlab-org/gitlab/-/graphs/master/charts
Repository analytics for the gitlab-org
group: https://gitlab.com/groups/gitlab-org/-/analytics/repository_analytics
What is the current bug behavior?
The graph remains the same width no matter how much the viewport is resized
What is the expected correct behavior?
The graph should adapt to changes in viewport width by resizing to be the correct width, perhaps with a debounce so it doesn't render too frequently and slow down the page (especially for pages with multiple graphs)
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)