Rebrand to Galaxy, major improvements to Bedrock support, still needs some TLC though
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use warp_util::path::user_friendly_path;
|
||||
use warpui::{
|
||||
use galaxy_util::path::user_friendly_path;
|
||||
use galaxyui::{
|
||||
elements::{
|
||||
Border, ConstrainedBox, Container, CornerRadius, CrossAxisAlignment, Flex, MainAxisSize,
|
||||
MouseStateHandle, ParentElement, Radius, Text,
|
||||
@@ -95,9 +95,9 @@ pub(crate) fn render_action_sidecar(
|
||||
let primary_text_color = theme.main_text_color(theme.surface_2());
|
||||
let button_style = UiComponentStyles {
|
||||
font_size: Some(12.),
|
||||
font_weight: Some(warpui::fonts::Weight::Bold),
|
||||
font_weight: Some(galaxyui::fonts::Weight::Bold),
|
||||
font_color: Some(primary_text_color.into()),
|
||||
padding: Some(warpui::ui_components::components::Coords {
|
||||
padding: Some(galaxyui::ui_components::components::Coords {
|
||||
top: 4.,
|
||||
bottom: 4.,
|
||||
left: 8.,
|
||||
@@ -156,7 +156,7 @@ pub(crate) fn render_action_sidecar(
|
||||
.with_style(button_style)
|
||||
.build()
|
||||
.with_cursor(Cursor::PointingHand)
|
||||
.on_click(move |ctx: &mut warpui::elements::EventContext, _, _| {
|
||||
.on_click(move |ctx: &mut galaxyui::elements::EventContext, _, _| {
|
||||
ctx.dispatch_typed_action(make_default_action.clone())
|
||||
})
|
||||
.finish()
|
||||
@@ -178,7 +178,7 @@ pub(crate) fn render_action_sidecar(
|
||||
.with_style(button_style)
|
||||
.build()
|
||||
.with_cursor(Cursor::PointingHand)
|
||||
.on_click(move |ctx: &mut warpui::elements::EventContext, _, _| {
|
||||
.on_click(move |ctx: &mut galaxyui::elements::EventContext, _, _| {
|
||||
ctx.dispatch_typed_action(WorkspaceAction::TabConfigSidecarEditConfig {
|
||||
path: edit_path.clone(),
|
||||
})
|
||||
@@ -213,7 +213,7 @@ pub(crate) fn render_action_sidecar(
|
||||
})
|
||||
.build()
|
||||
.with_cursor(Cursor::PointingHand)
|
||||
.on_click(move |ctx: &mut warpui::elements::EventContext, _, _| {
|
||||
.on_click(move |ctx: &mut galaxyui::elements::EventContext, _, _| {
|
||||
ctx.dispatch_typed_action(WorkspaceAction::TabConfigSidecarRemoveConfig {
|
||||
name: remove_name.clone(),
|
||||
path: remove_path.clone(),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
elements::ChildView, ui_components::components::UiComponentStyles, AppContext, Element, Entity,
|
||||
TypedActionView, View, ViewContext, ViewHandle,
|
||||
};
|
||||
|
||||
@@ -10,7 +10,7 @@ pub mod session_config_rendering;
|
||||
pub mod tab_config;
|
||||
pub mod telemetry;
|
||||
|
||||
use warp_core::ui::theme::Fill;
|
||||
use galaxy_core::ui::theme::Fill;
|
||||
|
||||
pub use new_worktree_modal::{NewWorktreeModal, NewWorktreeModalEvent};
|
||||
pub use params_modal::{TabConfigParamsModal, TabConfigParamsModalEvent};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
elements::{
|
||||
Border, ChildView, ConstrainedBox, Container, CornerRadius, CrossAxisAlignment, Element,
|
||||
Fill as ElementFill, Flex, MainAxisAlignment, MainAxisSize, MouseStateHandle, Padding,
|
||||
@@ -19,7 +19,7 @@ use warpui::{
|
||||
|
||||
/// Registers keybindings for the new-worktree modal (ESC to close).
|
||||
pub fn init(app: &mut AppContext) {
|
||||
use warpui::keymap::macros::*;
|
||||
use galaxyui::keymap::macros::*;
|
||||
app.register_fixed_bindings(vec![FixedBinding::new(
|
||||
"escape",
|
||||
NewWorktreeModalAction::Escape,
|
||||
@@ -27,7 +27,7 @@ pub fn init(app: &mut AppContext) {
|
||||
)]);
|
||||
}
|
||||
|
||||
use warp_core::ui::theme::color::internal_colors;
|
||||
use galaxy_core::ui::theme::color::internal_colors;
|
||||
|
||||
use crate::{
|
||||
ai::persisted_workspace::PersistedWorkspace,
|
||||
@@ -364,8 +364,8 @@ impl View for NewWorktreeModal {
|
||||
|
||||
// X close icon
|
||||
let close_icon = ConstrainedBox::new(
|
||||
warp_core::ui::Icon::X
|
||||
.to_warpui_icon(theme.sub_text_color(theme.background()))
|
||||
galaxy_core::ui::Icon::X
|
||||
.to_galaxyui_icon(theme.sub_text_color(theme.background()))
|
||||
.finish(),
|
||||
)
|
||||
.with_width(CLOSE_ICON_SIZE)
|
||||
@@ -379,7 +379,7 @@ impl View for NewWorktreeModal {
|
||||
.with_child(esc_badge)
|
||||
.finish();
|
||||
|
||||
let close_hoverable = warpui::elements::Hoverable::new(
|
||||
let close_hoverable = galaxyui::elements::Hoverable::new(
|
||||
self.close_button_mouse_state.clone(),
|
||||
move |_state| close_button,
|
||||
)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use std::{collections::HashMap, path::PathBuf};
|
||||
|
||||
use warp_core::ui::theme::color::internal_colors;
|
||||
use warp_core::ui::Icon;
|
||||
use warp_editor::editor::NavigationKey;
|
||||
use warpui::{
|
||||
use galaxy_core::ui::theme::color::internal_colors;
|
||||
use galaxy_core::ui::Icon;
|
||||
use galaxy_editor::editor::NavigationKey;
|
||||
use galaxyui::{
|
||||
elements::{
|
||||
Border, ChildView, ClippedScrollStateHandle, ClippedScrollable, ConstrainedBox, Container,
|
||||
CornerRadius, CrossAxisAlignment, Fill, Flex, Hoverable, MainAxisAlignment, MainAxisSize,
|
||||
@@ -545,7 +545,7 @@ impl View for TabConfigParamsModal {
|
||||
.with_corner_radius(CornerRadius::with_all(Radius::Pixels(3.)))
|
||||
.finish();
|
||||
|
||||
let close_icon = ConstrainedBox::new(Icon::X.to_warpui_icon(sub_text).finish())
|
||||
let close_icon = ConstrainedBox::new(Icon::X.to_galaxyui_icon(sub_text).finish())
|
||||
.with_width(14.)
|
||||
.with_height(14.)
|
||||
.finish();
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use warp_core::ui::theme::Fill;
|
||||
use warpui::{
|
||||
use galaxy_core::ui::theme::Fill;
|
||||
use galaxyui::{
|
||||
elements::{
|
||||
Align, ChildAnchor, ChildView, Container, OffsetPositioning, ParentAnchor,
|
||||
ParentOffsetBounds, Stack,
|
||||
@@ -21,7 +21,7 @@ use crate::{
|
||||
};
|
||||
|
||||
pub(crate) fn init(app: &mut AppContext) {
|
||||
use warpui::keymap::macros::*;
|
||||
use galaxyui::keymap::macros::*;
|
||||
|
||||
app.register_fixed_bindings([
|
||||
FixedBinding::new(
|
||||
@@ -98,7 +98,7 @@ impl View for RemoveTabConfigConfirmationDialog {
|
||||
"RemoveTabConfigConfirmationDialog"
|
||||
}
|
||||
|
||||
fn on_focus(&mut self, _focus_ctx: &warpui::FocusContext, ctx: &mut ViewContext<Self>) {
|
||||
fn on_focus(&mut self, _focus_ctx: &galaxyui::FocusContext, ctx: &mut ViewContext<Self>) {
|
||||
ctx.focus_self();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
elements::{Border, ChildView, Container, Hoverable, MouseStateHandle, Text},
|
||||
platform::Cursor,
|
||||
ui_components::components::UiComponentStyles,
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use warpui::elements::{
|
||||
use galaxyui::elements::{
|
||||
ChildAnchor, ChildView, ConstrainedBox, Container, CrossAxisAlignment, Flex,
|
||||
FormattedTextElement, MouseStateHandle, OffsetPositioning, ParentAnchor, ParentElement,
|
||||
ParentOffsetBounds, Stack,
|
||||
};
|
||||
use warpui::fonts::Weight;
|
||||
use warpui::keymap::macros::id;
|
||||
use warpui::keymap::FixedBinding;
|
||||
use warpui::keymap::Keystroke;
|
||||
use warpui::platform::file_picker::FilePickerConfiguration;
|
||||
use warpui::FocusContext;
|
||||
use warpui::{
|
||||
use galaxyui::fonts::Weight;
|
||||
use galaxyui::keymap::macros::id;
|
||||
use galaxyui::keymap::FixedBinding;
|
||||
use galaxyui::keymap::Keystroke;
|
||||
use galaxyui::platform::file_picker::FilePickerConfiguration;
|
||||
use galaxyui::FocusContext;
|
||||
use galaxyui::{
|
||||
AppContext, Element, Entity, SingletonEntity, TypedActionView, View, ViewContext, ViewHandle,
|
||||
};
|
||||
|
||||
@@ -25,7 +25,7 @@ use crate::view_components::action_button::{
|
||||
use super::session_config::{is_git_repo, SessionConfigSelection, SessionType};
|
||||
use super::session_config_rendering;
|
||||
|
||||
pub fn init(app: &mut warpui::AppContext) {
|
||||
pub fn init(app: &mut galaxyui::AppContext) {
|
||||
app.register_fixed_bindings([FixedBinding::new(
|
||||
"enter",
|
||||
SessionConfigModalAction::Submit,
|
||||
@@ -39,7 +39,7 @@ const SECTION_GAP: f32 = 16.;
|
||||
pub enum SessionConfigModalAction {
|
||||
SelectSessionType(usize),
|
||||
OpenDirectoryPicker,
|
||||
DirectorySelected(Result<String, warpui::platform::file_picker::FilePickerError>),
|
||||
DirectorySelected(Result<String, galaxyui::platform::file_picker::FilePickerError>),
|
||||
ToggleWorktree,
|
||||
ToggleAutogenerateWorktreeBranchName,
|
||||
Submit,
|
||||
|
||||
@@ -3,20 +3,20 @@ use std::sync::Arc;
|
||||
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use warpui::elements::{
|
||||
use galaxyui::elements::{
|
||||
Border, ChildAnchor, ConstrainedBox, Container, CornerRadius, CrossAxisAlignment, Expanded,
|
||||
Flex, Hoverable, MainAxisAlignment, MainAxisSize, MouseStateHandle, OffsetPositioning,
|
||||
ParentAnchor, ParentElement, ParentOffsetBounds, Radius, Stack, Text,
|
||||
};
|
||||
use warpui::fonts::{Properties, Weight};
|
||||
use warpui::geometry::vector::Vector2F;
|
||||
use warpui::platform::Cursor;
|
||||
use warpui::ui_components::components::UiComponent;
|
||||
use warpui::Element;
|
||||
use warpui::EventContext;
|
||||
use galaxyui::fonts::{Properties, Weight};
|
||||
use galaxyui::geometry::vector::Vector2F;
|
||||
use galaxyui::platform::Cursor;
|
||||
use galaxyui::ui_components::components::UiComponent;
|
||||
use galaxyui::Element;
|
||||
use galaxyui::EventContext;
|
||||
|
||||
use warp_core::ui::theme::Fill;
|
||||
use warp_core::ui::theme::WarpTheme;
|
||||
use galaxy_core::ui::theme::Fill;
|
||||
use galaxy_core::ui::theme::WarpTheme;
|
||||
|
||||
use crate::appearance::Appearance;
|
||||
use crate::tab_configs::session_config::SessionType;
|
||||
@@ -109,7 +109,7 @@ where
|
||||
let icon = ConstrainedBox::new(
|
||||
session_type
|
||||
.icon()
|
||||
.to_warpui_icon(item_color.into())
|
||||
.to_galaxyui_icon(item_color.into())
|
||||
.finish(),
|
||||
)
|
||||
.with_width(14.)
|
||||
@@ -241,7 +241,7 @@ where
|
||||
let home_dir = dirs::home_dir();
|
||||
let raw_path = selected_directory.to_string_lossy();
|
||||
let dir_display =
|
||||
warp_util::path::user_friendly_path(&raw_path, home_dir.as_ref().and_then(|h| h.to_str()))
|
||||
galaxy_util::path::user_friendly_path(&raw_path, home_dir.as_ref().and_then(|h| h.to_str()))
|
||||
.into_owned();
|
||||
|
||||
let dir_text = Text::new_inline(dir_display, appearance.ui_font_family(), 14.)
|
||||
@@ -320,7 +320,7 @@ pub fn render_worktree_checkbox_with_background<F>(
|
||||
appearance: &Appearance,
|
||||
) -> Box<dyn Element>
|
||||
where
|
||||
F: Fn(&mut warpui::EventContext, warpui::geometry::vector::Vector2F) + 'static,
|
||||
F: Fn(&mut galaxyui::EventContext, galaxyui::geometry::vector::Vector2F) + 'static,
|
||||
{
|
||||
let disabled = !is_git_repo;
|
||||
let on_accent_bg = bg.is_some();
|
||||
|
||||
@@ -45,7 +45,7 @@ pub(crate) fn generated_worktree_repo_dir(repo_path: &Path) -> PathBuf {
|
||||
.and_then(|name| name.to_str())
|
||||
.filter(|name| !name.is_empty())
|
||||
.unwrap_or("untitled");
|
||||
warp_core::paths::data_dir()
|
||||
galaxy_core::paths::data_dir()
|
||||
.join("worktrees")
|
||||
.join(repo_name)
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ fn test_generated_worktree_path_uses_repo_name_directory() {
|
||||
|
||||
assert_eq!(
|
||||
repo_dir,
|
||||
warp_core::paths::data_dir()
|
||||
galaxy_core::paths::data_dir()
|
||||
.join("worktrees")
|
||||
.join("backend")
|
||||
);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use serde::Serialize;
|
||||
use serde_json::{json, Value};
|
||||
use strum_macros::{EnumDiscriminants, EnumIter};
|
||||
use warp_core::telemetry::{EnablementState, TelemetryEvent, TelemetryEventDesc};
|
||||
use galaxy_core::telemetry::{EnablementState, TelemetryEvent, TelemetryEventDesc};
|
||||
|
||||
use crate::tab_configs::session_config::SessionType;
|
||||
|
||||
@@ -117,7 +117,7 @@ impl TelemetryEvent for TabConfigsTelemetryEvent {
|
||||
}
|
||||
|
||||
fn event_descs() -> impl Iterator<Item = Box<dyn TelemetryEventDesc>> {
|
||||
warp_core::telemetry::enum_events::<Self>()
|
||||
galaxy_core::telemetry::enum_events::<Self>()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,4 +157,4 @@ impl TelemetryEventDesc for TabConfigsTelemetryEventDiscriminants {
|
||||
}
|
||||
}
|
||||
|
||||
warp_core::register_telemetry_event!(TabConfigsTelemetryEvent);
|
||||
galaxy_core::register_telemetry_event!(TabConfigsTelemetryEvent);
|
||||
|
||||
Reference in New Issue
Block a user