Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions Examples/OperationsWorkbench/LIBRARY_FRICTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Operations Workbench Library Friction

This started as a running build log of rough edges that showed up while creating the deep V2 example. The original list below has now been addressed in Ity 2.2.0, and the notes are retained as a release checklist plus a record of what changed.

## Fixed In 2.2.0

* Browser examples now have a first-class runner via `npm run examples:serve`, plus an [Examples/index.html](../index.html) launcher.
* Router base-path authoring no longer needs manual `href` joining. `router.href(path)` and `router.link(path)` cover that directly.
* Sanitization policy no longer has to be process-global. `createConfig()` enables per-app and per-render HTML policy.
* Complex forms no longer have to be entirely application code. `formState()` now covers field binding, normalization, dirty/touched state, validation, reset, and validated submits.
* Components now accept structured props through `props` and `ctx.prop(name)`.
* Shadow DOM links can use `router.link(path)` directly instead of relying on document-level interception alone.
* Direct DOM event wiring no longer needs manual promise swallowing in app code. `action.run()`, `action.with()`, `action.from()`, and `form.handleSubmit()` cover that case.
* Form submits now synchronize current control values before validation, which closed the last major drift case exposed by the workbench.

## Residual Notes

* Large screens still rely on application discipline around state partitioning and render ownership. The single top-level `render()` approach works, but Ity does not try to add keyed reconciliation or component-local diffing.
* Rich form workflows are much better with `formState()`, but schema-driven forms, async field validation, and nested field-array helpers are still intentionally out of scope for the core.
38 changes: 38 additions & 0 deletions Examples/OperationsWorkbench/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Operations Workbench

`Operations Workbench` is a full local-first Ity 2.2 example. It is intentionally larger than the other demos and exercises the V2 surface as an integrated application instead of isolated snippets.

## What It Shows

* `resource()` for cancellable async workspace loading from local storage.
* `action()` for task status changes, checklist toggles, deletes, and resets.
* `formState()` for task, note, settings, and import flows.
* `store()` for view state and persisted UI preferences.
* `Router` base-path handling plus `router.link()` across dashboard, task, notes, reports, and settings pages.
* `component()` props for reusable metric, task-card, and relative-time custom elements.
* `unsafeHTML()` plus `createConfig({ sanitizeHTML })` for bulletin and report preview rendering.
* `renderToString()` for a shareable status report view.

## Run It Locally

1. Install dependencies: `npm install`
2. Start the example server: `npm run examples:serve`
3. Open [../index.html](../index.html) or [index.html](./index.html)

The app persists its workspace to `localStorage` under `ity-operations-workbench`. Use the Settings page to reset or import data.

## Test It

Run the example coverage with the normal test suite:

```bash
npm test -- --runInBand
```

The dedicated example test file is [../../test/operationsWorkbenchExample.test.ts](../../test/operationsWorkbenchExample.test.ts).

## Files

* App source: [operationsWorkbenchApp.ts](./operationsWorkbenchApp.ts)
* Local runner: [index.html](./index.html)
* Library friction notes: [LIBRARY_FRICTION.md](./LIBRARY_FRICTION.md)
Loading
Loading