Skip to content

Conversation

@davemarco
Copy link
Contributor

@davemarco davemarco commented Aug 22, 2025

Description

Adds virtual scroll to results table, so table scrolls instead of squishing results on small windows.

Checklist

  • The PR satisfies the contribution guidelines.
  • This is a breaking change and that has been indicated in the PR title, OR this isn't a
    breaking change.
  • Necessary docs have been updated, OR no docs need to be updated.

Validation performed

Table now scrolls in x direction.

Summary by CodeRabbit

  • New Features
    • Added horizontal scrolling to search results tables, enabling easier viewing of wide datasets while preserving existing vertical scrolling.
    • Standardized column widths in Presto results for a more predictable layout and improved readability.
    • Behaviour for data, sorting, and pagination remains unchanged, ensuring a seamless transition with no impact on existing workflows.

@davemarco davemarco requested a review from hoophalab August 22, 2025 13:26
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 22, 2025

Walkthrough

Adds 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

Cohort / File(s) Summary
VirtualTable horizontal scroll config
components/webui/client/src/pages/.../Presto/PrestoResultsVirtualTable/index.tsx, components/webui/client/src/pages/.../SearchResultsVirtualTable/index.tsx
Updated VirtualTable prop: scroll expanded from { y: tableHeight } to { y: tableHeight, x: "max-content" } to enable horizontal scrolling.
Presto columns width util
components/webui/client/src/pages/.../Presto/PrestoResultsVirtualTable/utils.ts
getPrestoSearchResultsTableColumns now sets width: 100 on each generated column.

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
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • hoophalab
  • kirkrodrigues

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 Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@davemarco davemarco marked this pull request as ready for review August 22, 2025 13:29
@davemarco davemarco requested a review from a team as a code owner August 22, 2025 13:29
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 7aa8684 and b269e98.

📒 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.tsx
  • components/webui/client/src/pages/SearchPage/SearchResults/SearchResultsTable/Presto/PrestoResultsVirtualTable/index.tsx
  • components/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 enabled

Adding 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 as Omit<TableProps<RecordType>, "virtual">, so it inherits AntD’s TableProps, including the scroll property with the same typing (allowing x?: string | number, etc.).
  • In the implementation (components/webui/client/src/components/VirtualTable/index.tsx), all of ...tableProps (including scroll) are spread directly into the AntD <Table> alongside virtual={true}, ensuring the scroll prop (e.g. x: "max-content") is forwarded unchanged to AntD’s Table component.

Thus, passing scroll={{ y: tableHeight, x: "max-content" }} into VirtualTable will 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 table

This mirrors the Presto table change and should prevent column compression on narrow viewports.

Copy link
Contributor

@hoophalab hoophalab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

Copy link
Member

@kirkrodrigues kirkrodrigues left a 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.

@hoophalab hoophalab changed the title feat(webui): Add virtual scroll in x-direction to results table to prevent compressed columns on small window sizes. feat(webui): Add virtual horizontal scroll to results table to prevent compressed columns in small windows. Aug 26, 2025
@hoophalab hoophalab merged commit c7804f2 into y-scope:main Aug 26, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants