Wrapping up bedrock implementation
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
use editing::sort_entries_for_file_tree;
|
||||
use galaxy_util::path::LineAndColumnArg;
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
use itertools::Itertools;
|
||||
use pathfinder_geometry::rect::RectF;
|
||||
use pathfinder_geometry::vector::Vector2F;
|
||||
@@ -13,10 +15,7 @@ use std::collections::{HashMap, HashSet};
|
||||
use std::ops::Range;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::sync::Arc;
|
||||
use galaxy_util::path::LineAndColumnArg;
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
|
||||
use repo_metadata::repositories::DetectedRepositories;
|
||||
use galaxy_core::send_telemetry_from_ctx;
|
||||
use galaxyui::elements::{
|
||||
AcceptedByDropTarget, Align, Clipped, ConstrainedBox, Container, Dismiss, Draggable,
|
||||
@@ -40,6 +39,7 @@ use galaxyui::{
|
||||
ViewHandle,
|
||||
};
|
||||
use galaxyui::{BlurContext, ModelHandle};
|
||||
use repo_metadata::repositories::DetectedRepositories;
|
||||
|
||||
use crate::code::active_file::{ActiveFileEvent, ActiveFileModel};
|
||||
use crate::coding_panel_enablement_state::CodingPanelEnablementState;
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
#[path = "editing_tests.rs"]
|
||||
mod tests;
|
||||
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
use galaxyui::{elements::MouseStateHandle, ViewContext};
|
||||
use repo_metadata::file_tree_store::FileTreeEntryState;
|
||||
use repo_metadata::{FileMetadata, FileTreeEntry};
|
||||
use std::cmp::Ordering;
|
||||
use std::sync::Arc;
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
use galaxyui::{elements::MouseStateHandle, ViewContext};
|
||||
|
||||
use super::{FileTreeIdentifier, FileTreeItem, FileTreeView};
|
||||
use crate::{
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
use repo_metadata::file_tree_store::{FileTreeDirectoryEntryState, FileTreeEntryState};
|
||||
use repo_metadata::{FileMetadata, FileTreeEntry};
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
|
||||
use super::sort_entries_for_file_tree;
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
use galaxyui::{platform::WindowStyle, App, ModelHandle};
|
||||
use repo_metadata::entry::{DirectoryEntry, Entry, FileMetadata};
|
||||
use repo_metadata::file_tree_store::FileTreeState;
|
||||
use repo_metadata::local_model::IndexedRepoState;
|
||||
@@ -7,8 +9,6 @@ use repo_metadata::repositories::DetectedRepositories;
|
||||
use repo_metadata::watcher::DirectoryWatcher;
|
||||
use repo_metadata::RepoMetadataModel;
|
||||
use virtual_fs::{Stub, VirtualFS};
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
use galaxyui::{platform::WindowStyle, App, ModelHandle};
|
||||
|
||||
use crate::auth::AuthStateProvider;
|
||||
use crate::server::server_api::{team::MockTeamClient, workspace::MockWorkspaceClient};
|
||||
@@ -151,8 +151,10 @@ fn repo_transition_unregisters_lazy_loaded_path() {
|
||||
.unwrap()
|
||||
));
|
||||
let displayed_std =
|
||||
galaxy_util::standardized_path::StandardizedPath::try_from_local(&displayed_root)
|
||||
.unwrap();
|
||||
galaxy_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&displayed_root,
|
||||
)
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
view.root_directories
|
||||
.get(&displayed_std)
|
||||
@@ -180,8 +182,10 @@ fn repo_transition_unregisters_lazy_loaded_path() {
|
||||
|
||||
file_tree_view.read(&app, |view, _ctx| {
|
||||
let displayed_std =
|
||||
galaxy_util::standardized_path::StandardizedPath::try_from_local(&displayed_root)
|
||||
.unwrap();
|
||||
galaxy_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&displayed_root,
|
||||
)
|
||||
.unwrap();
|
||||
let repo_std =
|
||||
galaxy_util::standardized_path::StandardizedPath::try_from_local(&repo_root)
|
||||
.unwrap();
|
||||
@@ -259,8 +263,10 @@ fn repo_backed_unloaded_directory_loads_through_model() {
|
||||
assert!(!view
|
||||
.root_directories
|
||||
.get(
|
||||
&galaxy_util::standardized_path::StandardizedPath::try_from_local(&repo_root)
|
||||
.unwrap()
|
||||
&galaxy_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&repo_root
|
||||
)
|
||||
.unwrap()
|
||||
)
|
||||
.is_some_and(|root_dir| root_dir.entry.contains(
|
||||
&galaxy_util::standardized_path::StandardizedPath::try_from_local(
|
||||
@@ -284,8 +290,10 @@ fn repo_backed_unloaded_directory_loads_through_model() {
|
||||
assert!(view
|
||||
.root_directories
|
||||
.get(
|
||||
&galaxy_util::standardized_path::StandardizedPath::try_from_local(&repo_root)
|
||||
.unwrap()
|
||||
&galaxy_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&repo_root
|
||||
)
|
||||
.unwrap()
|
||||
)
|
||||
.is_some_and(|root_dir| root_dir.entry.contains(
|
||||
&galaxy_util::standardized_path::StandardizedPath::try_from_local(
|
||||
@@ -309,8 +317,10 @@ fn repo_backed_unloaded_directory_loads_through_model() {
|
||||
assert!(view
|
||||
.root_directories
|
||||
.get(
|
||||
&galaxy_util::standardized_path::StandardizedPath::try_from_local(&repo_root)
|
||||
.unwrap()
|
||||
&galaxy_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&repo_root
|
||||
)
|
||||
.unwrap()
|
||||
)
|
||||
.is_some_and(|root_dir| root_dir.entry.contains(
|
||||
&galaxy_util::standardized_path::StandardizedPath::try_from_local(
|
||||
|
||||
Reference in New Issue
Block a user