mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-08-08 22:36:49 +02:00
Improve keybinding descriptions
This adds a bunch of tooltips to keybindings and updates some keybinding descriptions (i.e. labels). It's in preparation for displaying more keybindings on-screen (in the bottom right of the screen), and so due in part to laziness it shortens some descriptions so that we don't need to manage both a short and long description (for on-screen vs in-menu). Nonetheless I've added a ShortDescription field for when we do want to have both a short and long description. You'll notice that some keybindings I deemed unworthy of the options view have longer descriptions, because I could get away with it.
This commit is contained in:
@ -23,19 +23,24 @@ var FilterMenu = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Tap(func() {
|
||||
t.ExpectPopup().Menu().
|
||||
Title(Equals("Keybindings")).
|
||||
Filter("Toggle staged").
|
||||
Filter("Ignore").
|
||||
Lines(
|
||||
// menu has filtered down to the one item that matches the filter
|
||||
Contains(`Toggle staged`).IsSelected(),
|
||||
Contains(`Ignore`).IsSelected(),
|
||||
).
|
||||
Confirm()
|
||||
|
||||
t.ExpectPopup().Menu().
|
||||
Title(Equals("Ignore or exclude file")).
|
||||
Select(Contains("Add to .gitignore")).
|
||||
Confirm()
|
||||
})
|
||||
|
||||
t.Views().Files().
|
||||
IsFocused().
|
||||
Lines(
|
||||
// file has been staged
|
||||
Contains(`A `).Contains(`myfile`).IsSelected(),
|
||||
// file has been ignored
|
||||
Contains(`.gitignore`).IsSelected(),
|
||||
).
|
||||
// Upon opening the menu again, the filter should have been reset
|
||||
Press(keys.Universal.OptionMenu).
|
||||
|
@ -17,10 +17,10 @@ var FilterMenuCancelFilterWithEscape = NewIntegrationTest(NewIntegrationTestArgs
|
||||
|
||||
t.ExpectPopup().Menu().
|
||||
Title(Equals("Keybindings")).
|
||||
Filter("Toggle staged").
|
||||
Filter("Ignore").
|
||||
Lines(
|
||||
// menu has filtered down to the one item that matches the filter
|
||||
Contains(`Toggle staged`).IsSelected(),
|
||||
Contains(`Ignore`).IsSelected(),
|
||||
)
|
||||
|
||||
// Escape should cancel the filter, not close the menu
|
||||
|
@ -34,7 +34,7 @@ var SquashFixupsAboveFirstCommit = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Press(keys.Commits.SquashAboveCommits).
|
||||
Tap(func() {
|
||||
t.ExpectPopup().Confirmation().
|
||||
Title(Equals("Squash all 'fixup!' commits above selected commit (autosquash)")).
|
||||
Title(Equals("Apply fixup commits")).
|
||||
Content(Contains("Are you sure you want to squash all fixup! commits above")).
|
||||
Confirm()
|
||||
}).
|
||||
|
Reference in New Issue
Block a user