Files
hemx/work/slices/SLICE-0014-html-examples-per-example-pages.md
slhx agent 9dd8e4a944 docs(work): map html examples navigation slices
Add a northstar and ready vertical slices for making html_examples start at an index, splitting implemented examples into focused pages, proving infinite-scroll by scrolling, and keeping smoke/docs/requirements aligned.
2026-06-26 08:18:21 +02:00

61 lines
3.2 KiB
Markdown

---
id: SLICE-0014
type: slice
status: ready
parent: NS-0004
title: Split implemented html_examples into focused per-example pages
refs:
- AGENTS.md
- REQUIREMENTS.md
- examples/html_examples/README.md
- examples/html_examples/src/main.rs
- examples/html_examples/templates/app_shell.heml
- examples/html_examples/templates/gallery.heml
- hemx-xtask/src/main.rs
---
## Objective
Give each currently implemented html_examples pattern a focused page/route so contributors can open, copy, and test one pattern at a time while preserving generated-resource, server-owned-state behavior.
## Authority
- `AGENTS.md` says `examples/html_examples` is the copy-paste HTML pattern gallery for htmx-style examples and should keep exact htmx slugs visible without HTMX syntax, selector targeting, or user-authored browser JavaScript. req: htmx_equivalents/001 req: htmx_equivalents/005 req: examples/007
- `REQUIREMENTS.md` page swap and navigation rows preserve real anchors/history semantics and progressive enhancement boundaries. req: page_swap/007 req: page_swap/008
- Existing generated templates and handlers in `examples/html_examples/src/main.rs` own the implemented dynamic behavior.
## Close when
- Implemented README rows have stable same-origin pages with exact slug names visible in the URL or page heading: `click-to-edit`, `click-to-load`, `delete-row`, `edit-row`, `lazy-load`, `inline-validation`, `active-search`, `progress-bar`, `value-select`, `reset-user-input`, `update-other-content` where represented by existing behavior, and `infinite-scroll` owned by `SLICE-0015`.
- Each page renders only the relevant example content plus minimal navigation back to the index/neighboring examples.
- Existing handlers continue to use generated forms/resources and server-owned Rust state; route splitting must not introduce selector-targeted swaps, user-authored browser JavaScript, or duplicated app state truth.
- Existing implemented interactions continue to work without full-page reload during the interaction itself.
## Allowed files
- `examples/html_examples/src/main.rs`
- `examples/html_examples/templates/app_shell.heml`
- Existing or new `.heml` templates under `examples/html_examples/templates/`
- Existing partial templates under `examples/html_examples/templates/partials/` only if moving markup requires local template boundaries
- `examples/html_examples/README.md` for updated route/page documentation
- `hemx-xtask/src/main.rs` for focused smoke route coverage
- `REQUIREMENTS.md` only if route/page behavior changes durable obligations
## Verification
- `cargo test -p hemx-html-examples`
- `cargo test -p hemx-xtask`
- `cargo run -p hemx-xtask -- html-examples-smoke`
- `redgate health --strict && redgate lint` if `REQUIREMENTS.md` changes
- Manual spot check if needed: from `/`, open several example links directly and verify their heading/slug and dynamic behavior.
## Non-goals
- Do not implement deferred examples such as `bulk-update`, `modal-custom`, or `tabs-hateoas`.
- Do not replace axum routes with a framework-owned router abstraction.
- Do not combine click-triggered `click-to-load` semantics with scroll-triggered `infinite-scroll`; keep their page behavior distinct.
## Evidence
Ready; no implementation evidence yet.