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
21 changes: 21 additions & 0 deletions GLOSSARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Benefit Decision Toolkit

Tools for building, previewing, and publishing benefit eligibility screeners.

## Language

**Screener**:
A form an author builds that asks people questions and tells them which benefits they may qualify for.
_Avoid_: Survey, questionnaire

**Published screener**:
A snapshot of a screener that people being screened can open, on its own or from a connected CRM.
_Avoid_: Live screener, public form

**Preview**:
The editor's view of a screener as a person being screened would see it, evaluated against the author's unpublished work.
_Avoid_: Test mode, sandbox

**Screening session**:
One person's pass through a screener, in Preview or on a published screener: their answers, the evaluations of those answers, and the latest results.
_Avoid_: Screening flow, form session, evaluation flow
13 changes: 11 additions & 2 deletions builder-frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ Learn more about deploying your application with the [documentations](https://vi

## Screening results in custom form fields

Both live form renderers and the editor register `screeningResultsModule` from
The screening session (`src/components/shared/screeningSession/screeningSession.tsx`)
and the editor register `screeningResultsModule` from
`src/components/screenerEditor/formJsExtensions/screeningResults/screeningResults.ts`.
Each form has its own service. Preact custom fields can read its reactive snapshot
with `useScreeningResults()` from the adjacent `useScreeningResults.ts`:
Expand All @@ -44,7 +45,7 @@ arrive, including the debounce interval and failed requests. `failed` is true wh
the latest evaluation failed, until one succeeds, so a field can show an error
instead of waiting indefinitely. Previous results remain available while pending.
Snapshots and their results are frozen copies; copy them before sorting or annotating.
The parents handle stale responses before updating the service.
The screening session drops outdated responses before updating the service.

`mode` is `live` for published screeners and preview, and `editor` for sample
results in the editing canvas. Editor samples use the configured benefit IDs and
Expand All @@ -58,6 +59,14 @@ viewer fields. Consumers outside Preact can use `getSnapshot()` and `subscribe()
on the service; `subscribe()` returns an unsubscribe function and updates fire
`screeningResults.changed` on the form's event bus.

## Testing with a real form-js form

Tests that type into a rendered form-js form use `src/testing/formJs.ts`. form-js
redraws a form about 60ms after an import, wiping anything typed before then, and
passes typed text on only after a 300ms pause or when the field loses focus
(`focusout`, which Preact uses for `onBlur`). The helpers wait out the redraw and
send `focusout` so each answer reaches the form at once.

## Print summary

Analysts can place a **Print summary** component anywhere in the form. It opens
Expand Down
288 changes: 0 additions & 288 deletions builder-frontend/src/components/screener/FormRenderer.test.tsx

This file was deleted.

Loading
Loading