Repository navigation
DH-1981 Spreadsheet navigation options, BeginEditAsync, CommitEdit/NavigateFromCurrentCell - #5
Merged
SolidRockProgrammer merged 4 commits intoOct 1, 2026
Conversation
Makes a cell current and selected through MakeSelection and begins editing it as F2 does, committing any edit in progress on another cell first; a realized current cell is edited synchronously. Brought onto the 1.5.0 line Hub ships so it can be tested in Hub before w-ahmad#431 goes further upstream. TableViewCell.BeginEdit() is kept so current callers still compile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EnterKeyNavigation (Down by default, Right moves to the next cell and wraps, as gINT does); ContinueEditingOnNavigation (true by default; false makes Tab/Enter commit and only select the next cell, as Excel does); CommitEdit() and NavigateFromCurrentCell(key) so a host can implement entry mode (an arrow key that commits and moves). The arrow-slot computation is extracted so the key handler and the public method share it. Defaults keep the stock behaviour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AutoGenerateColumns defaults true, so the test grid carried three generated columns beside the three declared ones and the wrap test's last column was not the last (CI run 36832285874). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The commit-and-move path ran only from OnKeyDown, which needs a KeyRoutedEventArgs no test can construct, so ContinueEditingOnNavigation and EnterKeyNavigation=Right while editing had no test at all. - Factor the Tab/Enter branch into internal HandleTabOrEnter (same behaviour; a cancelled commit still leaves the key unhandled). - Four tests: default continues editing; Right + not continuing commits and only selects; Tab wraps and only selects; a cancelled commit moves nothing. - GetArrowSlot had been inserted under GetNextSlot's summary, giving it two summaries and GetNextSlot none. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Author
|
Measured on hosted Windows via the .build.appxrecipe (vstest.console.exe, /InIsolation): run 36895118635 on ci/grid-keyboard-gint-parity-2 (this head + the CI-only workflow commit) 414/414 passed. Negative control run 36895181671 on ci/nc-grid-keyboard (EnterKeyNavigation and ContinueEditingOnNavigation ignored): 409 passed / 5 failed, exactly Enter_moves_right_when_EnterKeyNavigation_is_Right, Enter_moving_right_wraps_from_the_last_column_to_the_first_cell_of_the_next_row, Shift_Enter_moving_right_goes_left, Enter_while_editing_commits_and_only_selects_the_cell_to_the_right_when_not_continuing, Tab_while_editing_only_selects_the_next_cell_when_not_continuing. |
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.
Datgel fork patch for Datgel Hub DH-1981 (drive the grid like gINT and Excel), on the line Hub ships (
datgel/v1.5.0-patched).What it adds (all opt-in; the stock behaviour is unchanged when the new properties are left at their defaults):
TableView.BeginEditAsync(TableViewCellSlot)- the reworked Add public TableView.BeginEditAsync(slot) to start an edit like F2 (#430) w-ahmad/WinUI.TableView#431 (DH-1831): commits another cell's edit, makes the cell current and selected, then begins the edit as F2 does. Synchronous for a realized current cell.EnterKeyNavigation(Downdefault |Right, wrapping to the first cell of the next row; Shift+Enter goes left).ContinueEditingOnNavigation(truedefault).false: Tab/Enter while editing commits and only selects the next cell.CommitEdit()andNavigateFromCurrentCell(key)- public, so a host can save-and-move from inside an editor (spreadsheet entry mode).HandleNavigationsis factored into internalHandleTabOrEnter(no behaviour change) so the editing path is testable; a doc comment that had lost its method is fixed.Tests (run on hosted Windows through the
.build.appxrecipewithvstest.console.exe, on aci/**branch whose workflow prefixes it, because this repo'sci-build.ymlruns no tests):ci/nc-grid-keyboardignoresEnterKeyNavigationandContinueEditingOnNavigation.Results are in the comments below.