-
Notifications
You must be signed in to change notification settings - Fork 425
[UI] Add shared table row click guard and standardize InfiniteVirtualTable #3262
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
[UI] Add shared table row click guard and standardize InfiniteVirtualTable #3262
Conversation
|
@VahantSharma is attempting to deploy a commit to the agenta projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
Pull request overview
This PR extracts the table row click guard logic from InfiniteVirtualTable into a shared utility function to promote code reuse across multiple table implementations. The refactoring moves the shouldIgnoreRowClick function to a new shared location while maintaining the same behavior in InfiniteVirtualTable.
Key changes:
- Created a new shared utility
shouldIgnoreRowClickinweb/oss/src/lib/tableRowClick.ts - Removed the local implementation from
useTableManagerand imported the shared version - Improved code formatting consistency (spacing in imports)
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
web/oss/src/lib/tableRowClick.ts |
New shared utility file containing the shouldIgnoreRowClick function with comprehensive documentation |
web/oss/src/components/InfiniteVirtualTable/hooks/useTableManager.tsx |
Removed local implementation and imported the shared utility; improved import formatting |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
738363d to
d7cfdf7
Compare
|
Hey @VahantSharma it would be nice to provide a video demo of the functionality post this PR |
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.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
|
Thanks for the PR @VahantSharma! Please sign the CLA for the PR to be merged |
Summary
This PR extracts the existing table row click guard logic into a shared utility
and reuses it in InfiniteVirtualTable. There is no behavior change.
Context
Several tables implement row-level navigation alongside interactive child
elements (checkboxes, menus, links). InfiniteVirtualTable already had a guard
to prevent accidental navigation — this PR makes that logic reusable and
establishes a canonical pattern.
What changed
shouldIgnoreRowClickutilityTesting
Related to #3254