Wrapping up bedrock implementation
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
//! Shared context menu implementation for notebooks.
|
||||
|
||||
use pathfinder_geometry::vector::Vector2F;
|
||||
use galaxy_core::context_flag::ContextFlag;
|
||||
use galaxyui::{
|
||||
elements::{ChildAnchor, OffsetPositioning, ParentAnchor, ParentOffsetBounds, Stack},
|
||||
@@ -8,6 +7,7 @@ use galaxyui::{
|
||||
presenter::ChildView,
|
||||
Action, Element, EventContext, TypedActionView, View, ViewContext, ViewHandle,
|
||||
};
|
||||
use pathfinder_geometry::vector::Vector2F;
|
||||
|
||||
use crate::{
|
||||
editor::EditorView,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use string_offset::ByteOffset;
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
use galaxy_editor::model::CoreEditorModel;
|
||||
use galaxyui::{platform::WindowStyle, App};
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use string_offset::ByteOffset;
|
||||
|
||||
use crate::search::files::model::FileSearchModel;
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
use galaxy_editor::content::text::BufferBlockItem;
|
||||
use galaxyui::{
|
||||
elements::{
|
||||
@@ -15,6 +14,7 @@ use galaxyui::{
|
||||
},
|
||||
AppContext, Element, SingletonEntity, ViewContext, ViewHandle,
|
||||
};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{
|
||||
appearance::Appearance,
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
use std::{collections::HashMap, ops::Range, sync::Arc};
|
||||
|
||||
use itertools::Itertools;
|
||||
use markdown_parser::html_parser::WARP_EMBED_ATTRIBUTE_NAME;
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::vector::{vec2f, Vector2F};
|
||||
use serde_yaml::Mapping;
|
||||
use string_offset::ByteOffset;
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
use galaxy_editor::{
|
||||
content::{markdown::MarkdownStyle, text::TextStylesWithMetadata},
|
||||
@@ -32,6 +26,12 @@ use galaxyui::{
|
||||
units::{IntoPixels, Pixels},
|
||||
AppContext, Element, LayoutContext, SizeConstraint,
|
||||
};
|
||||
use itertools::Itertools;
|
||||
use markdown_parser::html_parser::WARP_EMBED_ATTRIBUTE_NAME;
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::vector::{vec2f, Vector2F};
|
||||
use serde_yaml::Mapping;
|
||||
use string_offset::ByteOffset;
|
||||
|
||||
use crate::{
|
||||
cloud_object::{model::persistence::CloudModel, CloudObject},
|
||||
@@ -616,7 +616,9 @@ impl RenderableBlock for RenderableEmbeddedWorkflow {
|
||||
);
|
||||
}
|
||||
|
||||
ctx.paint.scene.start_layer(galaxyui::ClipBounds::ActiveLayer);
|
||||
ctx.paint
|
||||
.scene
|
||||
.start_layer(galaxyui::ClipBounds::ActiveLayer);
|
||||
|
||||
// Position the block footer right below the content area, flush with its right-hand edge.
|
||||
// This gives the footer some padding relative to the visible area with a background.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
use std::{borrow::Cow, mem, ops::Range, sync::Arc};
|
||||
|
||||
use string_offset::{ByteOffset, CharOffset};
|
||||
use galaxy_completer::signatures::CommandRegistry;
|
||||
use galaxy_editor::{
|
||||
content::{anchor::Anchor, buffer::Buffer, selection_model::BufferSelectionModel},
|
||||
@@ -16,6 +15,7 @@ use galaxyui::{
|
||||
ui_components::{button::ButtonVariant, components::UiComponent},
|
||||
AppContext, Element, Entity, ModelAsRef, ModelContext, ModelHandle, SingletonEntity,
|
||||
};
|
||||
use string_offset::{ByteOffset, CharOffset};
|
||||
|
||||
use crate::{
|
||||
appearance::Appearance,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
use std::{fmt::Write, time::Duration};
|
||||
|
||||
use async_channel::Sender;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use galaxy_editor::{
|
||||
render::model::{AutoScrollMode, Decoration},
|
||||
search::{SearchEvent, Searcher},
|
||||
@@ -23,6 +22,7 @@ use galaxyui::{
|
||||
AppContext, BlurContext, Element, Entity, FocusContext, ModelHandle, SingletonEntity,
|
||||
TypedActionView, View, ViewContext, ViewHandle,
|
||||
};
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
|
||||
use crate::{
|
||||
appearance::Appearance,
|
||||
@@ -364,10 +364,14 @@ impl View for FindBar {
|
||||
let has_matches = searcher.match_count() > 0;
|
||||
|
||||
let find_icon = Container::new(
|
||||
ConstrainedBox::new(Icon::Find.to_galaxyui_icon(theme.active_ui_detail()).finish())
|
||||
.with_height(editor_height)
|
||||
.with_width(editor_height)
|
||||
.finish(),
|
||||
ConstrainedBox::new(
|
||||
Icon::Find
|
||||
.to_galaxyui_icon(theme.active_ui_detail())
|
||||
.finish(),
|
||||
)
|
||||
.with_height(editor_height)
|
||||
.with_width(editor_height)
|
||||
.finish(),
|
||||
)
|
||||
.with_padding_left(12.)
|
||||
.with_padding_top(16.)
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
use galaxy_editor::{editor::NavigationKey, model::RichTextEditorModel, render::model::RenderState};
|
||||
use galaxy_editor::{
|
||||
editor::NavigationKey, model::RichTextEditorModel, render::model::RenderState,
|
||||
};
|
||||
use galaxyui::{
|
||||
elements::{
|
||||
AnchorPair, Container, Flex, MouseStateHandle, OffsetPositioning, OffsetType,
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use markdown_parser::markdown_parser::CODE_BLOCK_DEFAULT_MARKDOWN_LANG;
|
||||
use pathfinder_color::ColorU;
|
||||
use galaxy_core::ui::{builder::CHECK_SVG_PATH, theme::color::internal_colors};
|
||||
use galaxy_editor::{
|
||||
content::text::{
|
||||
@@ -15,7 +13,11 @@ use galaxy_editor::{
|
||||
},
|
||||
};
|
||||
use galaxy_util::user_input::UserInput;
|
||||
use galaxyui::{elements::Border, fonts::FamilyId, ui_components::checkbox::HOVER_BACKGROUND_COLOR};
|
||||
use galaxyui::{
|
||||
elements::Border, fonts::FamilyId, ui_components::checkbox::HOVER_BACKGROUND_COLOR,
|
||||
};
|
||||
use markdown_parser::markdown_parser::CODE_BLOCK_DEFAULT_MARKDOWN_LANG;
|
||||
use pathfinder_color::ColorU;
|
||||
|
||||
use crate::{
|
||||
appearance::Appearance,
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
use base64::{prelude::BASE64_STANDARD, Engine as _};
|
||||
use std::{any::Any, borrow::Cow, collections::HashMap, ops::Range, time::Duration};
|
||||
|
||||
use galaxyui::{
|
||||
accessibility::{AccessibilityContent, ActionAccessibilityContent, WarpA11yRole},
|
||||
clipboard::ClipboardContent,
|
||||
AppContext, Entity, ModelAsRef, ModelContext, ModelHandle, SingletonEntity, WindowId,
|
||||
};
|
||||
use itertools::Itertools;
|
||||
use lazy_static::lazy_static;
|
||||
use markdown_parser::FormattedText;
|
||||
@@ -9,11 +14,6 @@ use num_traits::SaturatingSub;
|
||||
use regex::Regex;
|
||||
use url::Url;
|
||||
use vec1::{vec1, Vec1};
|
||||
use galaxyui::{
|
||||
accessibility::{AccessibilityContent, ActionAccessibilityContent, WarpA11yRole},
|
||||
clipboard::ClipboardContent,
|
||||
AppContext, Entity, ModelAsRef, ModelContext, ModelHandle, SingletonEntity, WindowId,
|
||||
};
|
||||
|
||||
use crate::{
|
||||
cloud_object::model::persistence::{CloudModel, CloudModelEvent},
|
||||
@@ -25,7 +25,6 @@ use crate::{
|
||||
notebooks::editor::interaction_state_model::InteractionStateModelEvent,
|
||||
terminal::ShellLaunchData,
|
||||
};
|
||||
use string_offset::CharOffset;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxy_core::semantic_selection::SemanticSelection;
|
||||
use galaxy_editor::{
|
||||
@@ -50,6 +49,7 @@ use galaxy_editor::{
|
||||
selection::{SelectionMode, SelectionModel, TextDirection, TextUnit},
|
||||
};
|
||||
use galaxyui::elements::ListIndentLevel;
|
||||
use string_offset::CharOffset;
|
||||
|
||||
use super::{
|
||||
super::telemetry::SelectionMode as TelemetrySelectionMode, embedding_model::NotebookEmbed,
|
||||
|
||||
@@ -29,14 +29,6 @@ use crate::UserWorkspaces;
|
||||
use crate::{GlobalResourceHandles, GlobalResourceHandlesProvider};
|
||||
use chrono::Utc;
|
||||
use futures::prelude::*;
|
||||
use itertools::Itertools;
|
||||
use markdown_parser::markdown_parser::RUNNABLE_BLOCK_MARKDOWN_LANG;
|
||||
use markdown_parser::{
|
||||
parse_markdown, CodeBlockText, FormattedText, FormattedTextFragment, FormattedTextLine,
|
||||
};
|
||||
use pathfinder_geometry::vector::Vector2F;
|
||||
use string_offset::CharOffset;
|
||||
use vec1::vec1;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxy_editor::content::buffer::{AutoScrollBehavior, BufferSelectAction, SelectionOffsets};
|
||||
use galaxy_editor::content::text::{BlockType, BufferBlockStyle, CodeBlockType, TextStyles};
|
||||
@@ -52,6 +44,14 @@ use galaxyui::r#async::{block_on, FutureId};
|
||||
use galaxyui::text::word_boundaries::WordBoundariesPolicy;
|
||||
use galaxyui::{r#async::Timer, App, Entity, ModelHandle, SingletonEntity, TypedActionView};
|
||||
use galaxyui::{AddSingletonModel, AppContext, Element, View, ViewHandle};
|
||||
use itertools::Itertools;
|
||||
use markdown_parser::markdown_parser::RUNNABLE_BLOCK_MARKDOWN_LANG;
|
||||
use markdown_parser::{
|
||||
parse_markdown, CodeBlockText, FormattedText, FormattedTextFragment, FormattedTextLine,
|
||||
};
|
||||
use pathfinder_geometry::vector::Vector2F;
|
||||
use string_offset::CharOffset;
|
||||
use vec1::vec1;
|
||||
|
||||
/// Container for a [`RichTextEditorView`] in unit tests.
|
||||
struct TestView {
|
||||
|
||||
@@ -1,16 +1,6 @@
|
||||
use std::{borrow::Cow, mem, ops::Range, sync::Arc};
|
||||
|
||||
use async_channel::Sender;
|
||||
use itertools::Itertools;
|
||||
use lazy_static::lazy_static;
|
||||
use pathfinder_color::ColorU;
|
||||
use string_offset::{ByteOffset, CharOffset};
|
||||
use syntect::{
|
||||
easy::HighlightLines,
|
||||
highlighting::{self, Theme, ThemeSet},
|
||||
parsing::SyntaxSet,
|
||||
util::LinesWithEndings,
|
||||
};
|
||||
use galaxy_completer::signatures::CommandRegistry;
|
||||
use galaxy_editor::{
|
||||
content::{
|
||||
@@ -24,8 +14,17 @@ use galaxy_editor::{
|
||||
},
|
||||
editor::RunnableCommandModel,
|
||||
};
|
||||
use itertools::Itertools;
|
||||
use lazy_static::lazy_static;
|
||||
use pathfinder_color::ColorU;
|
||||
use string_offset::{ByteOffset, CharOffset};
|
||||
use syntect::{
|
||||
easy::HighlightLines,
|
||||
highlighting::{self, Theme, ThemeSet},
|
||||
parsing::SyntaxSet,
|
||||
util::LinesWithEndings,
|
||||
};
|
||||
|
||||
use markdown_parser::markdown_parser::CODE_BLOCK_DEFAULT_MARKDOWN_LANG;
|
||||
use galaxy_util::user_input::UserInput;
|
||||
use galaxyui::{elements::Align, r#async::SpawnedFutureHandle, AppContext};
|
||||
use galaxyui::{
|
||||
@@ -38,6 +37,7 @@ use galaxyui::{
|
||||
Element, Entity, ModelAsRef, ModelContext, ModelHandle, SingletonEntity, ViewHandle,
|
||||
WeakModelHandle, WindowId,
|
||||
};
|
||||
use markdown_parser::markdown_parser::CODE_BLOCK_DEFAULT_MARKDOWN_LANG;
|
||||
|
||||
use crate::{
|
||||
appearance::Appearance,
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
//! Implementation for the omnibar - a floating menu for editor interactions
|
||||
//! like formatting and changing block types.
|
||||
|
||||
use itertools::Itertools;
|
||||
use pathfinder_geometry::{rect::RectF, vector::Vector2F};
|
||||
use galaxy_editor::{
|
||||
content::text::{
|
||||
BlockType as ContentBlockType, BufferBlockStyle, BufferTextStyle, TextStyles,
|
||||
@@ -23,6 +21,8 @@ use galaxyui::{
|
||||
AppContext, Element, Entity, ModelHandle, SingletonEntity, SizeConstraint, TypedActionView,
|
||||
View, ViewContext, ViewHandle,
|
||||
};
|
||||
use itertools::Itertools;
|
||||
use pathfinder_geometry::{rect::RectF, vector::Vector2F};
|
||||
|
||||
use crate::{
|
||||
appearance::Appearance,
|
||||
|
||||
@@ -5,9 +5,6 @@ use std::{
|
||||
sync::atomic::{AtomicBool, Ordering},
|
||||
};
|
||||
|
||||
use markdown_parser::{parse_html, parse_markdown, FormattedText};
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use string_offset::CharOffset;
|
||||
use galaxy_editor::{
|
||||
content::{
|
||||
anchor::Anchor,
|
||||
@@ -25,6 +22,9 @@ use galaxy_editor::{
|
||||
},
|
||||
selection::{TextDirection, TextUnit},
|
||||
};
|
||||
use markdown_parser::{parse_html, parse_markdown, FormattedText};
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use string_offset::CharOffset;
|
||||
|
||||
use galaxy_util::{path::LineAndColumnArg, user_input::UserInput};
|
||||
use galaxyui::{
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
use crate::features::FeatureFlag;
|
||||
use async_channel::TryRecvError;
|
||||
use std::sync::Arc;
|
||||
use string_offset::CharOffset;
|
||||
use galaxy_editor::render::{
|
||||
element::RichTextAction,
|
||||
model::{HitTestBlockType, Location, RenderEvent},
|
||||
};
|
||||
use galaxy_util::user_input::UserInput;
|
||||
use std::sync::Arc;
|
||||
use string_offset::CharOffset;
|
||||
|
||||
use galaxyui::event::ModifiersState;
|
||||
use galaxyui::r#async::block_on;
|
||||
use galaxyui::windowing::WindowManager;
|
||||
use galaxyui::{platform::WindowStyle, presenter::ChildView, App, Element, Entity, View, ViewHandle};
|
||||
use galaxyui::{
|
||||
platform::WindowStyle, presenter::ChildView, App, Element, Entity, View, ViewHandle,
|
||||
};
|
||||
use galaxyui::{SingletonEntity, TypedActionView, WindowId};
|
||||
|
||||
use super::{EditorViewAction, RichTextEditorConfig, RichTextEditorView};
|
||||
|
||||
@@ -4,7 +4,6 @@ use std::{
|
||||
sync::Arc,
|
||||
};
|
||||
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use galaxy_util::path::user_friendly_path;
|
||||
#[cfg(feature = "local_fs")]
|
||||
use galaxyui::clipboard::ClipboardContent;
|
||||
@@ -24,6 +23,7 @@ use galaxyui::{
|
||||
AppContext, Element, Entity, ModelHandle, SingletonEntity, TypedActionView, View, ViewContext,
|
||||
ViewHandle,
|
||||
};
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
|
||||
#[cfg(feature = "local_fs")]
|
||||
use crate::notebooks::post_process_notebook;
|
||||
|
||||
@@ -2,13 +2,13 @@ use std::{path::Path, sync::Arc};
|
||||
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
|
||||
#[cfg(feature = "local_fs")]
|
||||
use repo_metadata::RepoMetadataModel;
|
||||
use repo_metadata::{repositories::DetectedRepositories, watcher::DirectoryWatcher};
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
#[cfg(feature = "local_fs")]
|
||||
use galaxy_files::FileModel;
|
||||
use galaxyui::{platform::WindowStyle, App, SingletonEntity, View};
|
||||
#[cfg(feature = "local_fs")]
|
||||
use repo_metadata::RepoMetadataModel;
|
||||
use repo_metadata::{repositories::DetectedRepositories, watcher::DirectoryWatcher};
|
||||
|
||||
use crate::server::server_api::team::MockTeamClient;
|
||||
use crate::server::server_api::workspace::MockWorkspaceClient;
|
||||
|
||||
@@ -9,12 +9,12 @@ use std::{
|
||||
};
|
||||
|
||||
use futures_util::future::Either;
|
||||
use url::Url;
|
||||
use galaxy_util::path::{CleanPathResult, LineAndColumnArg};
|
||||
use galaxyui::{
|
||||
r#async::SpawnedFutureHandle, AppContext, Entity, ModelContext, ModelHandle, SingletonEntity,
|
||||
WindowId,
|
||||
};
|
||||
use url::Url;
|
||||
|
||||
#[cfg(feature = "local_fs")]
|
||||
use crate::util::file::external_editor::EditorSettings;
|
||||
|
||||
@@ -4,12 +4,12 @@ use std::{
|
||||
sync::Arc,
|
||||
};
|
||||
|
||||
use galaxy_util::path::LineAndColumnArg;
|
||||
use galaxyui::{App, ModelHandle, WindowId};
|
||||
use lazy_static::lazy_static;
|
||||
use parking_lot::Mutex;
|
||||
use tempfile::tempdir;
|
||||
use url::Url;
|
||||
use galaxy_util::path::LineAndColumnArg;
|
||||
use galaxyui::{App, ModelHandle, WindowId};
|
||||
|
||||
use crate::{
|
||||
notebooks::{file::is_markdown_file, link::LinkEvent},
|
||||
|
||||
@@ -2,11 +2,11 @@ use std::collections::{hash_map::Entry, HashMap};
|
||||
use std::sync::Arc;
|
||||
|
||||
use futures_util::stream::AbortHandle;
|
||||
use markdown_parser::markdown_parser::parse_markdown_to_raw_text;
|
||||
use galaxyui::{
|
||||
r#async::SpawnedFutureHandle, Entity, EntityId, ModelContext, SingletonEntity, WeakViewHandle,
|
||||
WindowId,
|
||||
};
|
||||
use markdown_parser::markdown_parser::parse_markdown_to_raw_text;
|
||||
|
||||
use crate::{
|
||||
cloud_object::{
|
||||
|
||||
@@ -13,9 +13,9 @@ use std::sync::Arc;
|
||||
use async_trait::async_trait;
|
||||
|
||||
use anyhow::Result;
|
||||
use galaxyui::AppContext;
|
||||
use itertools::Itertools;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use galaxyui::AppContext;
|
||||
|
||||
use crate::server::cloud_objects::update_manager::InitiatedBy;
|
||||
use crate::{
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
use anyhow::Context;
|
||||
use async_channel::Sender;
|
||||
use futures_util::stream::AbortHandle;
|
||||
use galaxy_core::context_flag::ContextFlag;
|
||||
use lazy_static::lazy_static;
|
||||
use regex::Regex;
|
||||
use settings::Setting as _;
|
||||
use std::{sync::Arc, time::Duration};
|
||||
use url::Url;
|
||||
use galaxy_core::context_flag::ContextFlag;
|
||||
|
||||
#[cfg(target_family = "wasm")]
|
||||
use crate::uri::web_intent_parser::open_url_on_desktop;
|
||||
|
||||
@@ -2,7 +2,6 @@ use std::sync::Arc;
|
||||
|
||||
use chrono::{Duration, Utc};
|
||||
use futures_util::future::BoxFuture;
|
||||
use itertools::Itertools;
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
use galaxy_editor::editor::EditorView;
|
||||
use galaxyui::{
|
||||
@@ -10,6 +9,7 @@ use galaxyui::{
|
||||
AddSingletonModel, App, AppContext, Element, Entity, SingletonEntity, TypedActionView, View,
|
||||
ViewHandle, WindowId,
|
||||
};
|
||||
use itertools::Itertools;
|
||||
|
||||
use crate::{
|
||||
auth::{
|
||||
|
||||
Reference in New Issue
Block a user