feat(office): table detail panes and Alt+1/2/3 layout toggles
Add spreadsheet-style list, split detail pane with forms and document preview, and Alt+1/2/3 to show/hide panes with even width distribution. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -17,26 +17,23 @@ func TestKeyActionShiftTabPrevPane(t *testing.T) {
|
||||
if got := ui.KeyAction("shift+tab", model.FocusList); got != ui.ActionPrevPane {
|
||||
t.Fatalf("got %v", got)
|
||||
}
|
||||
if got := ui.KeyAction("backtab", model.FocusPreview); got != ui.ActionPrevPane {
|
||||
t.Fatalf("got %v", got)
|
||||
}
|
||||
|
||||
func TestKeyActionTabOnPreviewDoesNotSwitchPane(t *testing.T) {
|
||||
if got := ui.KeyAction("tab", model.FocusPreview); got != ui.ActionNone {
|
||||
t.Fatalf("tab on preview should stay in pane, got %v", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestKeyActionTabNextPane(t *testing.T) {
|
||||
if got := ui.KeyAction("tab", model.FocusList); got != ui.ActionNextPane {
|
||||
t.Fatalf("got %v", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestKeyActionOpenActions(t *testing.T) {
|
||||
if got := ui.KeyAction("a", model.FocusList); got != ui.ActionOpenActions {
|
||||
func TestKeyActionSortAndColumns(t *testing.T) {
|
||||
if got := ui.KeyAction("s", model.FocusList); got != ui.ActionSort {
|
||||
t.Fatalf("got %v", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestLayoutWidths(t *testing.T) {
|
||||
menu, list, preview := ui.LayoutWidths(120)
|
||||
if menu+list+preview > 120 {
|
||||
menu, list, preview := ui.LayoutWidthsLegacy(120)
|
||||
if menu+list+preview != 120 {
|
||||
t.Fatalf("widths exceed total: %d+%d+%d", menu, list, preview)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user