Conversation
…undefined, and add docstrings
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request refactors the cell navigation code to use an action-based API instead of direct cell updates, and improves the component remounting mechanism.
Changes:
- Replaced
goToCellfunction withmoveCellthat accepts action objects (e.g.,{ type: 'NEXT_ROW' }) - Changed from
dataIdprop to React'skeyprop for component remounting when data changes - Refactored cell focusing to use
useEffectwith refs instead of ref callbacks
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/providers/CellNavigationProvider.test.tsx | Updated tests to use new moveCell API and removed dataId prop usage |
| src/providers/CellNavigationProvider.tsx | Implemented moveCell with action-based navigation, removed dataId tracking, added numRowsPerPage prop |
| src/hooks/useCellFocus.ts | Changed focusCellIfNeeded to focusIfNeeded using useMemo, updated to use moveCell |
| src/contexts/CellNavigationContext.ts | Added MoveCellAction type definition and updated context interface |
| src/components/TableCorner/TableCorner.tsx | Refactored to use useEffect for focusing instead of ref callback |
| src/components/RowHeader/RowHeader.tsx | Refactored to use useEffect for focusing instead of ref callback |
| src/components/HighTable/Slice.tsx | Updated keyboard navigation to use moveCell actions, removed numRowsPerPage parameter |
| src/components/HighTable/HighTable.tsx | Changed to pass numRowsPerPage to CellNavigationProvider and use key={dataId} |
| src/components/ColumnHeader/ColumnHeader.tsx | Refactored to use useEffect for focusing instead of ref callback |
| src/components/Cell/Cell.tsx | Refactored to use useEffect for focusing instead of ref callback |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.