summaryrefslogtreecommitdiffstats
path: root/pkg/gui/types/context.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-08-01 21:36:17 +1000
committerJesse Duffield <jessedduffield@gmail.com>2022-08-01 21:38:57 +1000
commitfab2e14b55455be370d8514871d60bc59adfbf30 (patch)
tree081a4a6870b29ab8ba271e877a49dc2f39b56732 /pkg/gui/types/context.go
parent81f80ce968f62facb2c16313cee769b83e61587b (diff)
fix issue caused by opening a menu over a prompt
Diffstat (limited to 'pkg/gui/types/context.go')
-rw-r--r--pkg/gui/types/context.go14
1 files changed, 12 insertions, 2 deletions
diff --git a/pkg/gui/types/context.go b/pkg/gui/types/context.go
index 253bb62ef..7dec9b9db 100644
--- a/pkg/gui/types/context.go
+++ b/pkg/gui/types/context.go
@@ -8,12 +8,22 @@ import (
type ContextKind int
const (
+ // this is your files, branches, commits, contexts etc. They're all on the left hand side
+ // and you can cycle through them.
SIDE_CONTEXT ContextKind = iota
+ // This is either the left or right 'main' contexts that appear to the right of the side contexts
MAIN_CONTEXT
- TEMPORARY_POPUP
+ // A persistent popup is one that has its own identity e.g. the commit message context.
+ // When you open a popup over it, we'll let you return to it upon pressing escape
PERSISTENT_POPUP
+ // A temporary popup is one that could be used for various things (e.g. a generic menu or confirmation popup).
+ // Because we re-use these contexts, they're temporary in that you can't return to them after you've switched from them
+ // to some other context, because the context you switched to might actually be the same context but rendering different content.
+ // We should really be able to spawn new contexts for menus/prompts so that we can actually return to old ones.
+ TEMPORARY_POPUP
+ // This contains the command log, underneath the main contexts.
EXTRAS_CONTEXT
- // only used by the one global context
+ // only used by the one global context, purely for the sake of defining keybindings globally
GLOBAL_CONTEXT
)