Repository navigation
[ResponsiveDataTable] Keep wide tables within their container - #1909
shibadityadeb wants to merge 2 commits into
Conversation
Fixes layer5io#1861 Signed-off-by: Shibaditya Deb <shibadityadeb.official@gmail.com>
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
sarajkrishnasingh
left a comment
There was a problem hiding this comment.
Nice, focused fix for #1861. The issue is clear: in the Kanvas catalog list view the table grew wider than its container and covered the filter sidebar. Wrapping MUIDataTable in a grid container with minmax(0, 1fr) is the right minimal constraint, and the comment in the code explains the why. The video in the PR description shows the table staying inside its container after the fix.
Checks are green (DCO, triage, CodeRabbit).
One gap to name: no automated test ships with this change. The fix rests on your manual reproduction on kanvas.new and the local Meshery UI check, which is reasonable for a layout fix, but nothing in the repo would catch a regression if this wrapper is later removed or the table is restructured. The repo already has a Jest suite, so a test rendering ResponsiveDataTable with wide columns and asserting it stays within its container would be the durable place for it. No docs update is needed since this changes no public API.
Signed-off-by: Shibaditya Deb <shibadityadeb.official@gmail.com>
|
Thanks for the review! I've added a Jest test for the container. Since jsdom doesn't calculate layout, it checks the container's styles rather than the rendered width, so it will fail if the wrapper is removed or its styles change. |
sarajkrishnasingh
left a comment
There was a problem hiding this comment.
Thanks for adding the test. The new test covers the wrapper styles, so it will catch a regression if the container is removed or its styles change, and it closes the gap from my earlier comment. The fix itself stays focused: the minmax(0, 1fr) grid wrapper keeps wide tables inside their container, matching issue #1861 and the video in the PR description. DCO, triage, and CodeRabbit are green, and there are no unresolved threads. Approving.
Notes for Reviewers
This PR fixes #1861
Problem: In the Kanvas catalog's list view, the table grew wider than its container and covered the filter sidebar.
Fix:
ResponsiveDataTablenow wraps the table in a container that wide columns cannot stretch, so the table scrolls sideways instead.Testing: Reproduced the issue on kanvas.new, then checked the fix by running Meshery UI locally with this change and opening Kanvas.
After the fix:
fix-1861.mp4
Signed commits
Summary by CodeRabbit