Upload feature (f): demo scenarios (upload-slow/fail) + a11y (file-input label)
- upload-slow/upload-fail scenarios simulated in the adapter (XHR POST bypasses the HTTP interceptor); categories/status/delete already honour the global slow/error - file-input gets a per-category accessible name (aria-label + visible button text) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,15 @@
|
||||
export type Scenario = 'default' | 'slow' | 'loading' | 'empty' | 'error';
|
||||
export type Scenario =
|
||||
| 'default'
|
||||
| 'slow'
|
||||
| 'loading'
|
||||
| 'empty'
|
||||
| 'error'
|
||||
// upload-only (the multipart POST is hand-written XHR, so it bypasses the HTTP
|
||||
// interceptor — these are simulated in upload.adapter.ts instead):
|
||||
| 'upload-slow'
|
||||
| 'upload-fail';
|
||||
|
||||
const VALID: Scenario[] = ['default', 'slow', 'loading', 'empty', 'error'];
|
||||
const VALID: Scenario[] = ['default', 'slow', 'loading', 'empty', 'error', 'upload-slow', 'upload-fail'];
|
||||
|
||||
/** Reads ?scenario= from the URL so a demo can force each async state. */
|
||||
export function currentScenario(): Scenario {
|
||||
|
||||
Reference in New Issue
Block a user