docs(requirements): split convention rows
Add explicit ring fields to convention requirements and split UX convention constraints without changing behavior. req: convention/001 req: convention/002 req: convention/003 req: convention/004 req: convention/005 req: convention/006 req: convention/007 req: convention/008 req: convention/009 req: convention/010 req: convention/011 req: convention/012 req: convention/013 req: convention/014 req: convention/015 req: convention/016 req: convention/017
This commit is contained in:
+33
-9
@@ -1178,31 +1178,55 @@ async fn delete(app: State<App>, todo_id: TodoId) -> impl IntoEffect
|
||||
## convention
|
||||
|
||||
### req: convention/001
|
||||
001 hemx-axum and the JS runtime support common UX conventions as attributes, not core effects: `data-hemx-pending-class`, `data-hemx-indicator`, `data-hemx-confirm`, `data-hemx-debounce`, `data-hemx-delay`, `data-hemx-throttle`, `data-hemx-every`, `data-hemx-interval`, `data-hemx-revealed`, `data-hemx-disable-while-pending`, `data-hemx-policy`, and `data-hemx-on`. These are orthogonal to the core effect algebra.
|
||||
0 001 hemx-axum and the JS runtime support common UX conventions as attributes, not core effects; these remain orthogonal to the core effect algebra.
|
||||
|
||||
### req: convention/002
|
||||
002 Default event triggers: `submit` for forms, `click` for buttons and links. `data-hemx-on` overrides the default for the runtime-supported delegated events: `click`, `submit`, `input`, `change`, `dragstart`, `dragover`, and `drop`. Unsupported static event names are build errors.
|
||||
0 002 Default event triggers are `submit` for forms and `click` for buttons and links; `data-hemx-on` overrides the default.
|
||||
|
||||
### req: convention/003
|
||||
003 `data-hemx-debounce`, `data-hemx-delay`, and `data-hemx-throttle` support simple millisecond values. No trigger mini-language in core.
|
||||
0 003 `data-hemx-debounce`, `data-hemx-delay`, and `data-hemx-throttle` support simple millisecond values. No trigger mini-language in core.
|
||||
|
||||
### req: convention/004
|
||||
004 `data-hemx-confirm` dispatches a native `confirm()` before handler dispatch. Static empty confirmation messages are build errors because they silently disable the guard in browsers. Custom confirm UI belongs to integration crates.
|
||||
0 004 `data-hemx-confirm` dispatches a native `confirm()` before handler dispatch.
|
||||
|
||||
### req: convention/005
|
||||
005 `data-hemx-every` and `data-hemx-interval` dispatch a handle at a fixed interval while the element remains in the document. `data-hemx-revealed` dispatches once when the element enters view, with an immediate fallback when `IntersectionObserver` is unavailable. Duplicate timers/observers per root are avoided.
|
||||
0 005 `data-hemx-every` and `data-hemx-interval` dispatch a handle at a fixed interval while the element remains in the document.
|
||||
|
||||
### req: convention/006
|
||||
006 Request concurrency policy (`latest`, `queue`, `drop`, `parallel`) may be declared per handle with `data-hemx-policy`. Default for debounced/input handlers is `latest`; default for form submit is `drop` while pending. Stale EffectBatches from superseded requests must not be applied.
|
||||
0 006 Request concurrency policy (`latest`, `queue`, `drop`, `parallel`) may be declared per handle with `data-hemx-policy`.
|
||||
|
||||
### req: convention/007
|
||||
007 Pending indicators are cosmetic only. The runtime toggles pending classes, `aria-busy`, indicator visibility, and disabled controls around request/effect execution; handler semantics are unchanged.
|
||||
0 007 Pending indicators are cosmetic only. The runtime toggles pending classes, `aria-busy`, indicator visibility, and disabled controls around request/effect execution; handler semantics are unchanged.
|
||||
|
||||
### req: convention/008
|
||||
008 `data-hemx-disable-while-pending` disables the triggering form controls or button while the request is active and restores them afterward.
|
||||
0 008 `data-hemx-disable-while-pending` disables the triggering form controls or button while the request is active and restores them afterward.
|
||||
|
||||
### req: convention/009
|
||||
009 Unknown `data-hemx-*` authoring attributes are build errors with a suggested fix. hemx-owned attributes are a checked contract, not a silent extension namespace; opaque/integration islands should use explicit allowed attributes or their own non-hemx `data-*` names.
|
||||
0 009 Unknown `data-hemx-*` authoring attributes are build errors with a suggested fix; opaque/integration islands must use explicit allowed attributes or their own non-hemx `data-*` names.
|
||||
|
||||
### req: convention/010
|
||||
0 010 Supported cosmetic convention attributes include `data-hemx-pending-class`, `data-hemx-indicator`, `data-hemx-confirm`, and `data-hemx-disable-while-pending`.
|
||||
|
||||
### req: convention/011
|
||||
0 011 Supported timing/trigger convention attributes include `data-hemx-debounce`, `data-hemx-delay`, `data-hemx-throttle`, `data-hemx-every`, `data-hemx-interval`, `data-hemx-revealed`, `data-hemx-policy`, and `data-hemx-on`.
|
||||
|
||||
### req: convention/012
|
||||
0 012 Runtime-supported delegated events are `click`, `submit`, `input`, `change`, `dragstart`, `dragover`, and `drop`; unsupported static event names are build errors.
|
||||
|
||||
### req: convention/013
|
||||
0 013 Static empty confirmation messages are build errors: they silently disable the guard in browsers. Custom confirm UI belongs to integration crates.
|
||||
|
||||
### req: convention/014
|
||||
0 014 `data-hemx-revealed` dispatches once when the element enters view, with an immediate fallback when `IntersectionObserver` is unavailable.
|
||||
|
||||
### req: convention/015
|
||||
0 015 Duplicate timers/observers per root are avoided.
|
||||
|
||||
### req: convention/016
|
||||
0 016 Default concurrency policy for debounced/input handlers is `latest`; default for form submit is `drop` while pending.
|
||||
|
||||
### req: convention/017
|
||||
0 017 Stale EffectBatches from superseded requests must not be applied.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user