diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2024-01-12 11:17:26 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2024-01-13 12:57:49 +1100 |
commit | a0b63090e03c42ddf10514851fbf7758299e0d59 (patch) | |
tree | 3e160a769865204986b60ef465f32af23cf28047 /docs/dev | |
parent | 53a8bd2e3fbbc474bbd70564f38f6fe1e1d10079 (diff) |
Update codebase guide
I'm adding a couple more terms: Keybinding and Action, to keep things standardised
Diffstat (limited to 'docs/dev')
-rw-r--r-- | docs/dev/Codebase_Guide.md | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/dev/Codebase_Guide.md b/docs/dev/Codebase_Guide.md index 93a771274..307482e2a 100644 --- a/docs/dev/Codebase_Guide.md +++ b/docs/dev/Codebase_Guide.md @@ -75,6 +75,8 @@ In terms of dependencies, controllers sit at the highest level, so they can refe * **Tab**: Each tab in a window (e.g. Files, Worktrees, Submodules) actually has a corresponding view which we bring to the front upon changing tabs. * **Model**: Representation of a git object e.g. commits, branches, files. * **ViewModel**: Used by a context to maintain state related to the view. +* **Keybinding**: A keybinding associates a _key_ with an _action_. For example if you press the 'down' arrow, the action performed will be your cursor moving down a list by one. +* **Action**: An action is the thing that happens when you press a key. Often an action will invoke a git command, but not always: for example, navigation actions don't involve git. * **Common structs**: Most structs have a field named `c` which contains a 'common' struct: a struct containing a bag of dependencies that most structs of the same layer require. For example if you want to access a helper from a controller you can do so with `self.c.Helpers.MyHelper`. ## Event loop and threads |