fix(examples): use lower-aware slot html updates

Move canonical examples and docs off direct RenderSlotExt render shortcuts so slot updates use generated render/lowering before HTML replacement, preserving runtime metadata for follow-up interactions.

req: component/003

req: runtime/001

req: dx/006

req: examples/003
This commit is contained in:
slhx agent
2026-06-02 01:48:10 +02:00
parent e0c4633d25
commit 732e65008e
6 changed files with 10 additions and 9 deletions
+1 -1
View File
@@ -240,7 +240,7 @@ pub fn apply_board_patch(
PatchResult::Conflict { canonical_board } => Effect::batch((
Effect::set(atoms::BOARD, canonical_board.clone()),
slots::board.render(&BoardView::from(canonical_board)),
slots::board.html(ui::render(&BoardView::from(canonical_board))),
)),
}
}
+2 -2
View File
@@ -6,7 +6,7 @@ mod tests {
use super::ui::{board, board_card};
use hemplate::Hemplate;
use scraper::{Html, Selector};
use slhx::{Effect, IntoEffect, Payload, RenderSlotExt};
use slhx::{Effect, IntoEffect, Payload};
use slhx_test::inspect;
#[derive(Hemplate)]
@@ -27,7 +27,7 @@ mod tests {
#[test]
fn kanban_board_updates_generated_slot() {
fn render_board() -> impl IntoEffect {
board::slots::board.render(&empty_board())
board::slots::board.html(slhx::render(&empty_board()))
}
let effect = inspect(render_board());
+2 -2
View File
@@ -7,7 +7,7 @@ mod tests {
use super::ui::issue_card::handles as card_handles;
use super::ui::issue_lane::events as lane_events;
use hemplate::Hemplate;
use slhx::{Effect, IntoEffect, Payload, RenderSlotExt};
use slhx::{Effect, IntoEffect, Payload};
use slhx_test::inspect;
#[derive(Hemplate)]
@@ -30,7 +30,7 @@ mod tests {
fn techdemo_uses_generated_slots_for_multi_target_updates() {
fn update() -> impl IntoEffect {
(
slots::hero_metrics.render(&FastMetric { label: "fast" }),
slots::hero_metrics.html(slhx::render(&FastMetric { label: "fast" })),
slots::notice.text("typed"),
)
}
+3 -3
View File
@@ -5,7 +5,7 @@ pub mod ui {}
mod tests {
use super::ui::{auth, counter, notifications, page_swap, todos, wizard};
use hemplate::Hemplate;
use slhx::{push, Effect, IntoEffect, NavigateMode, Payload, RenderKeyedSlotExt, RenderSlotExt};
use slhx::{push, Effect, IntoEffect, NavigateMode, Payload, RenderKeyedSlotExt};
use slhx_test::inspect;
#[derive(Clone, Debug)]
@@ -121,9 +121,9 @@ mod tests {
fn page_swap_updates_content_and_history() {
fn load_docs() -> impl IntoEffect {
(
page_swap::slots::content.render(&DocsContent {
page_swap::slots::content.html(slhx::render(&DocsContent {
message: "This page was swapped.",
}),
})),
page_swap::slots::title.text("Docs"),
push("/docs"),
)