fix: change git tui navigation keys

Ayman Bagabas created

A (about) -> R (readme)
R (refs) -> B (branches)
L (log) -> C (commits)
T (tree) -> F (files)

Change summary

internal/tui/bubbles/git/about/bubble.go |  2 +-
internal/tui/bubbles/git/bubble.go       | 18 +++++++++---------
internal/tui/bubbles/git/log/bubble.go   |  2 +-
internal/tui/bubbles/git/refs/bubble.go  |  2 +-
internal/tui/bubbles/git/tree/bubble.go  |  2 +-
5 files changed, 13 insertions(+), 13 deletions(-)

Detailed changes

internal/tui/bubbles/git/about/bubble.go 🔗

@@ -52,7 +52,7 @@ func (b *Bubble) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
 		b.readmeViewport.Viewport.SetContent(md)
 	case tea.KeyMsg:
 		switch msg.String() {
-		case "A":
+		case "R":
 			b.GotoTop()
 		}
 	}

internal/tui/bubbles/git/bubble.go 🔗

@@ -65,13 +65,13 @@ func (b *Bubble) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
 	case tea.KeyMsg:
 		if b.repo.Name() != "config" {
 			switch msg.String() {
-			case "r", "R":
+			case "R":
 				b.state = aboutPage
-			case "b", "B":
+			case "B":
 				b.state = refsPage
-			case "c", "C":
+			case "C":
 				b.state = logPage
-			case "f", "F":
+			case "F":
 				b.state = treePage
 			}
 		}
@@ -98,12 +98,12 @@ func (b *Bubble) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
 
 func (b *Bubble) Help() []types.HelpEntry {
 	h := []types.HelpEntry{}
-	h = append(h, b.boxes[b.state].(types.HelpableBubble).Help()...)
+	h = append(h, b.boxes[b.state].(types.BubbleHelper).Help()...)
 	if b.repo.Name() != "config" {
-		h = append(h, types.HelpEntry{"r", "readme"})
-		h = append(h, types.HelpEntry{"f", "files"})
-		h = append(h, types.HelpEntry{"c", "commits"})
-		h = append(h, types.HelpEntry{"b", "branches/tags"})
+		h = append(h, types.HelpEntry{"R", "readme"})
+		h = append(h, types.HelpEntry{"F", "files"})
+		h = append(h, types.HelpEntry{"C", "commits"})
+		h = append(h, types.HelpEntry{"B", "branches"})
 	}
 	return h
 }

internal/tui/bubbles/git/log/bubble.go 🔗

@@ -167,7 +167,7 @@ func (b *Bubble) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
 
 	case tea.KeyMsg:
 		switch msg.String() {
-		case "L":
+		case "C":
 			b.state = logState
 			b.list.Select(0)
 			cmds = append(cmds, b.updateItems())

internal/tui/bubbles/git/refs/bubble.go 🔗

@@ -155,7 +155,7 @@ func (b *Bubble) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
 
 	case tea.KeyMsg:
 		switch msg.String() {
-		case "R":
+		case "B":
 			cmds = append(cmds, b.updateItems())
 		case "enter", "right", "l":
 			if b.list.Index() >= 0 {

internal/tui/bubbles/git/tree/bubble.go 🔗

@@ -220,7 +220,7 @@ func (b *Bubble) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
 
 	case tea.KeyMsg:
 		switch msg.String() {
-		case "T":
+		case "F":
 			return b, b.reset()
 		case "enter", "right", "l":
 			if b.state == treeState {