Skip to content

Conversation

@VahantSharma
Copy link
Contributor

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

  • Added a shared shouldIgnoreRowClick utility
  • Replaced the local implementation in InfiniteVirtualTable

Testing

  • Manually verified InfiniteVirtualTable behavior is unchanged
  • Clicking the row body still navigates as before
  • Interactive elements do not trigger row navigation

Related to #3254

Copilot AI review requested due to automatic review settings December 20, 2025 19:50
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Dec 20, 2025
@vercel
Copy link

vercel bot commented Dec 20, 2025

@VahantSharma is attempting to deploy a commit to the agenta projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

Copilot AI left a 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 shouldIgnoreRowClick in web/oss/src/lib/tableRowClick.ts
  • Removed the local implementation from useTableManager and 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.

@mmabrouk
Copy link
Member

Hey @VahantSharma it would be nice to provide a video demo of the functionality post this PR

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 24, 2025
Copilot AI review requested due to automatic review settings December 24, 2025 09:43
Copy link
Contributor

Copilot AI left a 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.

@bekossy
Copy link
Member

bekossy commented Dec 24, 2025

Thanks for the PR @VahantSharma! Please sign the CLA for the PR to be merged

@bekossy bekossy closed this Dec 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files. UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants