new rendering engine
This commit is contained in:
@@ -2,9 +2,9 @@ mod support;
|
||||
|
||||
use application::ConfigService;
|
||||
use domain::{
|
||||
ConfigRepository, ContainerNode, DataSource, DataSourceConfig, DataSourceType, Direction,
|
||||
DisplayHint, DomainEvent, KeyMapping, Layout, LayoutChild, LayoutNode, LayoutPreset, Sizing,
|
||||
WidgetConfig,
|
||||
AlignItems, ConfigRepository, ContainerNode, DataSource, DataSourceConfig, DataSourceType,
|
||||
Direction, DisplayHint, DisplayHintKind, DomainEvent, JustifyContent, KeyMapping, Layout, LayoutChild,
|
||||
LayoutNode, LayoutPreset, Sizing, WidgetConfig,
|
||||
};
|
||||
use std::time::Duration;
|
||||
use support::{InMemoryConfigRepository, InMemoryEventPublisher};
|
||||
@@ -18,7 +18,7 @@ async fn create_widget_persists_and_emits_event() {
|
||||
let config = WidgetConfig::new(
|
||||
1,
|
||||
"weather".into(),
|
||||
DisplayHint::IconValue,
|
||||
DisplayHint::new(DisplayHintKind::IconValue),
|
||||
1,
|
||||
vec![KeyMapping {
|
||||
source_path: "$.temp".into(),
|
||||
@@ -98,6 +98,8 @@ async fn update_layout_persists_and_emits_event() {
|
||||
direction: Direction::Row,
|
||||
gap: 4,
|
||||
padding: 2,
|
||||
justify_content: JustifyContent::Start,
|
||||
align_items: AlignItems::Stretch,
|
||||
children: vec![
|
||||
LayoutChild {
|
||||
sizing: Sizing::Flex(1),
|
||||
@@ -134,6 +136,8 @@ async fn load_preset_replaces_active_layout() {
|
||||
direction: Direction::Column,
|
||||
gap: 0,
|
||||
padding: 0,
|
||||
justify_content: JustifyContent::Start,
|
||||
align_items: AlignItems::Stretch,
|
||||
children: vec![LayoutChild {
|
||||
sizing: Sizing::Flex(1),
|
||||
node: LayoutNode::Leaf(5),
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
use application::DataProjection;
|
||||
use domain::{DisplayHint, KeyMapping, Value, WidgetConfig};
|
||||
use domain::{DisplayHint, DisplayHintKind, KeyMapping, Value, WidgetConfig};
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
fn weather_widget() -> WidgetConfig {
|
||||
WidgetConfig::new(
|
||||
1,
|
||||
"weather".into(),
|
||||
DisplayHint::IconValue,
|
||||
DisplayHint::new(DisplayHintKind::IconValue),
|
||||
10,
|
||||
vec![
|
||||
KeyMapping {
|
||||
@@ -87,7 +87,7 @@ async fn apply_poll_result_only_updates_widgets_bound_to_source() {
|
||||
WidgetConfig::new(
|
||||
2,
|
||||
"portfolio".into(),
|
||||
DisplayHint::KeyValue,
|
||||
DisplayHint::new(DisplayHintKind::KeyValue),
|
||||
20,
|
||||
vec![KeyMapping {
|
||||
source_path: "$.value".into(),
|
||||
|
||||
Reference in New Issue
Block a user