Wrapping up bedrock implementation
This commit is contained in:
@@ -1,11 +1,4 @@
|
||||
use anyhow::{anyhow, Result};
|
||||
use onboarding::components::onboarding_callout::{
|
||||
Button as CalloutButton, OnboardingCallout, Options as CalloutOptions, Params as CalloutParams,
|
||||
StepStatus,
|
||||
};
|
||||
use rust_embed::RustEmbed;
|
||||
use std::borrow::Cow;
|
||||
use ui_components::Component as _;
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
use galaxy_core::ui::theme::{AnsiColor, AnsiColors, Details, Fill, TerminalColors, WarpTheme};
|
||||
use galaxyui::color::ColorU;
|
||||
@@ -13,6 +6,13 @@ use galaxyui::elements::{Rect, Stack};
|
||||
use galaxyui::fonts::{Cache, FamilyId, Weight};
|
||||
use galaxyui::platform;
|
||||
use galaxyui::{prelude::*, AddWindowOptions, AssetProvider, ModelContext};
|
||||
use onboarding::components::onboarding_callout::{
|
||||
Button as CalloutButton, OnboardingCallout, Options as CalloutOptions, Params as CalloutParams,
|
||||
StepStatus,
|
||||
};
|
||||
use rust_embed::RustEmbed;
|
||||
use std::borrow::Cow;
|
||||
use ui_components::Component as _;
|
||||
|
||||
#[derive(Clone, Copy, RustEmbed)]
|
||||
#[folder = "../../app/assets"]
|
||||
|
||||
@@ -1,12 +1,4 @@
|
||||
use anyhow::Result;
|
||||
use onboarding::callout::{
|
||||
OnboardingCalloutView, OnboardingCalloutViewEvent, OnboardingKeybindings,
|
||||
};
|
||||
use onboarding::OnboardingIntention;
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use rust_embed::RustEmbed;
|
||||
use std::borrow::Cow;
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
use galaxy_core::ui::theme::{AnsiColor, AnsiColors, Details, Fill, TerminalColors, WarpTheme};
|
||||
use galaxyui::fonts::{Cache, FamilyId, Weight};
|
||||
@@ -22,6 +14,14 @@ use galaxyui::{
|
||||
AddWindowOptions, AppContext, AssetProvider, Element, Entity, SingletonEntity as _,
|
||||
TypedActionView, View, ViewContext, ViewHandle,
|
||||
};
|
||||
use onboarding::callout::{
|
||||
OnboardingCalloutView, OnboardingCalloutViewEvent, OnboardingKeybindings,
|
||||
};
|
||||
use onboarding::OnboardingIntention;
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use rust_embed::RustEmbed;
|
||||
use std::borrow::Cow;
|
||||
|
||||
#[derive(Clone, Copy, RustEmbed)]
|
||||
#[folder = "../../app/assets"]
|
||||
|
||||
@@ -9,8 +9,6 @@ use crate::slides::{
|
||||
};
|
||||
use crate::telemetry::OnboardingEvent;
|
||||
use ai::LLMId;
|
||||
use instant::Instant;
|
||||
use std::time::Duration;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxy_core::send_telemetry_from_ctx;
|
||||
use galaxyui::assets::asset_cache::AssetSource;
|
||||
@@ -19,11 +17,11 @@ use galaxyui::windowing::{
|
||||
state::{ApplicationStage, StateEvent},
|
||||
WindowManager,
|
||||
};
|
||||
use instant::Instant;
|
||||
use std::time::Duration;
|
||||
|
||||
const APP_BECAME_ACTIVE_DEBOUNCE: Duration = Duration::from_secs(15);
|
||||
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use ui_components::{button, Component as _, Options as _};
|
||||
use galaxy_core::ui::{appearance::Appearance, theme::WarpTheme};
|
||||
use galaxyui::elements::Rect;
|
||||
use galaxyui::{
|
||||
@@ -37,6 +35,8 @@ use galaxyui::{
|
||||
AppContext, Element, Entity, ModelHandle, SingletonEntity as _, TypedActionView, View,
|
||||
ViewContext, ViewHandle,
|
||||
};
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use ui_components::{button, Component as _, Options as _};
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum AgentOnboardingEvent {
|
||||
|
||||
@@ -2,13 +2,6 @@
|
||||
|
||||
use ai::LLMId;
|
||||
use anyhow::Result;
|
||||
use onboarding::slides::OnboardingModelInfo;
|
||||
use onboarding::{
|
||||
AgentOnboardingEvent, AgentOnboardingView, MockTelemetryContextProvider, SelectedSettings,
|
||||
};
|
||||
use pathfinder_color::ColorU;
|
||||
use rust_embed::RustEmbed;
|
||||
use std::borrow::Cow;
|
||||
use galaxy_core::ui::icons::Icon;
|
||||
use galaxy_core::ui::theme::{AnsiColor, AnsiColors, Details, Fill, Image, TerminalColors};
|
||||
use galaxy_core::ui::{appearance::Appearance, theme::WarpTheme};
|
||||
@@ -24,6 +17,13 @@ use galaxyui::{
|
||||
AddWindowOptions, AppContext, AssetProvider, Element, Entity, SingletonEntity as _,
|
||||
TypedActionView, View, ViewContext, ViewHandle,
|
||||
};
|
||||
use onboarding::slides::OnboardingModelInfo;
|
||||
use onboarding::{
|
||||
AgentOnboardingEvent, AgentOnboardingView, MockTelemetryContextProvider, SelectedSettings,
|
||||
};
|
||||
use pathfinder_color::ColorU;
|
||||
use rust_embed::RustEmbed;
|
||||
use std::borrow::Cow;
|
||||
|
||||
#[derive(Clone, Copy, RustEmbed)]
|
||||
#[folder = "../../app/assets"]
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
use ui_components::Component;
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
use galaxyui::{
|
||||
elements::Empty,
|
||||
@@ -6,6 +5,7 @@ use galaxyui::{
|
||||
AppContext, Element, Entity, EventContext, ModelHandle, SingletonEntity, TypedActionView, View,
|
||||
ViewContext,
|
||||
};
|
||||
use ui_components::Component;
|
||||
|
||||
/// Display strings for keybindings shown in the onboarding callout.
|
||||
#[derive(Clone, Debug)]
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
use std::borrow::Cow;
|
||||
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use ui_components::{
|
||||
button, button::Button as ButtonComponent, Component, MouseEventHandler, Options as _,
|
||||
};
|
||||
use galaxy_core::ui::{
|
||||
appearance::Appearance,
|
||||
color::{coloru_with_opacity, contrast::relative_luminance},
|
||||
@@ -21,6 +16,11 @@ use galaxyui::{
|
||||
ui_components::checkbox::Checkbox as WarpCheckbox,
|
||||
ui_components::components::{UiComponent as _, UiComponentStyles},
|
||||
};
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use ui_components::{
|
||||
button, button::Button as ButtonComponent, Component, MouseEventHandler, Options as _,
|
||||
};
|
||||
|
||||
const CALLOUT_WIDTH: f32 = 480.;
|
||||
const CALLOUT_BORDER_WIDTH: f32 = 1.;
|
||||
|
||||
@@ -6,8 +6,6 @@ use galaxy_core::send_telemetry_from_ctx;
|
||||
|
||||
use super::OnboardingSlide;
|
||||
use crate::visuals::agent_visual;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use ui_components::{button, Component as _, Options as _};
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxy_core::ui::{
|
||||
appearance::Appearance,
|
||||
@@ -31,11 +29,13 @@ use galaxyui::{
|
||||
AppContext, Element, Entity, Gradient, SingletonEntity as _, TypedActionView, View,
|
||||
ViewContext,
|
||||
};
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use ui_components::{button, Component as _, Options as _};
|
||||
|
||||
use ai::LLMId;
|
||||
use galaxy_core::ui::icons::Icon;
|
||||
use pathfinder_color::ColorU;
|
||||
use ui_components::button::State as ButtonState;
|
||||
use galaxy_core::ui::icons::Icon;
|
||||
|
||||
/// high-contrast "inverted" fill (foreground color)
|
||||
struct UpgradeButtonTheme;
|
||||
@@ -1003,12 +1003,12 @@ impl AgentSlide {
|
||||
);
|
||||
|
||||
let step_index = 2;
|
||||
let step_count = if galaxy_core::features::FeatureFlag::OpenWarpNewSettingsModes.is_enabled()
|
||||
{
|
||||
5
|
||||
} else {
|
||||
4
|
||||
};
|
||||
let step_count =
|
||||
if galaxy_core::features::FeatureFlag::OpenWarpNewSettingsModes.is_enabled() {
|
||||
5
|
||||
} else {
|
||||
4
|
||||
};
|
||||
bottom_nav::onboarding_bottom_nav(
|
||||
appearance,
|
||||
step_index,
|
||||
|
||||
@@ -4,7 +4,6 @@ use crate::model::{OnboardingStateEvent, OnboardingStateModel, UICustomizationSe
|
||||
use crate::slides::{bottom_nav, layout, slide_content};
|
||||
use crate::visuals::{intention_terminal_visual, intention_visual};
|
||||
use crate::OnboardingIntention;
|
||||
use ui_components::{button, Component as _, Options as _};
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxy_core::ui::{appearance::Appearance, theme::color::internal_colors};
|
||||
use galaxyui::prelude::Align;
|
||||
@@ -20,6 +19,7 @@ use galaxyui::{
|
||||
AppContext, Element, Entity, ModelHandle, SingletonEntity as _, TypedActionView, View,
|
||||
ViewContext,
|
||||
};
|
||||
use ui_components::{button, Component as _, Options as _};
|
||||
|
||||
/// Which setting card is currently selected (expanded).
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
|
||||
@@ -3,7 +3,6 @@ use crate::model::OnboardingStateModel;
|
||||
use crate::slides::{bottom_nav, layout, slide_content};
|
||||
use crate::telemetry::OnboardingEvent;
|
||||
use crate::OnboardingIntention;
|
||||
use ui_components::{button, Component as _, Options as _};
|
||||
use galaxy_core::send_telemetry_from_ctx;
|
||||
use galaxy_core::ui::theme::Fill;
|
||||
use galaxy_core::ui::{appearance::Appearance, theme::color::internal_colors, Icon};
|
||||
@@ -23,6 +22,7 @@ use galaxyui::{
|
||||
AppContext, Element, Entity, ModelHandle, SingletonEntity as _, TypedActionView, View,
|
||||
ViewContext,
|
||||
};
|
||||
use ui_components::{button, Component as _, Options as _};
|
||||
|
||||
const SUBSCRIBE_ITEMS: &[&str] = &[
|
||||
"1,500 credits per month",
|
||||
|
||||
@@ -3,7 +3,6 @@ use crate::model::OnboardingStateModel;
|
||||
use crate::slides::{bottom_nav, layout, slide_content};
|
||||
use crate::visuals::{intention_terminal_visual, intention_visual};
|
||||
use crate::{OnboardingIntention, AI_FEATURES};
|
||||
use ui_components::{button, Component as _, Options as _};
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxy_core::ui::theme::Fill;
|
||||
use galaxy_core::ui::{appearance::Appearance, theme::color::internal_colors, Icon};
|
||||
@@ -22,6 +21,7 @@ use galaxyui::{
|
||||
AppContext, Element, Entity, ModelHandle, SingletonEntity as _, TypedActionView, View,
|
||||
ViewContext,
|
||||
};
|
||||
use ui_components::{button, Component as _, Options as _};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum IntentionSlideAction {
|
||||
@@ -260,10 +260,11 @@ impl IntentionSlide {
|
||||
.with_main_axis_size(MainAxisSize::Min)
|
||||
.with_cross_axis_alignment(CrossAxisAlignment::Start);
|
||||
for &item in items {
|
||||
let icon_el = ConstrainedBox::new(Icon::Check.to_galaxyui_icon(check_fill).finish())
|
||||
.with_width(16.)
|
||||
.with_height(16.)
|
||||
.finish();
|
||||
let icon_el =
|
||||
ConstrainedBox::new(Icon::Check.to_galaxyui_icon(check_fill).finish())
|
||||
.with_width(16.)
|
||||
.with_height(16.)
|
||||
.finish();
|
||||
let text_el = appearance
|
||||
.ui_builder()
|
||||
.paragraph(item.to_string())
|
||||
|
||||
@@ -2,9 +2,6 @@ use crate::model::OnboardingStateModel;
|
||||
use crate::OnboardingEvent;
|
||||
|
||||
use super::OnboardingSlide;
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use ui_components::{button, Component as _, Options as _};
|
||||
use galaxy_core::send_telemetry_from_ctx;
|
||||
use galaxy_core::ui::{appearance::Appearance, theme::color::internal_colors, Icon};
|
||||
use galaxyui::{
|
||||
@@ -20,6 +17,9 @@ use galaxyui::{
|
||||
AppContext, Element, Entity, ModelHandle, SingletonEntity as _, TypedActionView, View,
|
||||
ViewContext,
|
||||
};
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use ui_components::{button, Component as _, Options as _};
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum IntroSlideEvent {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
use pathfinder_geometry::vector::{vec2f, Vector2F};
|
||||
use galaxyui::{
|
||||
assets::asset_cache::AssetSource,
|
||||
elements::{
|
||||
@@ -10,6 +9,7 @@ use galaxyui::{
|
||||
AfterLayoutContext, AppContext, Element, EventContext, LayoutContext, PaintContext,
|
||||
SizeConstraint,
|
||||
};
|
||||
use pathfinder_geometry::vector::{vec2f, Vector2F};
|
||||
|
||||
// Onboarding images live under `app/assets/async/` so they are excluded from the WASM
|
||||
// binary (RustEmbed excludes `async/**` on wasm targets). They are still bundled normally
|
||||
|
||||
@@ -2,7 +2,6 @@ use crate::model::OnboardingStateModel;
|
||||
use crate::slides::{bottom_nav, layout, slide_content};
|
||||
use crate::telemetry::OnboardingEvent;
|
||||
use crate::visuals::project_visual;
|
||||
use ui_components::{button, keyboard_shortcut, Component as _, Options as _};
|
||||
use galaxy_core::send_telemetry_from_ctx;
|
||||
use galaxy_core::ui::{
|
||||
appearance::Appearance, color::coloru_with_opacity, theme::color::internal_colors, Icon,
|
||||
@@ -21,6 +20,7 @@ use galaxyui::{
|
||||
AppContext, Element, Entity, ModelHandle, SingletonEntity as _, TypedActionView, View,
|
||||
ViewContext,
|
||||
};
|
||||
use ui_components::{button, keyboard_shortcut, Component as _, Options as _};
|
||||
|
||||
use super::OnboardingSlide;
|
||||
|
||||
|
||||
@@ -4,8 +4,6 @@ use crate::slides::{bottom_nav, layout, slide_content};
|
||||
use crate::telemetry::OnboardingEvent;
|
||||
use crate::visuals::theme_picker_visual;
|
||||
use crate::OnboardingIntention;
|
||||
use pathfinder_color::ColorU;
|
||||
use ui_components::{button, Component as _, Options as _};
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxy_core::send_telemetry_from_ctx;
|
||||
use galaxy_core::ui::{appearance::Appearance, theme::color::internal_colors, theme::WarpTheme};
|
||||
@@ -22,6 +20,8 @@ use galaxyui::{
|
||||
ui_components::components::{UiComponent, UiComponentStyles},
|
||||
AppContext, Element, Entity, ModelHandle, SingletonEntity, TypedActionView, View, ViewContext,
|
||||
};
|
||||
use pathfinder_color::ColorU;
|
||||
use ui_components::{button, Component as _, Options as _};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum ThemePickerSlideEvent {
|
||||
|
||||
@@ -4,7 +4,6 @@ use crate::model::{OnboardingStateEvent, OnboardingStateModel};
|
||||
use crate::slides::{bottom_nav, layout, slide_content};
|
||||
use crate::OnboardingIntention;
|
||||
|
||||
use ui_components::{button, Component as _, Options as _};
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
use galaxy_core::ui::theme::color::internal_colors;
|
||||
use galaxyui::prelude::Align;
|
||||
@@ -20,6 +19,7 @@ use galaxyui::{
|
||||
AppContext, Element, Entity, ModelHandle, SingletonEntity as _, TypedActionView, View,
|
||||
ViewContext,
|
||||
};
|
||||
use ui_components::{button, Component as _, Options as _};
|
||||
|
||||
/// Which setting card is currently expanded.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
use pathfinder_geometry::vector::Vector2F;
|
||||
use galaxy_core::ui::theme::Fill;
|
||||
use galaxy_core::ui::{appearance::Appearance, theme::color::internal_colors};
|
||||
use galaxyui::prelude::Align;
|
||||
@@ -14,6 +13,7 @@ use galaxyui::{
|
||||
text_layout::TextAlignment,
|
||||
AppContext, Element,
|
||||
};
|
||||
use pathfinder_geometry::vector::Vector2F;
|
||||
|
||||
pub(super) type ClickCallback = Box<dyn FnMut(&mut EventContext, &AppContext, Vector2F) + 'static>;
|
||||
pub(super) type HoverCallback =
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
use super::agent_slide::AgentSlideAction;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use galaxy_core::ui::{
|
||||
appearance::Appearance,
|
||||
icons::Icon,
|
||||
@@ -15,6 +14,7 @@ use galaxyui::{
|
||||
platform::Cursor,
|
||||
Element,
|
||||
};
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
|
||||
pub(super) struct TwoLineButtonSpec {
|
||||
pub(super) is_selected: bool,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use galaxy_core::telemetry::{EnablementState, TelemetryEvent, TelemetryEventDesc};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::{json, Value};
|
||||
use strum_macros::{EnumDiscriminants, EnumIter};
|
||||
use galaxy_core::telemetry::{EnablementState, TelemetryEvent, TelemetryEventDesc};
|
||||
|
||||
/// Telemetry events for the onboarding flow.
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, EnumDiscriminants)]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use pathfinder_color::ColorU;
|
||||
use galaxyui::elements::Align;
|
||||
use galaxyui::Element;
|
||||
use pathfinder_color::ColorU;
|
||||
|
||||
use super::onboarding_visual::{OnboardingVisual, Pill, RectPct};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use pathfinder_color::ColorU;
|
||||
use galaxyui::elements::Align;
|
||||
use galaxyui::Element;
|
||||
use pathfinder_color::ColorU;
|
||||
|
||||
use crate::visuals::onboarding_visual::Rect;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use pathfinder_color::ColorU;
|
||||
use galaxyui::elements::Align;
|
||||
use galaxyui::Element;
|
||||
use pathfinder_color::ColorU;
|
||||
|
||||
use super::onboarding_visual::{OnboardingVisual, Pill, RectPct};
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
use pathfinder_color::ColorU;
|
||||
use galaxy_core::ui::Icon;
|
||||
use galaxyui::assets::asset_cache::{AssetCache, AssetSource, AssetState};
|
||||
use galaxyui::geometry::rect::RectF;
|
||||
@@ -10,6 +9,7 @@ use galaxyui::{
|
||||
AfterLayoutContext, AppContext, Element, EventContext, LayoutContext, PaintContext,
|
||||
SingletonEntity as _, SizeConstraint,
|
||||
};
|
||||
use pathfinder_color::ColorU;
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub(crate) struct RectPct {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use pathfinder_color::ColorU;
|
||||
use galaxy_core::ui::Icon;
|
||||
use galaxyui::elements::Align;
|
||||
use galaxyui::Element;
|
||||
use pathfinder_color::ColorU;
|
||||
|
||||
use super::onboarding_visual::{IconPct, OnboardingVisual, Pill, RectPct};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user