-
Notifications
You must be signed in to change notification settings - Fork 83
feat(webui): Add virtual horizontal scroll to results table to prevent compressed columns in small windows. #1250
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
WalkthroughAdds horizontal scrolling to VirtualTable instances by extending the scroll config with x: "max-content" and assigns a fixed width of 100 to columns generated for Presto results. No exported API signatures or control flow are changed. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant U as User
participant P as PrestoResultsVirtualTable
participant VT as VirtualTable
participant C as Columns Util
U->>P: Open results view
P->>C: getPrestoSearchResultsTableColumns()
C-->>P: Columns (each with width: 100)
P->>VT: Render with scroll { y: tableHeight, x: "max-content" }
VT-->>U: Table with vertical and horizontal scrolling
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
components/webui/client/src/pages/SearchPage/SearchResults/SearchResultsTable/Presto/PrestoResultsVirtualTable/index.tsx(1 hunks)components/webui/client/src/pages/SearchPage/SearchResults/SearchResultsTable/Presto/PrestoResultsVirtualTable/utils.ts(1 hunks)components/webui/client/src/pages/SearchPage/SearchResults/SearchResultsTable/SearchResultsVirtualTable/index.tsx(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{cpp,hpp,java,js,jsx,tpp,ts,tsx}
⚙️ CodeRabbit configuration file
- Prefer
false == <expression>rather than!<expression>.
Files:
components/webui/client/src/pages/SearchPage/SearchResults/SearchResultsTable/SearchResultsVirtualTable/index.tsxcomponents/webui/client/src/pages/SearchPage/SearchResults/SearchResultsTable/Presto/PrestoResultsVirtualTable/index.tsxcomponents/webui/client/src/pages/SearchPage/SearchResults/SearchResultsTable/Presto/PrestoResultsVirtualTable/utils.ts
🔇 Additional comments (3)
components/webui/client/src/pages/SearchPage/SearchResults/SearchResultsTable/Presto/PrestoResultsVirtualTable/index.tsx (2)
50-51: LGTM: Horizontal scrolling enabledAdding x: "max-content" aligns with the PR goal and pairs well with virtualized rows.
50-51: No changes needed for VirtualTable’s scroll prop
- The
VirtualTableProps<RecordType>type is defined asOmit<TableProps<RecordType>, "virtual">, so it inherits AntD’sTableProps, including thescrollproperty with the same typing (allowingx?: string | number, etc.).- In the implementation (
components/webui/client/src/components/VirtualTable/index.tsx), all of...tableProps(includingscroll) are spread directly into the AntD<Table>alongsidevirtual={true}, ensuring thescrollprop (e.g.x: "max-content") is forwarded unchanged to AntD’sTablecomponent.Thus, passing
scroll={{ y: tableHeight, x: "max-content" }}intoVirtualTablewill type-check correctly and be applied at runtime exactly as intended.components/webui/client/src/pages/SearchPage/SearchResults/SearchResultsTable/SearchResultsVirtualTable/index.tsx (1)
44-45: LGTM: Consistent horizontal scroll for generic results tableThis mirrors the Presto table change and should prevent column compression on narrow viewports.
.../pages/SearchPage/SearchResults/SearchResultsTable/Presto/PrestoResultsVirtualTable/utils.ts
Show resolved
Hide resolved
hoophalab
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
kirkrodrigues
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deferring to @hoophalab's review.
For the PR title, how about:
feat(webui): Add virtual horizontal scroll to results table to prevent compressed columns in small windows.
Description
Adds virtual scroll to results table, so table scrolls instead of squishing results on small windows.
Checklist
breaking change.
Validation performed
Table now scrolls in x direction.
Summary by CodeRabbit