feat(ai): add F0AiProcessingOverlay#4533
Conversation
Floating 'applying changes' pill that blurs and locks the wrapped panel/canvas while the assistant regenerates it. Lifts the survey form-builder affordance into the F0AiChat family. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
✅ No New Circular DependenciesNo new circular dependencies detected. Current count: 0 |
🔍 Visual review for your branch is published 🔍Here are the links to: |
📦 Alpha Package Version PublishedUse Use |
|
Coverage Report for packages/react
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Adds a standalone Storybook story (title AI/F0AiProcessingOverlay, autodocs) so the component is browsable on its own, not just embedded in the co-creation flow. Covers active, custom label, and inactive states over a sample panel. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ingOverlay - a11y: gate the spinning icon, pill entrance, and blur transition on useReducedMotion() so reduced-motion users get a static affordance - a11y: add role="status" + aria-live="polite" so the "Applying changes" state is announced to screen readers - test: cover rendering, active/inactive pill, pointer-events lock, custom label, and the focus-drop effect (incl. skipping the one-ai-input chat field) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Description
Adds
F0AiProcessingOverlay, a floating "applying changes" affordance for the F0AiChat family: whileactive, it blurs and locks (pointer-events-none) the wrapped panel/canvas and floats a centered pill (the One icon + a status label) over it, signalling that the surface is being regenerated and shouldn't be edited. It lifts the existing survey form-builder pattern into a reusable component so any surface paired with the chat can use it.Extracted from the co-creation patterns PR (#4307) so it can be reviewed on its own.
Implementation details
F0AiProcessingOverlay(active,label,className,children) undersds/ai, exported fromsds/ai/exports.tsai.applyingChanges("Applying changes") default translation used as the pill's fallback labelVisual behaviour is covered by the component's usage in the co-creation stories.
Breaking changes
None in practice. The
api_breakingbot flags the newai.applyingChangestranslation key becauseTranslationsTyperequires every key, so a consumer who hand-authors a complete translation object from scratch would need to add it. This is intentional and the standard cost of any translatable string:{ ...defaultTranslations, ...overrides }) auto-inherits the new English default, so the vast majority of consumers are unaffected.feat(ai):rather thanfeat!:.