File finder looks and feels a little bulky now. It duplicates file names
and consumes too much space for each file.
This PR makes it more compact:
- File name is trimmed from the path, removing duplication
- Path is placed to the right of the file name, improving space usage
- Path is muted and printed in small size to not distract attention from
the main information (file names)
It makes search results easier to look through, consistent with the
editor tabs, and closer in terms of usage to mature editors.
Release Notes:
- File finder UI enhancement
@@ -490,8 +490,8 @@ async fn test_single_file_worktrees(cx: &mut TestAppContext) {
delegate.labels_for_path_match(&matches[0].0);
assert_eq!(file_name, "the-file");
assert_eq!(file_name_positions, &[0, 1, 4]);
- assert_eq!(full_path, "the-file");- assert_eq!(full_path_positions, &[0, 1, 4]);
+ assert_eq!(full_path, "");
+ assert_eq!(full_path_positions, &[0; 0]);
});
// Since the worktree root is a file, searching for its name followed by a slash does