feat(datagrid): jump to a column by name in a wide result - #2611
Open
datlechin wants to merge 1 commit into
Open
feat(datagrid): jump to a column by name in a wide result#2611datlechin wants to merge 1 commit into
datlechin wants to merge 1 commit into
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Fixes #2495
What
A Jump to Column panel for the data grid.
Cmd+Shift+J, Edit > Find > Jump to Column…, or Jump to Column… at the foot of the Columns popover opens a fuzzy search over the columns of the result on screen. Each row shows the column's name, its type and its position among the presented columns;Returnscrolls the column into view and puts the cell cursor in it. A hidden column is listed too, marked Hidden, and jumping to it shows it first.How
QuickSwitcherPanelController), which now records the identity of what it presents soCmd+Shift+Jtoggles its own panel and never closes an Open Quickly it did not open. The row chrome the two panels share (bold matched characters, footer key hints) moved intoQuickSwitcherRowChrome.GridColumnCatalogbuilds oneGridColumnEntrylist from the result's columns and types, the tab's hidden set, the grid's live display order and the columns the visibility picker already offered. The Columns popover and the jump panel both render it, so hiding and jumping read one list. The popover rows now show the column type beside the name.TableViewCoordinator.jumpToColumn(dataIndex:)resolves the column throughtableColumnIndex(for:)andpresentsColumn, then goes throughKeyHandlingTableView.focusCell, the one path a keystroke moves the cell cursor by, so the row selection, the repaint and the accessibility notice all follow. A hidden column parks the jump onpendingColumnJumpandshowColumnruns; the grid's next update pass consumes it once the column is presented, the same shape as the scroll anchor restore.ShortcutAction.jumpToColumnis a data-grid action with defaultCmd+Shift+J, rebindable in Settings > Keyboard. The menu item is validated throughMenuValidationContext.canJumpToColumn: a connected window whose selected tab shows the data grid with columns to list. A query tab's result counts as much as a table's.Tests
GridColumnCatalogTests: display positions after a reorder, hidden result columns, schema-only hidden columns, duplicate names, picker order.ColumnJumpViewModelTests: fuzzy ranking with matched indices, empty-query order, cursor preselection, selection reset on a new query, clamped movement, list height.TableViewCoordinatorColumnJumpTests: a jump seeds the cursor on the first row, keeps a selected row, refuses a hidden column, a parked jump lands once the column is presented and keeps its index across duplicate names, a table tab's parked jump waits for the refetched result, a replacement without the column drops it, a landed jump supersedes it, a jump against another table is dropped, a result with no rows still scrolls,releaseDatadrops it.KeyboardShortcutTests,MainMenuBuilderTests,QuickSwitcherPanelControllerTests,JumpToColumnMenuValidationTests: the default chord, the menu placement, the panel identity, the validation gate.ColumnJumpUITests: a 60-column query, the shortcut, the menu item and the popover button each open the panel, a fuzzy match lists the column with its position, andReturnbrings the last column's header into the viewport.Verification
All through
.claude/skills/fix-issue/scripts/verify.shon the worktree, logs under.analysis/feat-jump-to-column/logs/:generatebuild(build-TablePro-221902.log)teston the 14 touched suites (test-GridColumnCatalogTests-221936.log)uitest ColumnJumpUITests OpenQuicklyCommandUITests ResultStatusBarUITests(test-ColumnJumpUITests-222052.log)swiftlint lint --stricton every touched filedocs/scripts/check-writing-style.sh,check-docs-against-source.py,check-links.pyCodex read the diff cold. The
reviewpass returned seven findings: five fixed (the docs images, a mounted-grid gate on every entry point, a commit fenced to the tab and grid it opened over, a parked jump that keeps its data index across duplicate names, an Open Quickly panel identity) and two dismissed below. Theadversarial-reviewpass returned five: four fixed (a commit also proves the column at that index still carries the entry's name, a landed jump supersedes a parked one and a replacement result without the column drops it, a table tab's parked jump waits for the refetched result rather than the interim update that unhides an already-fetched key column, and the Columns popover counts one row per name) and one reported as a pre-existing defect in the collateral register rather than fixed here.Dismissed: the suggestion to classify the shortcut
.global. Jump to Column is dispatched by its menu item and validated by grid state, the same as Previous Page, Copy with Headers and every other.dataGridaction;.globalis for the find commands, which route to whichever surface holds focus. The documented limitation that a user can rebind an editor action onto a grid chord is unchanged. Also dismissed: retrying a hidden-column jump when a query is already running. That isshowColumn's existing behaviour for the popover too, and the parked jump lands whenever the column arrives.Before / After
The panel over a 60-column join in the sample database, typed
post, light and dark. These are the two files the docs page ships (docs/images/column-jump*.png); the display attached during capture was 1x, so they are 1512x861 rather than the 3024x1722 the other docs images carry.PostalCodeis column 41 and can only be reached by scrolling.Cmd+Shift+J,post,Return: the grid scrolls toPostalCodeand the cell cursor sits in it on the selected row.https://claude.ai/code/session_0128vQ6G1kKX83UFyY3Ct5uT