Components
Publication control
Make publication availability a distinct explicit state, with pending feedback for its specific consequence.
On this page
Purpose and placement
Make publication availability a distinct explicit state, with pending feedback for its specific consequence.
Anatomy
| Part | Behavior |
|---|---|
| Switch | Native checkbox, custom visual track and thumb. |
| State label | Published by default or caller-provided label. |
| Pending feedback | Publishing, Unpublishing or Saving depending on submission mode. |
Configuration and contract
| Input or decision | Implementation |
|---|---|
| AdminPublicationControl | defaultChecked, disabled, label and native input props; controlled checked/onChange are excluded. |
| autoSubmit | Calls the nearest form requestSubmit when the value changes. |
| Form pending | Disables the control, exposes aria-busy and updates polite status text. |
States and feedback
- Published, unpublished and disabled captured.
- Pending feedback is source-defined; no actual publication is attempted.
Usage rules
- Use autoSubmit only when the containing form represents that deliberate state change.
- Do not equate the local switch position with confirmed server publication.
- Keep featured placement, distribution classification and scheduled timing separate.
Accessibility and verification
Source checkbox has keyboard support and peer focus outline. Verify spoken checked state, pending announcement and failure rollback in an isolated transactional test.
Source references
| File | Responsibility |
|---|---|
| components/admin/admin-publication-control.tsx | Audited Townwell implementation; use this file when extending this interface. |
| components/admin/story-editor-form.tsx | Audited Townwell implementation; use this file when extending this interface. |
Examples from the app
Actual Boise Today and Townwell UI with synthetic editorial, business, review, media metadata and analytics. Existing Boise imagery; no live data changes. Captured at 2× resolution or higher. Select an image to inspect it full size.
Related topics
Source audit: 2026-10-07 · Revision ce8bc72b96da · Documentation v0.1