Merge branch 'main' into fix-dock-focus-issues

This commit is contained in:
Kay Simmons
2022-10-12 15:18:28 -07:00
committed by GitHub
77 changed files with 1093 additions and 461 deletions
+6 -2
View File
@@ -12,7 +12,9 @@ test-support = [
"call/test-support",
"client/test-support",
"project/test-support",
"settings/test-support"
"settings/test-support",
"gpui/test-support",
"fs/test-support"
]
[dependencies]
@@ -21,6 +23,7 @@ client = { path = "../client" }
collections = { path = "../collections" }
context_menu = { path = "../context_menu" }
drag_and_drop = { path = "../drag_and_drop" }
fs = { path = "../fs" }
gpui = { path = "../gpui" }
language = { path = "../language" }
menu = { path = "../menu" }
@@ -42,4 +45,5 @@ call = { path = "../call", features = ["test-support"] }
client = { path = "../client", features = ["test-support"] }
gpui = { path = "../gpui", features = ["test-support"] }
project = { path = "../project", features = ["test-support"] }
settings = { path = "../settings", features = ["test-support"] }
settings = { path = "../settings", features = ["test-support"] }
fs = { path = "../fs", features = ["test-support"] }
+9 -3
View File
@@ -16,6 +16,7 @@ use client::{proto, Client, PeerId, TypedEnvelope, UserStore};
use collections::{hash_map, HashMap, HashSet};
use dock::{DefaultItemFactory, Dock, ToggleDockButton};
use drag_and_drop::DragAndDrop;
use fs::{self, Fs};
use futures::{channel::oneshot, FutureExt, StreamExt};
use gpui::{
actions,
@@ -31,7 +32,7 @@ use log::{error, warn};
pub use pane::*;
pub use pane_group::*;
use postage::prelude::Stream;
use project::{fs, Fs, Project, ProjectEntryId, ProjectPath, ProjectStore, Worktree, WorktreeId};
use project::{Project, ProjectEntryId, ProjectPath, ProjectStore, Worktree, WorktreeId};
use searchable::SearchableItemHandle;
use serde::Deserialize;
use settings::{Autosave, DockAnchor, Settings};
@@ -929,7 +930,7 @@ impl AppState {
let settings = Settings::test(cx);
cx.set_global(settings);
let fs = project::FakeFs::new(cx.background().clone());
let fs = fs::FakeFs::new(cx.background().clone());
let languages = Arc::new(LanguageRegistry::test());
let http_client = client::test::FakeHttpClient::with_404_response();
let client = Client::new(http_client.clone(), cx);
@@ -1171,6 +1172,10 @@ impl Workspace {
cx.notify();
}
pub fn titlebar_item(&self) -> Option<AnyViewHandle> {
self.titlebar_item.clone()
}
/// Call the given callback with a workspace whose project is local.
///
/// If the given workspace has a local project, then it will be passed
@@ -2811,8 +2816,9 @@ mod tests {
use crate::sidebar::SidebarItem;
use super::*;
use fs::FakeFs;
use gpui::{executor::Deterministic, ModelHandle, TestAppContext, ViewContext};
use project::{FakeFs, Project, ProjectEntryId};
use project::{Project, ProjectEntryId};
use serde_json::json;
pub fn default_item_factory(