Skip to content

Add Row Editing Highlight and Tap-to-Edit support for Row selection Mode#342

Open
rashmi-thakurr wants to merge 1 commit intow-ahmad:mainfrom
DDancingDeath:feature/cell-editing-row-mode
Open

Add Row Editing Highlight and Tap-to-Edit support for Row selection Mode#342
rashmi-thakurr wants to merge 1 commit intow-ahmad:mainfrom
DDancingDeath:feature/cell-editing-row-mode

Conversation

@rashmi-thakurr
Copy link
Copy Markdown

Summary

Adds visual row-editing highlight and tap-to-edit support for Row and CellOrRow selection modes, so the active row is clearly indicated while a cell is being edited, matching Windows File Explorer's behavior.

Closes #336

Key Implementation Details

  • Editing highlight on the active row: When editing begins, the row receives a highlight (using PointerOverBackground on Windows, _selectionBackground.Opacity on Uno). The highlight follows the editing row as the user navigates with Tab/Enter, and is cleared when editing
    stops.
  • Tap-to-edit in Row mode: A second tap on an already-selected row forwards the event to the target cell's BeginCellEditing, enabling File Explorer–style tap-pause-tap-to-rename. Similar forwarding in OnDoubleTapped (skips IsSelected check since the first tap already
    selects).
  • Tap-to-edit in CellOrRow mode: A second tap on an already-selected cell starts inline editing without requiring double-click.
  • Pointer hover for Row/CellOrRow: Added per-cell pointer hover when individual cells are editable, even if the table is globally read-only.
  • Tab wraps row in Row mode: GetNextSlot now treats Tab like Enter when SelectionUnit is Row, so Tab advances to the next row instead of cycling through cells.
  • Virtualization safety: PrepareContainerForItemOverride clears stale editing highlight and current-cell borders on recycled containers, and re-applies the highlight when the editing row scrolls back into view.
  • Platform-specific rendering: ApplyEditingHighlight uses #if WINDOWS to branch between WinUI 3 (PointerOverBackground brush) and Uno Platform (_selectionBackground.Opacity).
  • Alternate-color guard: EnsureAlternateColors skips when _hasEditingHighlight is active, preventing the highlight from being overwritten.

Test Coverage

7 new tests in TableViewRowEditingTests.cs covering: editing highlight in Row mode, editing highlight in CellOrRow mode, pointer hover prerequisites, tap-to-edit prerequisites, virtualization recycling, current-cell state reset, and editing state transitions across rows.

All 173 tests pass (existing + new).

Files Changed

4 files changed, +400 / −6 lines

File Changes Description
src/TableView.cs +64 / −1 Editing highlight fields, PrepareContainerForItemOverride recycling, Tab-wraps-row, highlight movement, SetIsEditing management
src/TableViewCell.cs +14 / −2 CellOrRow pointer hover, second-tap editing in CellOrRow mode
src/TableViewRow.cs +75 / −3 Async OnTapped/OnDoubleTapped with tap-to-edit forwarding, ApplyEditingHighlight, EnsureAlternateColors guard
tests/TableViewRowEditingTests.cs +247 (new) 7 UI tests for row-editing highlight feature

@rashmi-thakurr rashmi-thakurr force-pushed the feature/cell-editing-row-mode branch from cf3ad20 to 5dbf5b6 Compare April 10, 2026 08:11
@rashmi-thakurr rashmi-thakurr force-pushed the feature/cell-editing-row-mode branch from 5dbf5b6 to 7264709 Compare April 10, 2026 08:14
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.

Select Row Automatically When Editing a Cell

1 participant