first pass of merging in warp (doesn't build)

This commit is contained in:
Ryan Ward
2026-07-01 16:08:58 -05:00
parent 2f64909469
commit 4770ac06b5
3662 changed files with 414574 additions and 89772 deletions
+32 -42
View File
@@ -1,49 +1,39 @@
use enum_iterator::{all, Sequence};
use galaxyui::elements::CornerRadius;
use galaxyui::presenter::ChildView;
use galaxyui::units::Pixels;
use galaxyui::FocusContext;
use galaxyui::{
elements::{
Align, Border, ClippedScrollStateHandle, ClippedScrollable, ConstrainedBox, Container,
CrossAxisAlignment, Element, Fill, Flex, MainAxisSize, MouseStateHandle, ParentElement,
Radius, Shrinkable,
},
keymap::{DescriptionContext, Keystroke},
ui_components::components::{Coords, UiComponent, UiComponentStyles},
AppContext, Entity, SingletonEntity, TypedActionView, View, ViewContext, ViewHandle,
};
use itertools::{Either, Itertools};
use galaxyui::elements::{
Align, Border, ClippedScrollStateHandle, ClippedScrollable, ConstrainedBox, Container,
CornerRadius, CrossAxisAlignment, Element, Fill, Flex, MainAxisSize, MouseStateHandle,
ParentElement, Radius, Shrinkable,
};
use galaxyui::keymap::{DescriptionContext, Keystroke};
use galaxyui::presenter::ChildView;
use galaxyui::ui_components::components::{Coords, UiComponent, UiComponentStyles};
use galaxyui::units::Pixels;
use galaxyui::{
AppContext, Entity, FocusContext, ModelHandle, SingletonEntity, TypedActionView, View,
ViewContext, ViewHandle,
};
use super::section_views::{
DESCRIPTION_FONT_SIZE, ITEM_PADDING_BOTTOM, SCROLLBAR_OFFSET, SCROLLBAR_WIDTH,
SECTION_HEADER_FONT_SIZE, SECTION_SPACING,
};
use super::utils::{
get_additional_keybindings, BLOCKS_KEYBINDINGS, FUNDAMENTALS_KEYBINDINGS,
INPUT_EDITOR_KEYBINDINGS, TERMINAL_KEYBINDINGS,
};
use crate::appearance::Appearance;
use crate::command_palette::PRIORITIZED_KEYBINDINGS;
use crate::editor::{
EditorView, Event as EditorEvent, PropagateAndNoOpNavigationKeys, SingleLineEditorOptions,
TextOptions,
};
use crate::search_bar::SearchBar;
use crate::settings_view;
use crate::settings_view::keybindings::{KeybindingChangedEvent, KeybindingChangedNotifier};
use crate::util::bindings::{filter_bindings_including_keystroke, CommandBinding};
use crate::workspace::tab_settings::TabSettings;
use crate::{
appearance::Appearance,
command_palette::PRIORITIZED_KEYBINDINGS,
search_bar::SearchBar,
settings_view::keybindings::{KeybindingChangedEvent, KeybindingChangedNotifier},
util::bindings::filter_bindings_including_keystroke,
workspace::WorkspaceAction,
};
use galaxyui::ModelHandle;
use crate::{
editor::{
EditorView, Event as EditorEvent, PropagateAndNoOpNavigationKeys, SingleLineEditorOptions,
TextOptions,
},
util::bindings::CommandBinding,
};
use super::{
section_views::{
DESCRIPTION_FONT_SIZE, ITEM_PADDING_BOTTOM, SCROLLBAR_OFFSET, SCROLLBAR_WIDTH,
SECTION_HEADER_FONT_SIZE, SECTION_SPACING,
},
utils::{get_additional_keybindings, FUNDAMENTALS_KEYBINDINGS},
};
use super::utils::{BLOCKS_KEYBINDINGS, INPUT_EDITOR_KEYBINDINGS, TERMINAL_KEYBINDINGS};
use crate::workspace::WorkspaceAction;
const KEYBINDINGS_PAGE_SHORTCUT: &str = "workspace:toggle_keybindings_page";
const LINK_WIDTH: f32 = 30.;
@@ -54,7 +44,7 @@ struct MouseStateHandles {
}
pub struct KeybindingsView {
/// List of all keybidings.
/// List of all keybindings.
bindings: Option<Vec<CommandBinding>>,
/// List of keybindings based on search query.
binding_results: Option<Vec<CommandBinding>>,
+30 -34
View File
@@ -1,43 +1,39 @@
use crate::{
auth::AuthStateProvider,
changelog_model::ChangelogModel,
channel::ChannelState,
features::FeatureFlag,
resource_center::skip_tips_and_write_to_user_defaults,
send_telemetry_from_ctx,
server::telemetry::TelemetryEvent,
settings::Settings,
themes::theme::{Blend, Fill as FillTheme},
use pathfinder_geometry::vector::vec2f;
use galaxyui::elements::{
Align, ClippedScrollStateHandle, ClippedScrollable, Container, CornerRadius, Element, Empty,
Fill, Flex, Hoverable, Icon, MainAxisAlignment, MainAxisSize, MouseStateHandle, ParentElement,
Radius, Shrinkable,
};
use galaxyui::platform::Cursor;
use galaxyui::presenter::ChildView;
use galaxyui::ui_components::button::{ButtonVariant, TextAndIcon, TextAndIconAlignment};
use galaxyui::ui_components::components::{Coords, UiComponent, UiComponentStyles};
use galaxyui::{
elements::{
Align, ClippedScrollStateHandle, ClippedScrollable, Container, CornerRadius, Element,
Empty, Fill, Flex, Hoverable, Icon, MainAxisAlignment, MainAxisSize, MouseStateHandle,
ParentElement, Radius, Shrinkable,
},
platform::Cursor,
presenter::ChildView,
ui_components::{
button::{ButtonVariant, TextAndIcon, TextAndIconAlignment},
components::{Coords, UiComponent, UiComponentStyles},
},
AppContext, Entity, EntityId, ModelHandle, SingletonEntity, TypedActionView, View, ViewContext,
ViewHandle, WindowId,
};
use pathfinder_geometry::vector::vec2f;
use crate::{appearance::Appearance, workspace::WorkspaceAction};
use super::section_views::feature_section::FeatureSectionEvent;
use super::section_views::{
SectionViewHandle, BUTTON_PADDING, DETAIL_FONT_SIZE, FOOTER_ICON_SIZE, SCROLLBAR_OFFSET,
SCROLLBAR_WIDTH, SECTION_SPACING, SECTION_SPACING_BOTTOM,
};
use super::sections::sections;
use super::{
section_views::{
feature_section::FeatureSectionEvent, SectionViewHandle, BUTTON_PADDING, DETAIL_FONT_SIZE,
FOOTER_ICON_SIZE, SCROLLBAR_OFFSET, SCROLLBAR_WIDTH, SECTION_SPACING,
SECTION_SPACING_BOTTOM,
},
sections::sections,
ChangelogSectionView, ContentSectionData, ContentSectionView, FeatureSection,
FeatureSectionData, FeatureSectionView, Section, TipsCompleted,
};
use crate::appearance::Appearance;
use crate::auth::AuthStateProvider;
use crate::changelog_model::ChangelogModel;
use crate::channel::ChannelState;
use crate::features::FeatureFlag;
use crate::resource_center::skip_tips_and_write_to_user_defaults;
use crate::send_telemetry_from_ctx;
use crate::server::telemetry::TelemetryEvent;
use crate::settings::Settings;
use crate::themes::theme::{Blend, Fill as FillTheme};
use crate::workspace::WorkspaceAction;
const SEND_SVG_PATH: &str = "bundled/svg/send.svg";
@@ -456,12 +452,12 @@ impl ResourceCenterMainView {
/// A model for tracking where the events from the resource center view should be dispatched
///
/// Similar to command palette - we need a model to cache the information of where
/// we should send the actions from the resouce center features. When the resource center is opened,
/// we should send the actions from the resource center features. When the resource center is opened,
/// we cache the current active window ID as well as the input ID of the active
/// tab/pane. By sending all the actions to the input view, we ensure that
/// they propgate correctly. This propogation assumes that each feature action
/// must be in the reponder chain. If an action is not in the responder chain
/// (such as a block navigation action) then it won't propogate correctly.
/// they propagate correctly. This propagation assumes that each feature action
/// must be in the responder chain. If an action is not in the responder chain
/// (such as a block navigation action) then it won't propagate correctly.
pub enum ActionTarget {
None,
View {
+6 -6
View File
@@ -1,13 +1,11 @@
use std::collections::HashSet;
use chrono::{DateTime, FixedOffset};
use settings::Setting as _;
use crate::{
report_if_error, terminal::general_settings::GeneralSettings,
util::bindings::trigger_to_keystroke,
};
use chrono::{DateTime, FixedOffset};
use crate::report_if_error;
use crate::terminal::general_settings::GeneralSettings;
use crate::util::bindings::trigger_to_keystroke;
mod main_page;
pub mod utils;
@@ -21,6 +19,8 @@ mod view;
use galaxyui::{keymap::Keystroke, AppContext, Entity, SingletonEntity};
use serde::{Deserialize, Serialize};
pub use view::{ResourceCenterAction, ResourceCenterEvent, ResourceCenterPage, ResourceCenterView};
use galaxyui::keymap::Keystroke;
use galaxyui::{AppContext, Entity, SingletonEntity};
use self::section_views::feature_section::FeatureSection;
@@ -1,27 +1,28 @@
use instant::Instant;
use markdown_parser::{FormattedText, FormattedTextFragment, FormattedTextLine};
use galaxy_core::features::FeatureFlag;
use galaxyui::elements::{
Border, CacheOption, ConstrainedBox, Container, CornerRadius, CrossAxisAlignment, Element,
Flex, FormattedTextElement, HighlightedHyperlink, Icon, Image, MouseStateHandle, ParentElement,
Radius,
};
use galaxyui::fonts::Weight;
use galaxyui::ui_components::components::{UiComponent, UiComponentStyles};
use galaxyui::{
elements::{
Border, CacheOption, ConstrainedBox, Container, CornerRadius, CrossAxisAlignment, Element,
Flex, FormattedTextElement, HighlightedHyperlink, Icon, Image, MouseStateHandle,
ParentElement, Radius,
},
fonts::Weight,
ui_components::components::{UiComponent, UiComponentStyles},
AppContext, Entity, ModelAsRef, ModelHandle, SingletonEntity, TypedActionView, View,
ViewContext,
};
use instant::Instant;
use markdown_parser::{FormattedText, FormattedTextFragment, FormattedTextLine};
use crate::{
appearance::Appearance,
changelog_model::{ChangelogHeader, ChangelogModel, ChangelogState, Event as ChangelogEvent},
themes::theme::Fill,
ui_components::icons,
use super::feature_section::FeatureSection;
use super::{SectionAction, SectionView};
use crate::appearance::Appearance;
use crate::changelog_model::{
ChangelogHeader, ChangelogModel, ChangelogState, Event as ChangelogEvent,
};
use crate::{send_telemetry_from_ctx, server::telemetry::TelemetryEvent};
use super::{feature_section::FeatureSection, SectionAction, SectionView};
use crate::send_telemetry_from_ctx;
use crate::server::telemetry::TelemetryEvent;
use crate::themes::theme::Fill;
use crate::ui_components::icons;
#[derive(Default)]
struct ChangelogMouseStateHandles {
@@ -1,23 +1,17 @@
use galaxyui::{
elements::{
ConstrainedBox, Container, Element, Empty, Flex, MouseStateHandle, ParentElement,
Shrinkable,
},
ui_components::components::{UiComponent, UiComponentStyles},
AppContext, Entity, SingletonEntity, TypedActionView, View, ViewContext,
};
use pathfinder_color::ColorU;
use crate::util::color::{ContrastingColor, MinimumAllowedContrast};
use crate::{
appearance::Appearance,
resource_center::{ContentItem, ContentSectionData},
use galaxyui::elements::{
ConstrainedBox, Container, Element, Empty, Flex, MouseStateHandle, ParentElement, Shrinkable,
};
use warpui::ui_components::components::{UiComponent, UiComponentStyles};
use warpui::{AppContext, Entity, SingletonEntity, TypedActionView, View, ViewContext};
use super::{
SectionAction, SectionView, CHEVRON_ICON_SIZE, DESCRIPTION_FONT_SIZE, ICON_PADDING,
ITEM_PADDING_BOTTOM, SECTION_SPACING,
};
use crate::appearance::Appearance;
use crate::resource_center::{ContentItem, ContentSectionData};
use crate::util::color::{ContrastingColor, MinimumAllowedContrast};
#[derive(Default)]
struct ContentMouseStateHandles {
@@ -1,31 +1,29 @@
use crate::{
appearance::Appearance,
send_telemetry_from_ctx,
server::telemetry::TelemetryEvent,
settings_view::keybindings::{KeybindingChangedEvent, KeybindingChangedNotifier},
themes::theme::Fill,
use warpui::elements::{
Align, ConstrainedBox, Container, CrossAxisAlignment, Element, Flex, Hoverable, Icon,
MouseState, MouseStateHandle, ParentElement, Shrinkable,
};
use galaxyui::fonts::Weight;
use galaxyui::platform::Cursor;
use galaxyui::ui_components::components::{UiComponent, UiComponentStyles};
use galaxyui::{
elements::{
Align, ConstrainedBox, Container, CrossAxisAlignment, Element, Flex, Hoverable, Icon,
MouseState, MouseStateHandle, ParentElement, Shrinkable,
},
fonts::Weight,
platform::Cursor,
ui_components::components::{UiComponent, UiComponentStyles},
Action, AppContext, Entity, EntityId, ModelHandle, SingletonEntity, TypedActionView, View,
ViewContext, WindowId,
};
use crate::resource_center::{
complete_tips_and_write_to_user_defaults, main_page::ActionTarget,
skip_tips_and_write_to_user_defaults, FeatureItem, FeatureSectionData, Tip, TipsCompleted,
};
use super::{
SectionAction, SectionView, CHEVRON_ICON_SIZE, DESCRIPTION_FONT_SIZE, ELLIPSE_ICON_SIZE,
ELLIPSE_SVG_PATH, ICON_PADDING, ITEM_PADDING_BOTTOM, SCROLLBAR_OFFSET, SECTION_SPACING,
};
use crate::appearance::Appearance;
use crate::resource_center::main_page::ActionTarget;
use crate::resource_center::{
complete_tips_and_write_to_user_defaults, skip_tips_and_write_to_user_defaults, FeatureItem,
FeatureSectionData, Tip, TipsCompleted,
};
use crate::send_telemetry_from_ctx;
use crate::server::telemetry::TelemetryEvent;
use crate::settings_view::keybindings::{KeybindingChangedEvent, KeybindingChangedNotifier};
use crate::themes::theme::Fill;
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum FeatureSection {
+10 -12
View File
@@ -4,20 +4,18 @@ pub mod content_section;
pub use content_section::ContentSectionView;
use galaxy_core::features::FeatureFlag;
pub mod changelog_section;
use crate::{
appearance::Appearance,
resource_center::{section_views::feature_section::FeatureSection, TipAction},
};
pub use changelog_section::ChangelogSectionView;
use galaxyui::{
elements::{
Align, Border, ConstrainedBox, Container, CrossAxisAlignment, Element, Flex, Hoverable,
Icon, MouseStateHandle, ParentElement, ScrollbarWidth, Shrinkable,
},
platform::Cursor,
ui_components::components::{UiComponent, UiComponentStyles},
AppContext, ViewContext, ViewHandle,
use galaxyui::elements::{
Align, Border, ConstrainedBox, Container, CrossAxisAlignment, Element, Flex, Hoverable, Icon,
MouseStateHandle, ParentElement, ScrollbarWidth, Shrinkable,
};
use warpui::platform::Cursor;
use warpui::ui_components::components::{UiComponent, UiComponentStyles};
use warpui::{AppContext, ViewContext, ViewHandle};
use crate::appearance::Appearance;
use crate::resource_center::section_views::feature_section::FeatureSection;
use crate::resource_center::TipAction;
pub const HEADER_FONT_SIZE: f32 = 16.;
pub const SECTION_HEADER_FONT_SIZE: f32 = 16.;
+2 -1
View File
@@ -1,4 +1,5 @@
use galaxy_core::{context_flag::ContextFlag, features::FeatureFlag};
use galaxy_core::context_flag::ContextFlag;
use galaxy_core::features::FeatureFlag;
use galaxyui::ViewContext;
use super::{
+25 -29
View File
@@ -1,38 +1,34 @@
use galaxy_core::{features::FeatureFlag, ui::builder::AnimatedButtonOptions};
use vec1::{vec1, Vec1};
use galaxy_core::features::FeatureFlag;
use galaxy_core::ui::builder::AnimatedButtonOptions;
use galaxyui::elements::{
Align, Border, ConstrainedBox, Container, CrossAxisAlignment, Element, Flex, Icon,
MainAxisAlignment, MainAxisSize, MouseStateHandle, ParentElement, SavePosition, Shrinkable,
};
use galaxyui::fonts::Weight;
use galaxyui::platform::Cursor;
use galaxyui::presenter::ChildView;
use galaxyui::ui_components::button::ButtonVariant;
use galaxyui::ui_components::components::{Coords, UiComponent, UiComponentStyles};
use galaxyui::windowing::{StateEvent, WindowManager};
use galaxyui::{
elements::{
Align, Border, ConstrainedBox, Container, CrossAxisAlignment, Element, Flex, Icon,
MainAxisAlignment, MainAxisSize, MouseStateHandle, ParentElement, SavePosition, Shrinkable,
},
fonts::Weight,
platform::Cursor,
presenter::ChildView,
ui_components::{
button::ButtonVariant,
components::{Coords, UiComponent, UiComponentStyles},
},
windowing::{StateEvent, WindowManager},
AppContext, Entity, EntityId, FocusContext, ModelHandle, SingletonEntity, TypedActionView,
View, ViewContext, ViewHandle, WindowId,
};
use vec1::{vec1, Vec1};
use super::{
keybindings_page::KeybindingsEvent,
section_views::{
FOOTER_ICON_SIZE, HEADER_FONT_SIZE, ICON_PADDING, KEYBOARD_ICON_SIZE, SCROLLBAR_OFFSET,
SECTION_SPACING,
},
KeybindingsView, ResourceCenterMainEvent, ResourceCenterMainView, TipsCompleted,
};
use crate::ui_components::{buttons::icon_button, window_focus_dimming::WindowFocusDimming};
use crate::{
appearance::Appearance,
changelog_model::ChangelogModel,
ui_components::icons,
util::links,
workspace::{WorkspaceAction, PANEL_HEADER_HEIGHT},
use super::keybindings_page::KeybindingsEvent;
use super::section_views::{
FOOTER_ICON_SIZE, HEADER_FONT_SIZE, ICON_PADDING, KEYBOARD_ICON_SIZE, SCROLLBAR_OFFSET,
SECTION_SPACING,
};
use super::{KeybindingsView, ResourceCenterMainEvent, ResourceCenterMainView, TipsCompleted};
use crate::appearance::Appearance;
use crate::changelog_model::ChangelogModel;
use crate::ui_components::buttons::icon_button;
use crate::ui_components::icons;
use crate::ui_components::window_focus_dimming::WindowFocusDimming;
use crate::util::links;
use crate::workspace::{WorkspaceAction, PANEL_HEADER_HEIGHT};
// Footer icons
const DOCS_SVG_PATH: &str = "bundled/svg/gitbook-logo.svg";