Visitar URL original
Change list section headers to a slightly more elegant design · jesseduffield/lazygit@31cbabe · GitHub
Skip to content

Commit 31cbabe

Browse files
committed
Change list section headers to a slightly more elegant design
I'm not a skilled UI designer, so I suspect there may be even better options, but it's definitely already better than the raw ASCII "---" we had before. Put the line only at the beginning because it looks bad if the line after the label is misaligned when labels don't have the same width (e.g. "Remote" vs. "Local" in the divergence view).
1 parent 22db808 commit 31cbabe

54 files changed

Lines changed: 195 additions & 195 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎pkg/gui/context/list_renderer.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
)
1212

1313
func formatListSectionHeader(label string) string {
14-
return fmt.Sprintf("--- %s ---", label)
14+
return fmt.Sprintf("─── %s", label)
1515
}
1616

1717
type NonModelItem struct {

‎pkg/integration/tests/branch/rebase_and_drop.go‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,23 +53,23 @@ var RebaseAndDrop = NewIntegrationTest(NewIntegrationTestArgs{
5353
t.Views().Commits().
5454
Focus().
5555
TopLines(
56-
Contains("--- Pending rebase todos ---"),
56+
Contains("─── Pending rebase todos"),
5757
MatchesRegexp(`pick.*to keep`).IsSelected(),
5858
MatchesRegexp(`pick.*to remove`),
5959
MatchesRegexp(`pick.*CONFLICT.*first change`),
60-
Contains("--- Commits ---"),
60+
Contains("─── Commits"),
6161
MatchesRegexp("second-change-branch unrelated change"),
6262
MatchesRegexp("second change"),
6363
MatchesRegexp("original"),
6464
).
6565
SelectNextItem().
6666
Press(keys.Universal.Remove).
6767
TopLines(
68-
Contains("--- Pending rebase todos ---"),
68+
Contains("─── Pending rebase todos"),
6969
MatchesRegexp(`pick.*to keep`),
7070
MatchesRegexp(`drop.*to remove`).IsSelected(),
7171
MatchesRegexp(`pick.*CONFLICT.*first change`),
72-
Contains("--- Commits ---"),
72+
Contains("─── Commits"),
7373
MatchesRegexp("second-change-branch unrelated change"),
7474
MatchesRegexp("second change"),
7575
MatchesRegexp("original"),

‎pkg/integration/tests/branch/show_divergence_from_base_branch.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ var ShowDivergenceFromBaseBranch = NewIntegrationTest(NewIntegrationTestArgs{
3737
IsFocused().
3838
Title(Contains("Commits (feature <-> master)")).
3939
Lines(
40-
DoesNotContainAnyOf("↓", "↑").Contains("--- Remote ---"),
40+
DoesNotContainAnyOf("↓", "↑").Contains("─── Remote"),
4141
Contains("↓").Contains("master 3"),
42-
DoesNotContainAnyOf("↓", "↑").Contains("--- Local ---"),
42+
DoesNotContainAnyOf("↓", "↑").Contains("─── Local"),
4343
Contains("↑").Contains("feature 2"),
4444
Contains("↑").Contains("feature 1"),
4545
)

‎pkg/integration/tests/branch/show_divergence_from_upstream.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ var ShowDivergenceFromUpstream = NewIntegrationTest(NewIntegrationTestArgs{
4444
IsFocused().
4545
Title(Contains("Commits (master <-> origin/master)")).
4646
Lines(
47-
DoesNotContainAnyOf("↓", "↑").Contains("--- Remote ---"),
47+
DoesNotContainAnyOf("↓", "↑").Contains("─── Remote"),
4848
Contains("↓").Contains("three"),
4949
Contains("↓").Contains("two"),
50-
DoesNotContainAnyOf("↓", "↑").Contains("--- Local ---"),
50+
DoesNotContainAnyOf("↓", "↑").Contains("─── Local"),
5151
Contains("↑").Contains("four"),
5252
)
5353
},

‎pkg/integration/tests/branch/show_divergence_from_upstream_no_divergence.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ var ShowDivergenceFromUpstreamNoDivergence = NewIntegrationTest(NewIntegrationTe
2727
IsFocused().
2828
Title(Contains("Commits (master <-> origin/master)")).
2929
Lines(
30-
Contains("--- Remote ---"),
31-
Contains("--- Local ---"),
30+
Contains("─── Remote"),
31+
Contains("─── Local"),
3232
)
3333
},
3434
})

‎pkg/integration/tests/cherry_pick/cherry_pick_during_rebase.go‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ var CherryPickDuringRebase = NewIntegrationTest(NewIntegrationTestArgs{
6060
SelectNextItem().
6161
Press(keys.Universal.Edit).
6262
Lines(
63-
Contains("--- Pending rebase todos ---"),
63+
Contains("─── Pending rebase todos"),
6464
Contains("pick CI two"),
65-
Contains("--- Commits ---"),
65+
Contains("─── Commits"),
6666
Contains(" CI one").IsSelected(),
6767
Contains(" CI base"),
6868
).
@@ -77,9 +77,9 @@ var CherryPickDuringRebase = NewIntegrationTest(NewIntegrationTestArgs{
7777
t.Views().Information().Content(DoesNotContain("commit copied"))
7878
}).
7979
Lines(
80-
Contains("--- Pending rebase todos ---"),
80+
Contains("─── Pending rebase todos"),
8181
Contains("pick CI two"),
82-
Contains("--- Commits ---"),
82+
Contains("─── Commits"),
8383
Contains(" CI three"),
8484
Contains(" CI one").IsSelected(),
8585
Contains(" CI base"),

‎pkg/integration/tests/commit/amend_when_there_are_conflicts_and_amend.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ var AmendWhenThereAreConflictsAndAmend = NewIntegrationTest(NewIntegrationTestAr
2929
t.Views().Commits().
3030
Focus().
3131
Lines(
32-
Contains("--- Pending rebase todos ---"),
32+
Contains("─── Pending rebase todos"),
3333
Contains("pick").Contains("commit three"),
3434
Contains("pick").Contains("<-- CONFLICT --- file1 changed in branch"),
35-
Contains("--- Commits ---"),
35+
Contains("─── Commits"),
3636
Contains("commit two"),
3737
Contains("file1 changed in master"),
3838
Contains("base commit"),

‎pkg/integration/tests/commit/amend_when_there_are_conflicts_and_cancel.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ var AmendWhenThereAreConflictsAndCancel = NewIntegrationTest(NewIntegrationTestA
3333
t.Views().Commits().
3434
Focus().
3535
Lines(
36-
Contains("--- Pending rebase todos ---"),
36+
Contains("─── Pending rebase todos"),
3737
Contains("pick").Contains("commit three"),
3838
Contains("pick").Contains("<-- CONFLICT --- file1 changed in branch"),
39-
Contains("--- Commits ---"),
39+
Contains("─── Commits"),
4040
Contains("commit two"),
4141
Contains("file1 changed in master"),
4242
Contains("base commit"),

‎pkg/integration/tests/commit/revert_with_conflict_multiple_commits.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ var RevertWithConflictMultipleCommits = NewIntegrationTest(NewIntegrationTestArg
4444
Confirm()
4545
}).
4646
Lines(
47-
Contains("--- Pending reverts ---"),
47+
Contains("─── Pending reverts"),
4848
Contains("revert").Contains("CI unrelated change"),
4949
Contains("revert").Contains("CI <-- CONFLICT --- add first line"),
50-
Contains("--- Commits ---"),
50+
Contains("─── Commits"),
5151
Contains("CI ○ add second line"),
5252
Contains("CI ○ add first line"),
5353
Contains("CI ○ unrelated change"),

‎pkg/integration/tests/commit/revert_with_conflict_single_commit.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ var RevertWithConflictSingleCommit = NewIntegrationTest(NewIntegrationTestArgs{
3939
Confirm()
4040
}).
4141
Lines(
42-
Contains("--- Pending reverts ---"),
42+
Contains("─── Pending reverts"),
4343
Contains("revert").Contains("CI <-- CONFLICT --- add first line"),
44-
Contains("--- Commits ---"),
44+
Contains("─── Commits"),
4545
Contains("CI ○ add second line"),
4646
Contains("CI ○ add first line"),
4747
Contains("CI ○ add empty file"),

0 commit comments

Comments
 (0)