Enforce constant sizing for dataset tiles
Summary
Addresses inconsistent sizing of dataset tiles in VirtualizerGridLayout when the width shrinks or varies due to a scrollbar. Added scrollbar-gutter: stable; to .container in virtualizer-grid-layout.module.scss to reserve space for the scrollbar. This ensures the layout space remains equal across different sections regardless of scrollbar visibility, maintaining consistent tile sizes while allowing them to grow properly on wider viewports.
Closes :#6855
How to test
- Navigate to a project that contains trained models.
- Go to Models -> Model details -> Training datasets tab.
- Observe the sizes of the thumbnail tiles in each column (Training, Validation, Testing).
- Resize the application window width continuously.
- Ensure that all the thumbnail tiles remain consistently sized across all three columns, regardless of whether a column has a vertical scrollbar or not.
- Check the main dataset gallery view (Dataset -> Gallery) and verify that resizing the window there also keeps the tiles properly sized without uncontrolled stretching.
Checklist
- [x] The PR title and description are clear and descriptive
- [x] I have manually tested the changes
- [x] All changes are covered by automated tests
- [x] All related issues are linked to this PR (if applicable)
- [ ] Documentation has been updated (if applicable)
Hi @piotrgrubicki pls let me know if this pr needs any changes or if it is good to merge
@andersendsa did you try adding "scrollbar-gutter: stable;" to the .container instead? If we reserve space for the scrollbar then all sizes will match. This solution also works but then for bigger viewports you wont let the image grow as much as it could
@andersendsa did you try adding "scrollbar-gutter: stable;" to the .container instead? If we reserve space for the scrollbar then all sizes will match. This solution also works but then for bigger viewports you wont let the image grow as much as it could
@jpggvilaca I will try adding scrollbar-gutter: stable to the .container instead and will revert
scrollbar-gutter: stable
HI @jpggvilaca i have done the changes the pr is ready for review
Hi @jpggvilaca could you pls let me know if this pr needs any changes or if it is good to merge
Thank you! One last favor, please update the PR description<
@jpggvilaca I have updated the description