feat(yahweh-widget-card): container card-shape compartido para timeline entries
Iter 3 de integración nakui↔yahweh. El card visual pattern (padding consistente + rounded + flex_col + gap) que vivía duplicado en cada timeline entry de nakui-explorer ahora es un widget yahweh reusable. crates/modules/ui_engine/widgets/card/: - pub fn card() -> Div: flex_col + px(12) + py(8) + mb(4) + rounded(4) + gap(2). Sin colores (caller decide via builder). - 1 test smoke. nakui-explorer: - Los 2 timeline entry patterns (Seed/Morphism) pasan de ~7 calls a ~3, intención "card with accent" emerge del nombre. Tests stack: 111 → 112. App-agnostic — el widget no impone paleta, permite themes diversos. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -32,6 +32,7 @@ use gpui::{
|
||||
use nakui_core::event_log::{EventLog, LogEntry};
|
||||
use yahweh_meta_runtime::{preview_value, short_hash, short_uuid};
|
||||
use yahweh_widget_banner::{banner, Banner};
|
||||
use yahweh_widget_card::card;
|
||||
|
||||
const REFRESH_INTERVAL: Duration = Duration::from_secs(2);
|
||||
|
||||
@@ -224,17 +225,10 @@ impl Render for Explorer {
|
||||
.as_ref()
|
||||
.map(|h| format!("schema={}", short_hash(h)))
|
||||
.unwrap_or_else(|| "schema=(legacy)".into());
|
||||
div()
|
||||
.flex()
|
||||
.flex_col()
|
||||
.px(px(12.))
|
||||
.py(px(8.))
|
||||
.mb(px(4.))
|
||||
card()
|
||||
.bg(card_bg)
|
||||
.rounded(px(4.))
|
||||
.border_l_4()
|
||||
.border_color(accent_seed)
|
||||
.gap(px(2.))
|
||||
.child(
|
||||
div()
|
||||
.flex()
|
||||
@@ -297,17 +291,10 @@ impl Render for Explorer {
|
||||
.as_ref()
|
||||
.map(|h| format!("schema={}", short_hash(h)))
|
||||
.unwrap_or_else(|| "schema=(legacy)".into());
|
||||
div()
|
||||
.flex()
|
||||
.flex_col()
|
||||
.px(px(12.))
|
||||
.py(px(8.))
|
||||
.mb(px(4.))
|
||||
card()
|
||||
.bg(card_bg)
|
||||
.rounded(px(4.))
|
||||
.border_l_4()
|
||||
.border_color(accent_morphism)
|
||||
.gap(px(2.))
|
||||
.child(
|
||||
div()
|
||||
.flex()
|
||||
|
||||
Reference in New Issue
Block a user