Skip to content

refactor(datagrid): native focus ring, single-click edit, a11y fixes#921

Merged
datlechin merged 8 commits intomainfrom
refactor/datagrid-phase2
Apr 28, 2026
Merged

refactor(datagrid): native focus ring, single-click edit, a11y fixes#921
datlechin merged 8 commits intomainfrom
refactor/datagrid-phase2

Conversation

@datlechin
Copy link
Copy Markdown
Member

@datlechin datlechin commented Apr 27, 2026

Summary

DataGrid audit Phase 2 — native cell rendering and interaction improvements.

# Issue Resolution
#6 Single-click edit Click an already-focused cell starts the field editor. Guarded against drag-select.
#8 System focus ring drawFocusRingMask() + NSColor.keyboardFocusIndicatorColor instead of CALayer + #007AFF.
#9 VoiceOver above 5k rows Drop the isLargeDataset accessibility gate.
#50 Hardcoded font 13 in date picker Pull pointSize from ThemeEngine.shared.dataGridFonts.regular.
#51 Border color keyboardFocusIndicatorColor instead of selectedControlColor.
#52 a11y row/col indices setAccessibilityRowIndexRange / setAccessibilityColumnIndexRange per cell.

Audit items #19, #20, #54: NOT FOUND in current code; skipped.

This is the second of three planned PRs from the audit. Phase 1 landed in #919; Phase 3 (interaction fixes: NSUndoManager, multi-cell paste, etc.) and Phase 4 (cleanup) follow.

Test plan

  • System Settings > Accessibility > Increase contrast: focus ring follows
  • System Settings > Appearance > Accent color (e.g. Graphite): focus ring follows
  • Click an unfocused cell: row selects, no edit
  • Click the same focused cell again: field editor opens
  • Drag-select starting from a focused cell: no edit triggered
  • Date column: cell click opens popover; picker font matches data-grid font setting
  • Multiline overlay editor: 2px border uses keyboardFocusIndicatorColor
  • VoiceOver on a 10k row table: every cell announces correctly with row/column indices
  • No regression on FK / JSON / blob / enum / set / boolean columns: their popovers still open via chevron / double-click
  • Right-click > Set Value on a NOT NULL column: no "NULL" option shown
  • Right-click > Set Value on a column without a default: no "Default" option shown

Files

  • DataGridCellView.swift — native focus ring via drawFocusRingMask, restored final
  • DataGridCellFactory.swift — drop CALayer border, drop a11y gate, add row/col index ranges
  • CellOverlayEditor.swiftkeyboardFocusIndicatorColor
  • DatePickerCellEditor.swift — themed font size
  • KeyHandlingTableView.swift — single-click edit on focused cell, drag guard
  • Extensions/DataGridView+Editing.swiftInlineEditEligibility enum, shared inlineEditEligibility predicate
  • Extensions/DataGridView+Columns.swift — restore isBooleanType in hasSpecialEditor
  • TableRowViewWithMenu.swift — gate Set NULL / Set Default by column metadata

@datlechin datlechin changed the title refactor(datagrid): phase 2 native cell rendering refactor(datagrid): native cell rendering Apr 27, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ec3cc8c396

ℹ️ 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".

Comment thread TablePro/Views/Results/Extensions/DataGridView+Click.swift Outdated
Comment thread TablePro/Views/Results/DataGridCellFactory.swift Outdated
@datlechin datlechin changed the title refactor(datagrid): native cell rendering refactor(datagrid): native focus ring, single-click edit, a11y fixes Apr 28, 2026
@datlechin datlechin merged commit eb27b2b into main Apr 28, 2026
2 checks passed
@datlechin datlechin deleted the refactor/datagrid-phase2 branch April 28, 2026 02:51
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.

1 participant