Rebrand to Galaxy, major improvements to Bedrock support, still needs some TLC though

This commit is contained in:
Ryan Ward
2026-05-07 11:29:34 -05:00
parent f4e2475c60
commit a41cbd8cc7
2433 changed files with 14208 additions and 9409 deletions
+4 -4
View File
@@ -17,9 +17,9 @@ use crate::view_components::action_button::{
use pathfinder_color::ColorU;
use pathfinder_geometry::vector::Vector2F;
use std::cell::RefCell;
use warp_core::ui::{appearance::Appearance, theme::Fill};
use warp_editor::render::element::VerticalExpansionBehavior;
use warpui::{
use galaxy_core::ui::{appearance::Appearance, theme::Fill};
use galaxy_editor::render::element::VerticalExpansionBehavior;
use galaxyui::{
elements::{
Border, ChildView, Clipped, ConstrainedBox, Container, CornerRadius, CrossAxisAlignment,
Flex, MainAxisAlignment, MainAxisSize, ParentElement, Radius, Shrinkable, Text,
@@ -326,7 +326,7 @@ impl CommentEditor {
let theme = appearance.theme();
let sub_text_color = theme.sub_text_color(Fill::Solid(background)).into_solid();
let icon = Icon::Github
.to_warpui_icon(Fill::Solid(sub_text_color))
.to_galaxyui_icon(Fill::Solid(sub_text_color))
.finish();
let label = Text::new(
+2 -2
View File
@@ -1,6 +1,6 @@
use std::sync::Arc;
use warpui::{
use galaxyui::{
platform::WindowStyle, presenter::ChildView, App, Element, Entity, TypedActionView, View,
ViewHandle, WindowId,
};
@@ -45,7 +45,7 @@ impl View for TestView {
"CommentEditorTestView"
}
fn render(&self, _app: &warpui::AppContext) -> Box<dyn warpui::Element> {
fn render(&self, _app: &galaxyui::AppContext) -> Box<dyn galaxyui::Element> {
ChildView::new(&self.editor).finish()
}
}
+1 -1
View File
@@ -1,5 +1,5 @@
use chrono::{DateTime, Local};
use warpui::{Entity, ModelContext};
use galaxyui::{Entity, ModelContext};
use crate::code::editor::line::EditorLineLocation;
use crate::code_review::comments::{
+4 -4
View File
@@ -9,13 +9,13 @@ use pathfinder_color::ColorU;
use rangemap::RangeMap;
use similar::{ChangeTag, DiffOp, TextDiff};
use string_offset::CharOffset;
use warp_core::ui::theme::Fill;
use warp_editor::{
use galaxy_core::ui::theme::Fill;
use galaxy_editor::{
content::{edit::TemporaryBlock, version::BufferVersion},
multiline::{AnyMultilineString, MultilineStr, MultilineString, LF},
render::model::{Decoration, LineCount, LineDecoration},
};
use warpui::{Entity, ModelContext};
use galaxyui::{Entity, ModelContext};
use super::super::DiffResult;
@@ -23,7 +23,7 @@ use crate::{
appearance::Appearance,
code::editor::{line::EditorLineLocation, line_iterator::LineIterator},
};
use warp_core::ui::theme::AnsiColorIdentifier;
use galaxy_core::ui::theme::AnsiColorIdentifier;
const OVERLAY_ALPHA: u8 = 56;
const INLINE_OVERLAY_ALPHA: u8 = 71;
+9 -9
View File
@@ -2,7 +2,7 @@ use std::collections::HashMap;
use rangemap::RangeMap;
use unindent::Unindent as _;
use warp_editor::multiline::{MultilineStr, MultilineString};
use galaxy_editor::multiline::{MultilineStr, MultilineString};
use crate::code::editor::diff::ChangeType;
@@ -10,7 +10,7 @@ use super::DiffModel;
#[test]
fn test_diff_generation() {
use warpui::App;
use galaxyui::App;
App::test((), |_| async move {
let (change_mapping, deletion_mapping) = DiffModel::compute_diff_internal(
MultilineStr::try_new("Hello World\nThis is the second line.\nThis is the third.")
@@ -76,7 +76,7 @@ fn test_diff_generation() {
#[test]
fn test_reverse_action() {
use warpui::App;
use galaxyui::App;
App::test((), |_| async move {
let mut diff_model = DiffModel::new();
diff_model.set_base(MultilineString::apply(
@@ -109,7 +109,7 @@ fn test_reverse_action() {
#[test]
fn test_reverse_action_replaced_newlines() {
use warpui::App;
use galaxyui::App;
App::test((), |_| async move {
let mut diff_model = DiffModel::new();
let base_text = r"
@@ -192,7 +192,7 @@ fn test_reverse_action_replaced_newlines() {
#[test]
fn test_reverse_action_replaced_text() {
use warpui::App;
use galaxyui::App;
App::test((), |_| async move {
let mut diff_model = DiffModel::new();
let base_text = r"
@@ -269,7 +269,7 @@ fn test_reverse_action_replaced_text() {
#[test]
fn test_reverse_action_deleted_lines() {
use warpui::App;
use galaxyui::App;
App::test((), |_| async move {
let mut diff_model = DiffModel::new();
let base_text = r"
@@ -353,7 +353,7 @@ fn test_reverse_action_deleted_lines() {
#[test]
fn test_diff_count_before_line() {
use warpui::App;
use galaxyui::App;
App::test((), |_| async move {
let mut diff_model = DiffModel::new();
diff_model.set_base(
@@ -373,7 +373,7 @@ fn test_diff_count_before_line() {
#[test]
fn test_unified_diff() {
use warpui::App;
use galaxyui::App;
App::test((), |_| async move {
let diff = DiffModel::retrieve_unified_diff_internal(
MultilineStr::try_new("Hello World\nThis is the second line.\nThis is the third.")
@@ -395,7 +395,7 @@ fn test_unified_diff() {
/// to produce duplicate deletion and insertion hunks for what is logically a replacement.
#[test]
fn test_coalesce_replacements() {
use warpui::App;
use galaxyui::App;
App::test((), |_| async move {
let mut diff_model = DiffModel::new();
let base_text = r"
+8 -8
View File
@@ -15,11 +15,11 @@ use pathfinder_geometry::{
rect::RectF,
vector::{vec2f, Vector2F},
};
use warp_core::ui::{
use galaxy_core::ui::{
appearance::Appearance,
theme::{color::internal_colors, Fill},
};
use warp_editor::{
use galaxy_editor::{
editor::EditorView,
render::{
element::{
@@ -31,7 +31,7 @@ use warp_editor::{
},
},
};
use warpui::{
use galaxyui::{
elements::{
new_scrollable::{NewScrollableElement, ScrollableAxis},
Align, Axis, Border, ChildAnchor, ConstrainedBox, Container, CornerRadius, Empty, F32Ext,
@@ -56,8 +56,8 @@ use crate::{
},
view_components::action_button::{ActionButtonTheme, SecondaryTheme},
};
use warp_core::features::FeatureFlag;
use warpui::elements::{Hoverable, MouseStateHandle};
use galaxy_core::features::FeatureFlag;
use galaxyui::elements::{Hoverable, MouseStateHandle};
pub const GUTTER_WIDTH: f32 = 94.;
const VERTICAL_DIFF_HUNK_INDICATOR_WIDTH: f32 = 3.;
@@ -915,7 +915,7 @@ impl<V: EditorView> EditorWrapper<V> {
};
let icon = ConstrainedBox::new(
warpui::elements::Icon::new(
galaxyui::elements::Icon::new(
expansion_type.icon().into(),
line_number_config.text_color,
)
@@ -971,7 +971,7 @@ impl<V: EditorView> EditorWrapper<V> {
let container = Container::new(
ConstrainedBox::new(
warpui::elements::Icon::new(gutter_button.icon().into(), icon_color).finish(),
galaxyui::elements::Icon::new(gutter_button.icon().into(), icon_color).finish(),
)
.with_width(icon_size)
.with_height(icon_size)
@@ -1011,7 +1011,7 @@ impl<V: EditorView> EditorWrapper<V> {
});
if enabled {
button = button.with_cursor(warpui::platform::Cursor::PointingHand);
button = button.with_cursor(galaxyui::platform::Cursor::PointingHand);
if let Some(on_click_action) = on_click_action {
let action = on_click_action.clone();
+7 -7
View File
@@ -1,13 +1,13 @@
use crate::view_components::action_button::{
ActionButtonTheme, DisabledSecondaryTheme, SecondaryTheme,
};
use warp_core::ui::appearance::Appearance;
use warp_core::ui::color::contrast::MinimumAllowedContrast;
use warp_core::ui::color::ContrastingColor;
use warp_core::ui::theme::color::internal_colors;
use warp_core::ui::theme::Fill;
use warp_core::ui::Icon;
use warpui::elements::MouseState;
use galaxy_core::ui::appearance::Appearance;
use galaxy_core::ui::color::contrast::MinimumAllowedContrast;
use galaxy_core::ui::color::ContrastingColor;
use galaxy_core::ui::theme::color::internal_colors;
use galaxy_core::ui::theme::Fill;
use galaxy_core::ui::Icon;
use galaxyui::elements::MouseState;
/// A button rendered within the gutter of the editor.
pub(super) trait GutterButton {
+8 -8
View File
@@ -6,18 +6,18 @@ use std::sync::Arc;
use pathfinder_geometry::vector::{vec2f, Vector2F};
use serde_yaml::Mapping;
use uuid::Uuid;
use warp_editor::content::markdown::MarkdownStyle;
use warp_editor::editor::EmbeddedItemModel;
use warp_editor::render::element::{RenderContext, RenderableBlock};
use warp_editor::render::layout::TextLayout;
use galaxy_editor::content::markdown::MarkdownStyle;
use galaxy_editor::editor::EmbeddedItemModel;
use galaxy_editor::render::element::{RenderContext, RenderableBlock};
use galaxy_editor::render::layout::TextLayout;
use warp_editor::render::model::{
use galaxy_editor::render::model::{
viewport::ViewportItem, BlockSpacing, EmbeddedItem, EmbeddedItemHTMLRepresentation,
EmbeddedItemRichFormat, LaidOutEmbeddedItem, RenderState,
};
use warpui::event::DispatchedEvent;
use warpui::units::Pixels;
use warpui::{AppContext, EntityId, EventContext, LayoutContext, ViewHandle, WindowId};
use galaxyui::event::DispatchedEvent;
use galaxyui::units::Pixels;
use galaxyui::{AppContext, EntityId, EventContext, LayoutContext, ViewHandle, WindowId};
use crate::code::editor::comment_editor::CommentEditor;
use crate::code_review::comments::CommentId;
@@ -4,8 +4,8 @@ use super::{
};
use crate::code_review::comments::CommentId;
use serde_yaml::{Mapping, Value};
use warp_editor::content::markdown::MarkdownStyle;
use warpui::{EntityId, WindowId};
use galaxy_editor::content::markdown::MarkdownStyle;
use galaxyui::{EntityId, WindowId};
#[test]
fn test_comment_embedded_item_conversion_valid_input() {
+16 -16
View File
@@ -14,19 +14,19 @@ use crate::view_components::action_button::{ActionButton, DisabledSecondaryTheme
use crate::view_components::find::FindDirection;
use crate::{features::FeatureFlag, settings::AppEditorSettings};
use pathfinder_color::ColorU;
use warp_editor::editor::NavigationKey;
use warp_editor::search::{SearchEvent, Searcher};
use warpui::elements::MainAxisAlignment;
use warpui::elements::{ChildAnchor, OffsetPositioning, Radius, SavePosition, Shrinkable};
use warpui::keymap::EditableBinding;
use warpui::ui_components::components::UiComponent;
pub use warpui::{
use galaxy_editor::editor::NavigationKey;
use galaxy_editor::search::{SearchEvent, Searcher};
use galaxyui::elements::MainAxisAlignment;
use galaxyui::elements::{ChildAnchor, OffsetPositioning, Radius, SavePosition, Shrinkable};
use galaxyui::keymap::EditableBinding;
use galaxyui::ui_components::components::UiComponent;
pub use galaxyui::{
accessibility::{AccessibilityContent, WarpA11yRole},
elements::{ParentElement as _, Stack},
geometry::vector::vec2f,
AppContext,
};
use warpui::{
use galaxyui::{
elements::{
Align, Border, Clipped, ConstrainedBox, Container, CornerRadius, CrossAxisAlignment,
DropShadow, Element, Flex, Hoverable, MouseStateHandle, ParentAnchor, ParentOffsetBounds,
@@ -34,8 +34,8 @@ use warpui::{
},
Entity, SingletonEntity, TypedActionView, View,
};
use warpui::{presenter::ChildView, ViewContext, ViewHandle};
use warpui::{FocusContext, ModelHandle};
use galaxyui::{presenter::ChildView, ViewContext, ViewHandle};
use galaxyui::{FocusContext, ModelHandle};
pub const FIND_BAR_WIDTH: f32 = 500.;
const ICON_PADDING: f32 = 4.;
@@ -104,7 +104,7 @@ pub enum FindAction {
}
pub fn init(app: &mut AppContext) {
use warpui::keymap::macros::*;
use galaxyui::keymap::macros::*;
app.register_editable_bindings([
EditableBinding::new(
"find:find_next_occurrence",
@@ -490,7 +490,7 @@ impl CodeEditorFind {
};
let icon = Container::new(
ConstrainedBox::new(
icon.to_warpui_icon(appearance.theme().active_ui_text_color())
icon.to_galaxyui_icon(appearance.theme().active_ui_text_color())
.finish(),
)
.with_height(size)
@@ -554,7 +554,7 @@ impl CodeEditorFind {
appearance.theme().active_ui_text_color()
};
Container::new(
ConstrainedBox::new(match_icon.to_warpui_icon(icon_color).finish())
ConstrainedBox::new(match_icon.to_galaxyui_icon(icon_color).finish())
.with_height(height)
.with_width(height)
.finish(),
@@ -581,7 +581,7 @@ impl CodeEditorFind {
appearance.theme().active_ui_text_color()
};
Container::new(
ConstrainedBox::new(Icon::Search.to_warpui_icon(icon_color).finish())
ConstrainedBox::new(Icon::Search.to_galaxyui_icon(icon_color).finish())
.with_height(height)
.with_width(height)
.finish(),
@@ -608,7 +608,7 @@ impl CodeEditorFind {
};
Container::new(
ConstrainedBox::new(
icon.to_warpui_icon(appearance.theme().active_ui_text_color())
icon.to_galaxyui_icon(appearance.theme().active_ui_text_color())
.finish(),
)
.with_height(height)
@@ -964,7 +964,7 @@ impl View for CodeEditorFind {
}
}
fn on_blur(&mut self, _blur_ctx: &warpui::BlurContext, ctx: &mut ViewContext<Self>) {
fn on_blur(&mut self, _blur_ctx: &galaxyui::BlurContext, ctx: &mut ViewContext<Self>) {
// Check if the currently focused view is one of our child components
let focused_view_id = ctx.focused_view_id(ctx.window_id());
let is_focus_within_find_bar = [
+1 -1
View File
@@ -6,7 +6,7 @@ use crate::editor::{
EditorView, Event as EditorEvent, InteractionState, PropagateAndNoOpNavigationKeys,
SingleLineEditorOptions, TextOptions,
};
use warpui::{
use galaxyui::{
elements::{
Align, Border, ChildView, ConstrainedBox, Container, CornerRadius, DropShadow, Flex,
ParentElement, Radius, Text,
+1 -1
View File
@@ -1,5 +1,5 @@
use std::ops::Range;
use warp_editor::render::model::{LineCount, RenderLineLocation};
use galaxy_editor::render::model::{LineCount, RenderLineLocation};
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum EditorLineLocation {
+31 -31
View File
@@ -11,18 +11,18 @@ use std::path::Path;
use std::rc::Rc;
use std::sync::Arc;
use std::{cmp, mem};
use warp_core::platform::SessionPlatform;
use warp_core::send_telemetry_from_ctx;
use warp_core::ui::theme::Fill;
use warp_editor::content::anchor::Anchor;
use warp_editor::content::edit::EditDelta;
use warp_editor::content::find::{SearchConfig, SearchResults};
use warp_editor::content::selection_model::BufferSelectionModel;
use warp_editor::content::version::BufferVersion;
use warp_editor::multiline::{AnyMultilineString, MultilineString, LF};
use warp_editor::render::model::{AutoScrollMode, LineCount, StyleUpdateAction};
use warp_editor::selection::TextDirection;
use warpui::units::{IntoPixels, Pixels};
use galaxy_core::platform::SessionPlatform;
use galaxy_core::send_telemetry_from_ctx;
use galaxy_core::ui::theme::Fill;
use galaxy_editor::content::anchor::Anchor;
use galaxy_editor::content::edit::EditDelta;
use galaxy_editor::content::find::{SearchConfig, SearchResults};
use galaxy_editor::content::selection_model::BufferSelectionModel;
use galaxy_editor::content::version::BufferVersion;
use galaxy_editor::multiline::{AnyMultilineString, MultilineString, LF};
use galaxy_editor::render::model::{AutoScrollMode, LineCount, StyleUpdateAction};
use galaxy_editor::selection::TextDirection;
use galaxyui::units::{IntoPixels, Pixels};
use crate::util::link_detection::get_word_range_at_offset;
use crate::{
@@ -47,9 +47,9 @@ use vim::{
vim_a_quote, vim_a_word, vim_find_char_on_line, vim_find_matching_bracket, vim_inner_block,
vim_inner_paragraph, vim_inner_quote, vim_inner_word, vim_word_iterator_from_offset,
};
use warp_core::semantic_selection::SemanticSelection;
use warp_editor::content::buffer::{ShouldAutoscroll, VimInsertPoint};
use warp_editor::{
use galaxy_core::semantic_selection::SemanticSelection;
use galaxy_editor::content::buffer::{ShouldAutoscroll, VimInsertPoint};
use galaxy_editor::{
content::{
buffer::{
AutoScrollBehavior, Buffer, BufferEditAction, BufferEvent, BufferSelectAction,
@@ -67,12 +67,12 @@ use warp_editor::{
},
selection::{SelectionMode, SelectionModel, TextUnit},
};
use warpui::elements::{
use galaxyui::elements::{
AnchorPair, OffsetPositioning, OffsetType, PositionedElementOffsetBounds, PositioningAxis,
XAxisAnchor, YAxisAnchor,
};
use warpui::text::{point::Point, TextBuffer};
use warpui::{AppContext, Entity, ModelContext, ModelHandle, SingletonEntity};
use galaxyui::text::{point::Point, TextBuffer};
use galaxyui::{AppContext, Entity, ModelContext, ModelHandle, SingletonEntity};
use super::super::DiffResult;
use super::comments::{EditorCommentsModel, PendingComment, PendingCommentEvent};
@@ -558,7 +558,7 @@ impl CodeEditorModel {
// Set the following line ranges to be hidden in the editor.
pub fn set_hidden_lines(
&mut self,
ranges: RangeSet<warp_editor::content::text::LineCount>,
ranges: RangeSet<galaxy_editor::content::text::LineCount>,
ctx: &mut ModelContext<Self>,
) {
self.hidden_lines.update(ctx, |model, ctx| {
@@ -573,7 +573,7 @@ impl CodeEditorModel {
// Set the following hidden line ranges to be visible. This is no-op if the lines are already visible.
pub fn set_visible_line_range(
&mut self,
range: Range<warp_editor::content::text::LineCount>,
range: Range<galaxy_editor::content::text::LineCount>,
ctx: &mut ModelContext<Self>,
) {
let version = self.content().as_ref(ctx).buffer_version();
@@ -1293,7 +1293,7 @@ impl CodeEditorModel {
let line_count = self.line_count(ctx);
// Calculate the visible line ranges (with context)
let mut visible_ranges: RangeSet<warp_editor::content::text::LineCount> =
let mut visible_ranges: RangeSet<galaxy_editor::content::text::LineCount> =
RangeSet::new();
// Add ranges for diffs
@@ -1311,14 +1311,14 @@ impl CodeEditorModel {
}
// Calculate hidden ranges as the complement of visible ranges
let all_lines: Range<warp_editor::content::text::LineCount> =
warp_editor::content::text::LineCount::from(0)
..warp_editor::content::text::LineCount::from(line_count);
let all_lines: Range<galaxy_editor::content::text::LineCount> =
galaxy_editor::content::text::LineCount::from(0)
..galaxy_editor::content::text::LineCount::from(line_count);
// Find gaps in the visible ranges
let hidden_ranges = visible_ranges
.gaps(&all_lines)
.collect::<RangeSet<warp_editor::content::text::LineCount>>();
.collect::<RangeSet<galaxy_editor::content::text::LineCount>>();
self.set_hidden_lines(hidden_ranges, ctx);
}
@@ -2085,10 +2085,10 @@ impl CodeEditorModel {
self.update_content(
|mut content, ctx| {
content.apply_edit(
warp_editor::content::buffer::BufferEditAction::InsertForEachSelection {
galaxy_editor::content::buffer::BufferEditAction::InsertForEachSelection {
texts: &texts,
},
warp_editor::content::buffer::EditOrigin::UserTyped,
galaxy_editor::content::buffer::EditOrigin::UserTyped,
selection_model,
ctx,
);
@@ -2119,10 +2119,10 @@ impl CodeEditorModel {
self.update_content(
|mut content, ctx| {
content.apply_edit(
warp_editor::content::buffer::BufferEditAction::InsertAtCharOffsetRanges {
galaxy_editor::content::buffer::BufferEditAction::InsertAtCharOffsetRanges {
edits: &edits,
},
warp_editor::content::buffer::EditOrigin::UserTyped,
galaxy_editor::content::buffer::EditOrigin::UserTyped,
selection_model,
ctx,
);
@@ -3721,10 +3721,10 @@ impl CoreEditorModel for CodeEditorModel {
}
// TODO(kevin): Add validation to the content model.
fn validate(&self, _ctx: &impl warpui::ModelAsRef) {}
fn validate(&self, _ctx: &impl galaxyui::ModelAsRef) {}
// Since this is a plain text editor, there is no text styles.
fn active_text_style(&self) -> warp_editor::content::text::TextStyles {
fn active_text_style(&self) -> galaxy_editor::content::text::TextStyles {
Default::default()
}
+4 -4
View File
@@ -1,10 +1,10 @@
use futures::channel::oneshot;
use std::path::Path;
use vec1::vec1;
use warp_editor::content::buffer::{InitialBufferState, SelectionOffsets};
use warp_editor::multiline::MultilineString;
use warp_util::content_version::ContentVersion;
use warpui::App;
use galaxy_editor::content::buffer::{InitialBufferState, SelectionOffsets};
use galaxy_editor::multiline::MultilineString;
use galaxy_util::content_version::ContentVersion;
use galaxyui::App;
use crate::{
code::editor::line::EditorLineLocation, code::editor::view::code_text_styles,
+3 -3
View File
@@ -1,9 +1,9 @@
#![cfg_attr(target_family = "wasm", allow(dead_code, unused_imports))]
// Adding this file level gate as some of the code around editability is not used in WASM yet.
use warp_core::ui::{appearance::Appearance, theme::Fill};
use warp_editor::model::CoreEditorModel;
use warpui::{
use galaxy_core::ui::{appearance::Appearance, theme::Fill};
use galaxy_editor::model::CoreEditorModel;
use galaxyui::{
elements::{
Align, Border, ConstrainedBox, Container, CrossAxisAlignment, Flex, MouseStateHandle,
ParentElement, Shrinkable,
+2 -2
View File
@@ -1,5 +1,5 @@
use warp_editor::content::version::BufferVersion;
use warp_util::path::LineAndColumnArg;
use galaxy_editor::content::version::BufferVersion;
use galaxy_util::path::LineAndColumnArg;
#[derive(Debug, Clone, Copy)]
pub enum ScrollWheelBehavior {
+21 -21
View File
@@ -40,8 +40,8 @@ use std::{collections::HashSet, path::Path};
use string_offset::CharOffset;
use vec1::{vec1, Vec1};
use vim::vim::{Direction, InsertPosition, VimMode, VimModel, VimState, VimSubscriber};
use warp_core::platform::SessionPlatform;
use warp_editor::{
use galaxy_core::platform::SessionPlatform;
use galaxy_editor::{
content::{
buffer::{
Buffer, BufferEditAction, EditOrigin, InitialBufferState, ToBufferCharOffset as _,
@@ -64,8 +64,8 @@ use warp_editor::{
},
search::{SearchEvent, Searcher, MATCH_FILL, SELECTED_MATCH_FILL},
};
use warp_util::content_version::ContentVersion;
use warpui::{
use galaxy_util::content_version::ContentVersion;
use galaxyui::{
elements::{
new_scrollable::{
AxisConfiguration, DualAxisConfig, NewScrollableElement, ScrollableAppearance,
@@ -403,11 +403,11 @@ impl CodeEditorView {
// from truncating space for the code editor. We should not render it as an overlay
// for small code editors.
horizontal_scrollbar_appearance: ScrollableAppearance::new(
warpui::elements::ScrollbarWidth::Auto,
galaxyui::elements::ScrollbarWidth::Auto,
false,
),
vertical_scrollbar_appearance: ScrollableAppearance::new(
warpui::elements::ScrollbarWidth::Auto,
galaxyui::elements::ScrollbarWidth::Auto,
false,
),
gutter_hover_target: GutterHoverTarget::GutterElement,
@@ -877,21 +877,21 @@ impl CodeEditorView {
let hidden_section_end = line_range.end.as_usize();
let lines_to_unhide = match expansion_type {
ExpansionType::Both => {
warp_editor::content::text::LineCount::from(hidden_section_start)
..warp_editor::content::text::LineCount::from(hidden_section_end)
galaxy_editor::content::text::LineCount::from(hidden_section_start)
..galaxy_editor::content::text::LineCount::from(hidden_section_end)
}
ExpansionType::ExpandDown => {
let end = hidden_section_end
.min(hidden_section_start + CODE_EDITOR_HIDDEN_SECTION_EXPANSION_LINES);
warp_editor::content::text::LineCount::from(hidden_section_start)
..warp_editor::content::text::LineCount::from(end)
galaxy_editor::content::text::LineCount::from(hidden_section_start)
..galaxy_editor::content::text::LineCount::from(end)
}
ExpansionType::ExpandUp => {
let start = hidden_section_start.max(
hidden_section_end.saturating_sub(CODE_EDITOR_HIDDEN_SECTION_EXPANSION_LINES),
);
warp_editor::content::text::LineCount::from(start)
..warp_editor::content::text::LineCount::from(hidden_section_end)
galaxy_editor::content::text::LineCount::from(start)
..galaxy_editor::content::text::LineCount::from(hidden_section_end)
}
};
self.model.update(ctx, |model, ctx| {
@@ -997,12 +997,12 @@ impl CodeEditorView {
if let Some(results) = self.searcher.as_ref(ctx).results() {
if !results.matches.is_empty() {
// Convert all match ranges to selection offsets
let selection_offsets: Vec<warp_editor::content::buffer::SelectionOffsets> =
let selection_offsets: Vec<galaxy_editor::content::buffer::SelectionOffsets> =
results
.matches
.iter()
.map(|match_result| {
warp_editor::content::buffer::SelectionOffsets {
galaxy_editor::content::buffer::SelectionOffsets {
head: match_result.end,
tail: match_result.start,
}
@@ -1014,8 +1014,8 @@ impl CodeEditorView {
self.model.update(ctx, |model, ctx| {
model.selection().update(ctx, |selection_model, ctx| {
selection_model.update_selection(
warp_editor::content::buffer::BufferSelectAction::SetSelectionOffsets { selections },
warp_editor::content::buffer::AutoScrollBehavior::Selection,
galaxy_editor::content::buffer::BufferSelectAction::SetSelectionOffsets { selections },
galaxy_editor::content::buffer::AutoScrollBehavior::Selection,
ctx,
);
});
@@ -1041,7 +1041,7 @@ impl CodeEditorView {
self.model.update(ctx, |model, ctx| {
model.update_content( |mut content_model, ctx| {
content_model.apply_edit(
warp_editor::content::buffer::BufferEditAction::InsertAtCharOffsetRanges { edits: &edits },
galaxy_editor::content::buffer::BufferEditAction::InsertAtCharOffsetRanges { edits: &edits },
EditOrigin::UserInitiated,
selection_model,
ctx,
@@ -1093,7 +1093,7 @@ impl CodeEditorView {
self.model.update(ctx, |model, ctx| {
model.update_content(|mut content_model, ctx| {
content_model.apply_edit(
warp_editor::content::buffer::BufferEditAction::InsertAtCharOffsetRanges { edits: &edits },
galaxy_editor::content::buffer::BufferEditAction::InsertAtCharOffsetRanges { edits: &edits },
EditOrigin::UserInitiated,
selection_model,
ctx,
@@ -2008,8 +2008,8 @@ impl CodeEditorView {
self.model.update(ctx, |model, ctx| {
model.selection_model().update(ctx, |selection, ctx| {
selection.update_selection(
warp_editor::content::buffer::BufferSelectAction::MoveRight,
warp_editor::content::buffer::AutoScrollBehavior::Selection,
galaxy_editor::content::buffer::BufferSelectAction::MoveRight,
galaxy_editor::content::buffer::AutoScrollBehavior::Selection,
ctx,
);
});
@@ -2341,7 +2341,7 @@ impl View for CodeEditorView {
}
}
fn keymap_context(&self, app: &AppContext) -> warpui::keymap::Context {
fn keymap_context(&self, app: &AppContext) -> galaxyui::keymap::Context {
let mut context = Self::default_keymap_context();
if self.interaction_state(app) != InteractionState::Editable {
+5 -5
View File
@@ -18,7 +18,7 @@ use std::collections::{HashMap, HashSet};
use std::fmt::Debug;
use std::ops::Range;
use string_offset::CharOffset;
use warp_editor::{
use galaxy_editor::{
content::version::BufferVersion,
editor::{EmbeddedItemModel, RunnableCommandModel, TextDecoration},
model::{CoreEditorModel, PlainTextEditorModel},
@@ -28,8 +28,8 @@ use warp_editor::{
},
selection::{TextDirection, TextUnit},
};
use warp_util::user_input::UserInput;
use warpui::{
use galaxy_util::user_input::UserInput;
use galaxyui::{
actions::StandardAction,
elements::Axis,
event::ModifiersState,
@@ -48,7 +48,7 @@ lazy_static! {
}
pub fn init(app: &mut AppContext) {
use warpui::keymap::macros::*;
use galaxyui::keymap::macros::*;
let text_entry = id!("CodeEditorView") & !id!("IMEOpen");
// We use this to disable some keybindings that would conflict with the Agent Mode embedded editor.
@@ -1109,7 +1109,7 @@ impl TypedActionView for CodeEditorView {
}
}
impl warp_editor::editor::EditorView for CodeEditorView {
impl galaxy_editor::editor::EditorView for CodeEditorView {
type RichTextAction = CodeEditorViewAction;
fn runnable_command_at<'a>(
+4 -4
View File
@@ -1,7 +1,7 @@
use std::sync::Arc;
use warp_core::ui::appearance::Appearance;
use warp_editor::render::element::VerticalExpansionBehavior;
use warpui::{
use galaxy_core::ui::appearance::Appearance;
use galaxy_editor::render::element::VerticalExpansionBehavior;
use galaxyui::{
elements::{new_scrollable::ScrollableAppearance, ScrollbarWidth},
platform::WindowStyle,
App, TypedActionView, ViewHandle, WindowId,
@@ -21,7 +21,7 @@ use crate::{
};
use super::{CodeEditorRenderOptions, CodeEditorView, CodeEditorViewAction};
use warp_util::user_input::UserInput;
use galaxy_util::user_input::UserInput;
fn initialize_editor(app: &mut App) -> (WindowId, ViewHandle<CodeEditorView>) {
initialize_settings_for_tests(app);
+3 -3
View File
@@ -12,7 +12,7 @@ use vim::vim::{
InsertPosition, LineMotion, ModeTransition, MotionType, TextObjectType, VimHandler, VimMode,
VimMotion, VimOperand, VimOperator, VimTextObject, WordMotion,
};
use warp_editor::{
use galaxy_editor::{
content::buffer::{
AutoScrollBehavior, BufferEditAction, EditOrigin, SelectionOffsets,
ToBufferCharOffset as _, VimInsertPoint,
@@ -20,7 +20,7 @@ use warp_editor::{
model::{CoreEditorModel, PlainTextEditorModel},
selection::{TextDirection, TextUnit},
};
use warpui::{text::point::Point, SingletonEntity, ViewContext};
use galaxyui::{text::point::Point, SingletonEntity, ViewContext};
impl VimHandler for CodeEditorView {
fn insert_char(&mut self, c: char, ctx: &mut ViewContext<Self>) {
@@ -154,7 +154,7 @@ impl VimHandler for CodeEditorView {
) {
// Selection logic is almost the same for all operators, so capture that in a closure first.
let selection_change =
|model: &mut CodeEditorModel, ctx: &mut warpui::ModelContext<CodeEditorModel>| {
|model: &mut CodeEditorModel, ctx: &mut galaxyui::ModelContext<CodeEditorModel>| {
match operand {
VimOperand::Motion {
motion,
@@ -16,15 +16,15 @@ use crate::{
use std::sync::Arc;
use unindent::Unindent;
use vim::vim::{MotionType, VimMode};
use warp_core::{features::FeatureFlag, settings::Setting, ui::appearance::Appearance};
use warp_editor::model::CoreEditorModel;
use warp_editor::{
use galaxy_core::{features::FeatureFlag, settings::Setting, ui::appearance::Appearance};
use galaxy_editor::model::CoreEditorModel;
use galaxy_editor::{
content::buffer::{InitialBufferState, ToBufferCharOffset, ToBufferPoint},
render::element::VerticalExpansionBehavior,
};
use warp_util::user_input::UserInput;
use warpui::text::point::Point;
use warpui::{
use galaxy_util::user_input::UserInput;
use galaxyui::text::point::Point;
use galaxyui::{
keymap::Keystroke, platform::WindowStyle, App, SingletonEntity, TypedActionView, UpdateModel,
ViewHandle,
};