fix(studio): replace ScrollTable with KUI table, fix scrolling#391
fix(studio): replace ScrollTable with KUI table, fix scrolling#391nv-odrulea wants to merge 4 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesUploadModal table and layout refactor
Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
web/packages/common/src/components/UploadModal/SimpleFilesTable.tsx (1)
117-117: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick winKeep sticky-header styling with the common component.
SimpleFilesTableis inweb/packages/common, but.sticky-table-headeris defined inweb/packages/studio/src/index.cssLines 70-74. Non-Studio consumers will miss this styling. Inline it or move it to common/shared CSS.Proposed fix
- <TableHead className="sticky top-0 z-[1] bg-surface-overlay border-b-0 sticky-table-header"> + <TableHead className="sticky top-0 z-[1] bg-surface-overlay border-b-0 shadow-[0_2px_0_var(--border-color-base)]">Then remove the Studio-only global rule:
-/* hack fix: sticky table header separator — box-shadow is the only reliable way to - paint a bottom border that stays with a position:sticky thead across browsers */ -.sticky-table-header { - box-shadow: 0 2px 0 var(--border-color-base); -}🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@web/packages/common/src/components/UploadModal/SimpleFilesTable.tsx` at line 117, The TableHead element in SimpleFilesTable uses the CSS class `.sticky-table-header` which is defined only in web/packages/studio/src/index.css, making it unavailable to non-Studio consumers of this common component. Move the sticky-table-header CSS rule definition from studio's index.css to the common package's shared CSS file, or inline the styles directly on the TableHead element in SimpleFilesTable. Then remove the original rule from studio's index.css to avoid duplication and ensure all consumers have access to the proper styling.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@web/packages/common/src/components/UploadModal/index.tsx`:
- Around line 72-82: The ModalContent component currently uses `w-[560px]
overflow-hidden` which clips content on narrow and short screens, making footer
actions unreachable. Replace the `overflow-hidden` class with a scrollable
overflow property (such as `overflow-y-auto` or `overflow-auto`) to allow users
to scroll and access all content including the footer actions. Ensure the width
constraint is responsive or adjusted to work properly on smaller viewports while
maintaining the modal's layout integrity.
---
Nitpick comments:
In `@web/packages/common/src/components/UploadModal/SimpleFilesTable.tsx`:
- Line 117: The TableHead element in SimpleFilesTable uses the CSS class
`.sticky-table-header` which is defined only in
web/packages/studio/src/index.css, making it unavailable to non-Studio consumers
of this common component. Move the sticky-table-header CSS rule definition from
studio's index.css to the common package's shared CSS file, or inline the styles
directly on the TableHead element in SimpleFilesTable. Then remove the original
rule from studio's index.css to avoid duplication and ensure all consumers have
access to the proper styling.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 7c6cef19-70e5-4fc5-b60c-8c9ba330b81a
📒 Files selected for processing (3)
web/packages/common/src/components/UploadModal/SimpleFilesTable.tsxweb/packages/common/src/components/UploadModal/index.tsxweb/packages/studio/src/index.css
|
2896573 to
816b114
Compare
Signed-off-by: Octavian Drulea <odrulea@nvidia.com>
Signed-off-by: Octavian Drulea <odrulea@nvidia.com>
Signed-off-by: Octavian Drulea <odrulea@nvidia.com>
816b114 to
70f1ff9
Compare
Signed-off-by: Octavian Drulea <odrulea@nvidia.com>
ScrollTablewasn't the best fit for the files list in the Dataset file picker modal. One reason is that it didn't bring sticky table headers with it, leaving us to either use DataView (overkill) or roll our own. So we roll our own basic implementation of KUI table here, which is a fairly simple use case and appropriate.As a bonus, the styling looks better since the rows do not have padding beyond their separators. We also gain sticky table headers.
To fix sticky table header bottom row from scrolling out of view, we needed to apply a known CSS hack involving
box-shadow:Summary by CodeRabbit
New Features
Style