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.
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
---
|
||||
id: SLICE-0015
|
||||
type: slice
|
||||
status: ready
|
||||
parent: NS-0004
|
||||
title: Make infinite-scroll a real scroll-triggered standalone page
|
||||
refs:
|
||||
- AGENTS.md
|
||||
- REQUIREMENTS.md
|
||||
- examples/html_examples/README.md
|
||||
- examples/html_examples/src/main.rs
|
||||
- examples/html_examples/templates/gallery.heml
|
||||
- hemx-xtask/src/main.rs
|
||||
---
|
||||
|
||||
## Objective
|
||||
|
||||
Move `infinite-scroll` out of the crowded root gallery context and prove it as a standalone page where scrolling to a sentinel triggers loading more rows, instead of relying on a click-oriented `Reveal more rows` interaction.
|
||||
|
||||
## Authority
|
||||
|
||||
- `examples/html_examples/README.md` labels `infinite-scroll` implemented and currently describes a revealed sentinel form that posts to the server-owned loading model.
|
||||
- `templates/gallery.heml` currently renders `infinite-scroll` as one section in the root gallery with `data-hemx-revealed="true"` and a visible `Reveal more rows` button.
|
||||
- `AGENTS.md` and `REQUIREMENTS.md` keep examples HTML-shaped, server-owned, progressive, and covered by focused browser smoke. req: htmx_equivalents/001 req: examples/012 req: test/006
|
||||
|
||||
## Close when
|
||||
|
||||
- `/infinite-scroll` or the chosen same-origin slug route opens a focused page headed `infinite-scroll`.
|
||||
- The page starts with enough vertical space/rows or sentinel placement that the user/browser can scroll to trigger the next batch.
|
||||
- Loading more rows is primarily driven by the existing revealed/intersection behavior when the sentinel enters view; the smoke proves rows increase after scrolling, not after clicking a visible load-more button.
|
||||
- A fallback submit control may exist only as progressive enhancement/recovery, but it must not be the primary proof path or make the example look like `click-to-load`.
|
||||
- The server remains the owner of row count/state and returns generated keyed `infinite_row` effects; no selector-targeted rerendering or user-authored browser JavaScript is introduced.
|
||||
|
||||
## Allowed files
|
||||
|
||||
- `examples/html_examples/src/main.rs`
|
||||
- `examples/html_examples/templates/app_shell.heml`
|
||||
- `examples/html_examples/templates/gallery.heml` or a new focused infinite-scroll `.heml` template under `examples/html_examples/templates/`
|
||||
- `examples/html_examples/templates/partials/loaded_row.heml` only if a shared row partial remains the local generated-resource boundary
|
||||
- `examples/html_examples/README.md` only to keep the matrix proof anchor honest
|
||||
- `hemx-xtask/src/main.rs` for the scroll-based smoke proof
|
||||
- `REQUIREMENTS.md` only if the 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 check if needed: open the infinite-scroll page directly, scroll until the sentinel enters view, and confirm additional rows appear without clicking `Reveal more rows`.
|
||||
|
||||
## Non-goals
|
||||
|
||||
- Do not implement virtual scrolling, pagination framework, client cache, or stored DOM patches.
|
||||
- Do not make `click-to-load` scroll-triggered; it should remain the separate click example.
|
||||
- Do not add bespoke browser JavaScript for this example when the runtime's revealed behavior can carry the proof.
|
||||
|
||||
## Evidence
|
||||
|
||||
Ready; no implementation evidence yet.
|
||||
Reference in New Issue
Block a user