Rebrand to Galaxy, major improvements to Bedrock support, still needs some TLC though
This commit is contained in:
@@ -110,14 +110,14 @@ use itertools::Itertools;
|
||||
use pathfinder_geometry::rect::RectF;
|
||||
use pathfinder_geometry::vector::{vec2f, Vector2F};
|
||||
use rand::{distributions::Alphanumeric, Rng};
|
||||
use warp_core::{
|
||||
use galaxy_core::{
|
||||
channel::{Channel, ChannelState},
|
||||
features::FeatureFlag,
|
||||
safe_error, safe_info,
|
||||
sync_queue::SyncQueue,
|
||||
ui::theme::color::internal_colors,
|
||||
};
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
clipboard::ClipboardContent,
|
||||
elements::{
|
||||
new_scrollable::{
|
||||
@@ -139,16 +139,16 @@ use warpui::{
|
||||
units::Pixels,
|
||||
AppContext, Entity, SingletonEntity, TypedActionView, View, ViewContext, ViewHandle, WindowId,
|
||||
};
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
elements::{Clipped, MainAxisSize, Shrinkable},
|
||||
text_layout::{default_compute_baseline_position, ClipConfig},
|
||||
};
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
elements::{Hoverable, SavePosition},
|
||||
platform::Cursor,
|
||||
ui_components::components::UiComponent,
|
||||
};
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
fonts::{Properties, Weight},
|
||||
r#async::SpawnedFutureHandle,
|
||||
ModelHandle, WeakViewHandle,
|
||||
@@ -192,14 +192,14 @@ use crate::code::ShowFindReferencesCard;
|
||||
use crate::code_review::comments::CommentId;
|
||||
use crate::ui_components::render_file_search_row::{render_file_search_row, FileSearchRowOptions};
|
||||
use crate::workspace::view::right_panel::{ReviewDestination, ReviewSubmissionResult};
|
||||
use warp_editor::model::CoreEditorModel;
|
||||
use galaxy_editor::model::CoreEditorModel;
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
use warp_editor::render::model::AutoScrollMode;
|
||||
use warp_editor::{
|
||||
use galaxy_editor::render::model::AutoScrollMode;
|
||||
use galaxy_editor::{
|
||||
content::buffer::{AutoScrollBehavior, InitialBufferState, SelectionOffsets},
|
||||
render::{element::VerticalExpansionBehavior, model::LineCount},
|
||||
};
|
||||
use warp_util::{
|
||||
use galaxy_util::{
|
||||
content_version::ContentVersion,
|
||||
file::{FileLoadError, FileSaveError},
|
||||
path::LineAndColumnArg,
|
||||
@@ -237,7 +237,7 @@ pub fn render_file_navigation_button<F>(
|
||||
on_click: F,
|
||||
) -> Box<dyn Element>
|
||||
where
|
||||
F: Fn(&mut warpui::EventContext<'_>) + 'static,
|
||||
F: Fn(&mut galaxyui::EventContext<'_>) + 'static,
|
||||
{
|
||||
let ui_builder = appearance.ui_builder().clone();
|
||||
let icon_color = appearance
|
||||
@@ -264,9 +264,9 @@ where
|
||||
.build()
|
||||
.finish()
|
||||
})
|
||||
.with_tooltip_position(warpui::ui_components::button::ButtonTooltipPosition::BelowLeft)
|
||||
.with_tooltip_position(galaxyui::ui_components::button::ButtonTooltipPosition::BelowLeft)
|
||||
.build()
|
||||
.on_click(move |ctx: &mut warpui::EventContext<'_>, _, _| {
|
||||
.on_click(move |ctx: &mut galaxyui::EventContext<'_>, _, _| {
|
||||
on_click(ctx);
|
||||
});
|
||||
|
||||
@@ -3953,7 +3953,7 @@ impl CodeReviewView {
|
||||
|
||||
let header_text = "Loading open changes...";
|
||||
let loading_icon = Icon::Loading
|
||||
.to_warpui_icon(warp_core::ui::theme::Fill::Solid(
|
||||
.to_galaxyui_icon(galaxy_core::ui::theme::Fill::Solid(
|
||||
internal_colors::neutral_6(theme),
|
||||
))
|
||||
.finish();
|
||||
@@ -4091,7 +4091,7 @@ impl CodeReviewView {
|
||||
Container::new(
|
||||
ConstrainedBox::new(
|
||||
Icon::AlertTriangle
|
||||
.to_warpui_icon(warp_core::ui::theme::Fill::Solid(
|
||||
.to_galaxyui_icon(galaxy_core::ui::theme::Fill::Solid(
|
||||
internal_colors::neutral_6(theme),
|
||||
))
|
||||
.finish(),
|
||||
@@ -4149,7 +4149,7 @@ impl CodeReviewView {
|
||||
.with_text_and_icon_label(TextAndIcon::new(
|
||||
TextAndIconAlignment::IconFirst,
|
||||
" Retry".to_string(),
|
||||
Icon::Refresh.to_warpui_icon(warp_core::ui::theme::Fill::Solid(
|
||||
Icon::Refresh.to_galaxyui_icon(galaxy_core::ui::theme::Fill::Solid(
|
||||
theme.main_text_color(theme.background()).into(),
|
||||
)),
|
||||
MainAxisSize::Min,
|
||||
@@ -4201,7 +4201,7 @@ impl CodeReviewView {
|
||||
Container::new(
|
||||
ConstrainedBox::new(
|
||||
Icon::FolderClosed
|
||||
.to_warpui_icon(warp_core::ui::theme::Fill::Solid(
|
||||
.to_galaxyui_icon(galaxy_core::ui::theme::Fill::Solid(
|
||||
internal_colors::neutral_6(theme),
|
||||
))
|
||||
.finish(),
|
||||
@@ -4281,7 +4281,7 @@ impl CodeReviewView {
|
||||
Container::new(
|
||||
ConstrainedBox::new(
|
||||
Icon::FolderClosed
|
||||
.to_warpui_icon(warp_core::ui::theme::Fill::Solid(
|
||||
.to_galaxyui_icon(galaxy_core::ui::theme::Fill::Solid(
|
||||
internal_colors::neutral_6(theme),
|
||||
))
|
||||
.finish(),
|
||||
@@ -4385,7 +4385,7 @@ impl CodeReviewView {
|
||||
state: &LoadedState,
|
||||
appearance: &Appearance,
|
||||
is_in_split_pane: bool,
|
||||
app: &warpui::AppContext,
|
||||
app: &galaxyui::AppContext,
|
||||
) -> Box<dyn Element> {
|
||||
let top_section = Flex::column()
|
||||
.with_cross_axis_alignment(CrossAxisAlignment::Start)
|
||||
@@ -4450,7 +4450,7 @@ impl CodeReviewView {
|
||||
Container::new(
|
||||
ConstrainedBox::new(
|
||||
Icon::Diff
|
||||
.to_warpui_icon(warp_core::ui::theme::Fill::Solid(
|
||||
.to_galaxyui_icon(galaxy_core::ui::theme::Fill::Solid(
|
||||
internal_colors::neutral_6(theme),
|
||||
))
|
||||
.finish(),
|
||||
@@ -4777,7 +4777,7 @@ impl CodeReviewView {
|
||||
|
||||
// Add file icon
|
||||
let file_icon = Icon::File
|
||||
.to_warpui_icon(warp_core::ui::theme::Fill::Solid(
|
||||
.to_galaxyui_icon(galaxy_core::ui::theme::Fill::Solid(
|
||||
internal_colors::neutral_6(theme),
|
||||
))
|
||||
.finish();
|
||||
@@ -4801,7 +4801,7 @@ impl CodeReviewView {
|
||||
appearance.ui_font_size(),
|
||||
)
|
||||
.with_color(
|
||||
warp_core::ui::theme::Fill::Solid(internal_colors::neutral_6(theme)).into(),
|
||||
galaxy_core::ui::theme::Fill::Solid(internal_colors::neutral_6(theme)).into(),
|
||||
)
|
||||
.with_line_height_ratio(appearance.line_height_ratio())
|
||||
.with_style(Properties::default().weight(Weight::Semibold))
|
||||
@@ -4825,7 +4825,7 @@ impl CodeReviewView {
|
||||
)
|
||||
.with_style(Properties::default().weight(Weight::Bold))
|
||||
.with_color(
|
||||
warp_core::ui::theme::Fill::Solid(internal_colors::neutral_6(theme)).into(),
|
||||
galaxy_core::ui::theme::Fill::Solid(internal_colors::neutral_6(theme)).into(),
|
||||
)
|
||||
.finish(),
|
||||
)
|
||||
@@ -4880,7 +4880,7 @@ impl CodeReviewView {
|
||||
axis_config,
|
||||
appearance.theme().nonactive_ui_detail().into(),
|
||||
appearance.theme().active_ui_detail().into(),
|
||||
warpui::elements::Fill::None,
|
||||
galaxyui::elements::Fill::None,
|
||||
)
|
||||
.with_vertical_scrollbar(ScrollableAppearance::new(ScrollbarWidth::Auto, false))
|
||||
.with_propagate_mousewheel_if_not_handled(true)
|
||||
@@ -4939,7 +4939,7 @@ impl CodeReviewView {
|
||||
.with_corner_radius(CornerRadius::with_all(Radius::Pixels(4.)));
|
||||
|
||||
if mouse_state.is_hovered() {
|
||||
container = container.with_background(warp_core::ui::theme::Fill::Solid(
|
||||
container = container.with_background(galaxy_core::ui::theme::Fill::Solid(
|
||||
internal_colors::neutral_3(appearance.theme()),
|
||||
))
|
||||
}
|
||||
@@ -4960,7 +4960,7 @@ impl CodeReviewView {
|
||||
},
|
||||
appearance.theme().nonactive_ui_detail().into(),
|
||||
appearance.theme().active_ui_detail().into(),
|
||||
warpui::elements::Fill::None,
|
||||
galaxyui::elements::Fill::None,
|
||||
)
|
||||
.with_vertical_scrollbar(ScrollableAppearance::new(ScrollbarWidth::Auto, false))
|
||||
.finish();
|
||||
@@ -5220,9 +5220,9 @@ impl CodeReviewView {
|
||||
// We effectively make this an absolutely positioned header.
|
||||
OffsetPositioning::offset_from_parent(
|
||||
vec2f(0., scroll_offset_from_top.offset_from_start().as_f32()),
|
||||
warpui::elements::ParentOffsetBounds::ParentByPosition,
|
||||
warpui::elements::ParentAnchor::TopMiddle,
|
||||
warpui::elements::ChildAnchor::TopMiddle,
|
||||
galaxyui::elements::ParentOffsetBounds::ParentByPosition,
|
||||
galaxyui::elements::ParentAnchor::TopMiddle,
|
||||
galaxyui::elements::ChildAnchor::TopMiddle,
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -5491,7 +5491,7 @@ impl CodeReviewView {
|
||||
Text::new("•", appearance.ui_font_family(), appearance.ui_font_size())
|
||||
.with_style(Properties::default().weight(Weight::Bold))
|
||||
.with_color(
|
||||
warp_core::ui::theme::Fill::Solid(internal_colors::neutral_6(
|
||||
galaxy_core::ui::theme::Fill::Solid(internal_colors::neutral_6(
|
||||
appearance.theme(),
|
||||
))
|
||||
.into(),
|
||||
@@ -5519,7 +5519,7 @@ impl CodeReviewView {
|
||||
.with_horizontal_padding(8.)
|
||||
.with_vertical_padding(4.)
|
||||
.with_border(
|
||||
Border::all(1.).with_border_fill(warp_core::ui::theme::Fill::Solid(
|
||||
Border::all(1.).with_border_fill(galaxy_core::ui::theme::Fill::Solid(
|
||||
internal_colors::neutral_4(appearance.theme()),
|
||||
)),
|
||||
)
|
||||
@@ -5816,7 +5816,7 @@ impl CodeReviewView {
|
||||
},
|
||||
appearance.theme().nonactive_ui_detail().into(),
|
||||
appearance.theme().active_ui_detail().into(),
|
||||
warpui::elements::Fill::None,
|
||||
galaxyui::elements::Fill::None,
|
||||
)
|
||||
.with_vertical_scrollbar(ScrollableAppearance::new(ScrollbarWidth::Auto, false))
|
||||
.finish();
|
||||
@@ -6346,7 +6346,7 @@ impl CodeReviewView {
|
||||
fn insert_diff_hunk_as_context(
|
||||
&mut self,
|
||||
file_path: PathBuf,
|
||||
line_range: Range<warp_editor::render::model::LineCount>,
|
||||
line_range: Range<galaxy_editor::render::model::LineCount>,
|
||||
ctx: &mut ViewContext<Self>,
|
||||
) {
|
||||
let Some(repo_path) = self.repo_path() else {
|
||||
@@ -6519,7 +6519,7 @@ impl CodeReviewView {
|
||||
fn extract_diff_hunk_data(
|
||||
&self,
|
||||
file_path: &PathBuf,
|
||||
line_range: &Range<warp_editor::render::model::LineCount>,
|
||||
line_range: &Range<galaxy_editor::render::model::LineCount>,
|
||||
) -> Option<(DiffHunk, u32, u32)> {
|
||||
if let CodeReviewViewState::Loaded(state) = self.state() {
|
||||
// Find the file state that matches the given file path
|
||||
@@ -6648,7 +6648,7 @@ impl CodeReviewView {
|
||||
fn restore_cursor_position(
|
||||
editor: &CodeEditorView,
|
||||
selections: Vec<SelectionOffsets>,
|
||||
ctx: &mut warpui::ViewContext<CodeEditorView>,
|
||||
ctx: &mut galaxyui::ViewContext<CodeEditorView>,
|
||||
) {
|
||||
if let Ok(selections_vec1) = Vec1::try_from_vec(selections) {
|
||||
editor.model.update(ctx, |model, ctx| {
|
||||
|
||||
Reference in New Issue
Block a user