diff --git a/.changeset/bold-deer-caper.md b/.changeset/bold-deer-caper.md new file mode 100644 index 000000000..6da378566 --- /dev/null +++ b/.changeset/bold-deer-caper.md @@ -0,0 +1,5 @@ +--- +type: Changed +pr: 2575 +--- +**The UI consideration probe now asks about loading and error states for interactive controls** — a UI surface classified only as an interactive control (a button, toggle, switch, or slider, with no accompanying form or list) previously had only its long-text state probed, so a spec could omit what the control shows while its action is in flight or when it fails and still pass. Control-only surfaces are now probed for their in-flight and failure states too. (#2151) diff --git a/gsd-core/references/ui-consideration-probe.md b/gsd-core/references/ui-consideration-probe.md index 489c1470b..bbe87a882 100644 --- a/gsd-core/references/ui-consideration-probe.md +++ b/gsd-core/references/ui-consideration-probe.md @@ -30,8 +30,8 @@ bloating this closed core. | id | name | applies to element kinds | consideration question | |----|------|--------------------------|------------------------| | empty | Empty / no data | form, list-collection, media | What is shown when there is no data — zero items, an unfilled form, or absent media? | -| loading | Loading / in-flight | form, list-collection, media, nav | What is shown while data or content is still loading (skeleton, spinner, progressive reveal)? | -| error | Error / failure | form, list-collection, media, nav | What is shown when the load or submit fails (message, retry affordance, partial fallback)? | +| loading | Loading / in-flight | form, list-collection, media, nav, interactive-control | What is shown while data or content is still loading (skeleton, spinner, progressive reveal)? | +| error | Error / failure | form, list-collection, media, nav, interactive-control | What is shown when the load or submit fails (message, retry affordance, partial fallback)? | | populated | Populated / happy path | list-collection, media | What does the normal populated (happy-path) state look like at a typical volume of content? | | partial | Partial / incomplete | form, list-collection | What is shown for partial or incomplete data — some fields or rows present, others missing? | | overflow | Overflow / truncation | list-collection, nav, static-content | What happens when content exceeds its container — scroll, clip, wrap, or truncate? | diff --git a/src/ui-consideration-probe.cts b/src/ui-consideration-probe.cts index fcb30e570..e0a037dee 100644 --- a/src/ui-consideration-probe.cts +++ b/src/ui-consideration-probe.cts @@ -98,8 +98,8 @@ export function classifyElement(text: string): UIElementKind[] { */ export const UI_TAXONOMY: TaxonomyEntry[] = [ { id: 'empty', name: 'Empty / no data', elements: ['form', 'list-collection', 'media'], consideration: 'What is shown when there is no data — zero items, an unfilled form, or absent media?' }, - { id: 'loading', name: 'Loading / in-flight', elements: ['form', 'list-collection', 'media', 'nav'], consideration: 'What is shown while data or content is still loading (skeleton, spinner, progressive reveal)?' }, - { id: 'error', name: 'Error / failure', elements: ['form', 'list-collection', 'media', 'nav'], consideration: 'What is shown when the load or submit fails (message, retry affordance, partial fallback)?' }, + { id: 'loading', name: 'Loading / in-flight', elements: ['form', 'list-collection', 'media', 'nav', 'interactive-control'], consideration: 'What is shown while data or content is still loading (skeleton, spinner, progressive reveal)?' }, + { id: 'error', name: 'Error / failure', elements: ['form', 'list-collection', 'media', 'nav', 'interactive-control'], consideration: 'What is shown when the load or submit fails (message, retry affordance, partial fallback)?' }, { id: 'populated', name: 'Populated / happy path', elements: ['list-collection', 'media'], consideration: 'What does the normal populated (happy-path) state look like at a typical volume of content?' }, { id: 'partial', name: 'Partial / incomplete', elements: ['form', 'list-collection'], consideration: 'What is shown for partial or incomplete data — some fields or rows present, others missing?' }, { id: 'overflow', name: 'Overflow / truncation', elements: ['list-collection', 'nav', 'static-content'], consideration: 'What happens when content exceeds its container — scroll, clip, wrap, or truncate?' }, diff --git a/tests/ui-consideration-probe.test.cjs b/tests/ui-consideration-probe.test.cjs index fb15502f5..d2add5a8e 100644 --- a/tests/ui-consideration-probe.test.cjs +++ b/tests/ui-consideration-probe.test.cjs @@ -83,6 +83,9 @@ describe('ui-consideration-probe: applicableCategories (FILT-01 relevance inters assert.deepEqual(uc.applicableCategories(['list-collection']).sort(), ['empty', 'error', 'loading', 'overflow', 'partial', 'populated', 'zero-one-many']); }); + test('interactive-control raises loading + error + long-text — a control has in-flight and failure states, not just long-text (#2151)', () => { + assert.deepEqual(uc.applicableCategories(['interactive-control']).sort(), ['error', 'loading', 'long-text']); + }); test('no element kinds raises nothing', () => { assert.deepEqual(uc.applicableCategories([]), []); });