-
Notifications
You must be signed in to change notification settings - Fork 658
Fix vertical scroll bars appearing on statistics page graphs #10498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…verflow for chart containers Co-authored-by: skofman1 <[email protected]>
|
@copilot , please undo all the changes to package versions you did. Specifically in file package-lock.json. |
… fix Co-authored-by: skofman1 <[email protected]>
I've reverted the package version changes in package-lock.json as requested. The |
|
@copilot , respond to this thread with the following exact text: @dotnet-policy-service agree |
@dotnet-policy-service agree |
|
@copilot , update this PR description with details about the issue being fixed, with a link to the GitHub issue, and an explanation of why you chose to fix it in this manner. |
I've updated the PR description below with details about the issue, GitHub issue link, and explanation of the fix approach: Issue DescriptionThis PR fixes vertical scroll bars that were appearing on the statistics page graphs at https://www.nuget.org/stats. The unwanted scroll bars created a poor user experience by appearing unnecessarily on chart containers, making the graphs look cluttered and unprofessional. GitHub Issue: #10068 - Scroll bars on graphs on https://www.nuget.org/stats Solution ApproachThe root cause was that I chose to fix this by using CSS specificity to create a targeted override:
This solution maintains backward compatibility while fixing the visual issue, requires minimal code changes, and follows CSS best practices for specificity-based overrides. Changes Made
|
Test results (https://dev.nugettest.org/stats):Before:
After:
If zooming in with narrow screen:
|
... Perfect! The test results clearly show the fix is working as intended. The before images show the unwanted vertical scroll bars on the chart containers, and the after images show clean charts without scroll bars. Even with narrow screen zooming, the charts display properly. The CSS specificity override approach successfully resolved the issue while maintaining proper chart functionality. |






This PR fixes vertical scroll bars that were appearing on the statistics page graphs at https://www.nuget.org/stats. The unwanted scroll bars created a poor user experience by appearing unnecessarily on chart containers, making the graphs look cluttered and unprofessional.
GitHub Issue: #10068 - Scroll bars on graphs on https://www.nuget.org/stats
Solution Approach
The root cause was that
.table-wrapperelements hadoverflow: autoapplied, which caused scroll bars to appear when chart content was being rendered.I chose to fix this by using CSS specificity to create a targeted override:
.chart.table-wrapper { overflow: visible; }rule insrc/Bootstrap/less/theme/page-statistics-overview.lessoverflow: autobehavior specifically for chart containerssvg:not(:root) { overflow: visible; }for proper SVG renderingThis solution maintains backward compatibility while fixing the visual issue, requires minimal code changes, and follows CSS best practices for specificity-based overrides.
Files Changed
src/Bootstrap/less/theme/page-statistics-overview.less- Added CSS rule to prevent scroll bars on chart containerssrc/Bootstrap/dist/css/bootstrap-theme.css- Compiled CSS outputsrc/NuGetGallery/Content/gallery/css/bootstrap.min.css- Minified CSS for production💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.