From 621229bb09177df387b3e6c2f99020182be0e5cb Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Thu, 2 Jan 2025 16:10:58 +1100 Subject: [PATCH] Default to half-screen mode when filtering files or using the git-arg CLI arg It should have been half-screen from the get-go. I think I just used full-screen to make demos look nicer. Now that we have a CLI arg for the screen mode we can make use of that in the demos. --- pkg/gui/gui.go | 2 +- pkg/integration/tests/demo/bisect.go | 2 +- pkg/integration/tests/demo/commit_graph.go | 2 +- pkg/integration/tests/demo/interactive_rebase.go | 2 +- pkg/integration/tests/demo/nuke_working_tree.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index 72d3b9c31..7600c955b 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -583,7 +583,7 @@ func initialScreenMode(startArgs appTypes.StartArgs, config config.AppConfigurer if startArgs.ScreenMode != "" { return getWindowMaximisation(startArgs.ScreenMode) } else if startArgs.FilterPath != "" || startArgs.GitArg != appTypes.GitArgNone { - return types.SCREEN_FULL + return types.SCREEN_HALF } else { return getWindowMaximisation(config.GetUserConfig().Gui.WindowSize) } diff --git a/pkg/integration/tests/demo/bisect.go b/pkg/integration/tests/demo/bisect.go index f80ce86a9..370464af3 100644 --- a/pkg/integration/tests/demo/bisect.go +++ b/pkg/integration/tests/demo/bisect.go @@ -7,7 +7,7 @@ import ( var Bisect = NewIntegrationTest(NewIntegrationTestArgs{ Description: "Interactive rebase", - ExtraCmdArgs: []string{"log"}, + ExtraCmdArgs: []string{"log", "--screen-mode=full"}, Skip: false, IsDemo: true, SetupConfig: func(config *config.AppConfig) { diff --git a/pkg/integration/tests/demo/commit_graph.go b/pkg/integration/tests/demo/commit_graph.go index 100bfca2b..8cb2847a3 100644 --- a/pkg/integration/tests/demo/commit_graph.go +++ b/pkg/integration/tests/demo/commit_graph.go @@ -7,7 +7,7 @@ import ( var CommitGraph = NewIntegrationTest(NewIntegrationTestArgs{ Description: "Show commit graph", - ExtraCmdArgs: []string{"log"}, + ExtraCmdArgs: []string{"log", "--screen-mode=full"}, Skip: false, IsDemo: true, SetupConfig: func(config *config.AppConfig) { diff --git a/pkg/integration/tests/demo/interactive_rebase.go b/pkg/integration/tests/demo/interactive_rebase.go index b4a7337d6..a9e97ee0d 100644 --- a/pkg/integration/tests/demo/interactive_rebase.go +++ b/pkg/integration/tests/demo/interactive_rebase.go @@ -7,7 +7,7 @@ import ( var InteractiveRebase = NewIntegrationTest(NewIntegrationTestArgs{ Description: "Interactive rebase", - ExtraCmdArgs: []string{"log"}, + ExtraCmdArgs: []string{"log", "--screen-mode=full"}, Skip: false, IsDemo: true, SetupConfig: func(config *config.AppConfig) { diff --git a/pkg/integration/tests/demo/nuke_working_tree.go b/pkg/integration/tests/demo/nuke_working_tree.go index 8adfb32d7..5ff2a5dd6 100644 --- a/pkg/integration/tests/demo/nuke_working_tree.go +++ b/pkg/integration/tests/demo/nuke_working_tree.go @@ -7,7 +7,7 @@ import ( var NukeWorkingTree = NewIntegrationTest(NewIntegrationTestArgs{ Description: "Nuke the working tree", - ExtraCmdArgs: []string{"status"}, + ExtraCmdArgs: []string{"status", "--screen-mode=full"}, Skip: false, IsDemo: true, SetupConfig: func(config *config.AppConfig) {