refactor(datagrid): column index helpers, metadata dedup, keyboard nav, overlay panel#917
Conversation
…v, overlay panel (#917) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
f769971 to
6a76de7
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f769971494
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| private func handlePageDown(isShiftHeld: Bool) { | ||
| guard numberOfRows > 0 else { return } | ||
| let visibleRows = max(1, Int(visibleRect.height / rowHeight) - 1) | ||
| let currentRow = selectedRow >= 0 ? selectedRow : 0 |
There was a problem hiding this comment.
Compute Shift+Page navigation from pivot, not selectedRow
When range-selecting with Shift held, selectedRow is always the first selected row, so using it as the base row causes repeated Shift+PageDown/Shift+PageUp presses to stop extending the selection after the first jump. In practice, once a range like 10...25 is selected, selectedRow stays at 10, so targetRow is recomputed from 10 every time instead of from the current pivot; this breaks expected keyboard range extension behavior for the new PageUp/PageDown handlers.
Useful? React with 👍 / 👎.
Summary
"col_\(index)"string encoding andInt(dropFirst(4))decoding withcolumnIdentifier(for:),tableColumnIndex(for:),dataColumnIndex(for:)helpers on DataGridView, renamecolumnIndex(from:)todataColumnIndex(from:)for consistency (20+ sites)cancelOperationclears cell focus only, no longer deselects rowsNSEvent.addLocalMonitorForEventsclick-outside monitor with borderlessCellOverlayPanel(NSPanel subclass), click-outside handled natively viaresignKey()Test plan
🤖 Generated with Claude Code