git_ui: Branch picker improvements (#26287)
- Truncate branch names based on the width of the picker - Use a footer for "Create branch" instead of a picker entry Still to do: - [x] Select the footer button when no matches and run the create logic on `enter` - [x] Make it possible to quickly select the footer button from the keyboard when there are matches Release Notes: - Git Beta: Removed limitation that made it impossible to create a branch from the branch picker when it too closely resembled an existing branch name
This commit is contained in:
parent
ed52e759d7
commit
013a646799
13 changed files with 184 additions and 120 deletions
|
@ -1361,7 +1361,7 @@ async fn test_remote_git_branches(cx: &mut TestAppContext, server_cx: &mut TestA
|
|||
|
||||
assert_eq!(&remote_branches, &branches_set);
|
||||
|
||||
cx.update(|cx| repository.read(cx).change_branch(new_branch.to_string()))
|
||||
cx.update(|cx| repository.read(cx).change_branch(new_branch))
|
||||
.await
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
|
@ -1383,23 +1383,15 @@ async fn test_remote_git_branches(cx: &mut TestAppContext, server_cx: &mut TestA
|
|||
assert_eq!(server_branch.name, branches[2]);
|
||||
|
||||
// Also try creating a new branch
|
||||
cx.update(|cx| {
|
||||
repository
|
||||
.read(cx)
|
||||
.create_branch("totally-new-branch".to_string())
|
||||
})
|
||||
.await
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
cx.update(|cx| repository.read(cx).create_branch("totally-new-branch"))
|
||||
.await
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
|
||||
cx.update(|cx| {
|
||||
repository
|
||||
.read(cx)
|
||||
.change_branch("totally-new-branch".to_string())
|
||||
})
|
||||
.await
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
cx.update(|cx| repository.read(cx).change_branch("totally-new-branch"))
|
||||
.await
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
|
||||
cx.run_until_parked();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue