a↗agentbay.AgentBay を入手
マイアカウント ▾
メニュー
← 実践ガイドへ戻る
実践ガイドの出力

画面設計

元のファイルをダウンロード ↓

CRM-142の画面設計

テキストのワイヤーフレームのみで、実行中の画像や実装済み機能ではありません。

Contacts                              [Import contacts]
Keep your customer contacts in one place.
┌ Import contacts ────────────────────────────────────┐
│ CSV stays in this browser.                          │
│ Maximum 100 KB (100,000 bytes), 500 nonblank records.│
│ Required columns: name, email. Optional: company.   │
│ CSV file [Choose file] customer-contacts.csv         │
│ [Review CSV]                    [Back to contacts]  │
│ Review: Ready 3 · Invalid 1 · Duplicate 2            │
│ Record 1 · Jordan Lee · jordan@example.test         │
│ Company: Fieldwork, Inc. · Ready                    │
│ …all six records, each with outcome/reason…         │
│ [ ] Fail next save                                 │
│ [Import ready contacts] [Cancel import]             │
└────────────────────────────────────────────────────┘
Search contacts [Name, email or company]
[Live status]
[Existing contact cards]
▸ Add contact

Import contacts はパネルを開き、次にフォーカスします: CSV file. Review CSV は、ファイル未選択時と読み込み中に無効です。使用するもの: accept=".csv,text/csv" はファイル選択のヒントで、検証ではありません。ファイル選択でエラー、件数、プレビューをリセットし、同じファイルを再選択できるようにします。レビューは明示的なローカル読み込みで、書き込みません。読み込み状態を表示した後、レビュー見出し(tabindex="-1")へフォーカスし、既存の次の領域で件数を通知します: #status。古い読み込み結果が新しい選択を置き換えたり、キャンセル済みパネルを開き直したりしてはなりません。

対象: samples/customer-contacts.csv 比較対象: initialContacts 出所: src/contacts.js:

レコード名前結果 / 表示する理由
1Jordan LeeReady
2Alex DuplicateDuplicate: Email already in Contacts.
3Missing EmailInvalid: Enter a valid email.
4Casey "CJ" KimReady
5Jordan AgainDuplicate: Email repeats earlier valid record 1.
6<img src=x onerror=alert(1)>Ready; display literal text

各レコードの前後の空白を除いたname、email、companyを表示し、companyがなければ「: 」を示します。理由は「Name is required.」や、名前欠落と不正メールが同時にある場合も扱います。引用符内の改行はpre-wrapで読めるようにします。アプリ内で行は編集せず、「Fix invalid rows in your CSV and choose the file again.」と案内します。構造エラーには、例えば「Unclosed quote in record 2. Nothing imported.」と示し、確認を無効にします。上限やヘッダー欠落・重複にも同様に具体的なメッセージを用意します。

確認文:「Import 3 ready contacts; skip 3 invalid or duplicate records.」。ボタンのアクセシブル名は次のまま維持します: Import ready contacts。Readyが0件または保存中なら無効にします。追加の確認モーダルは作りません。保存中は「Saving contacts…」を表示し、ファイル、レビュー、キャンセル、追加による変更を防ぎます。失敗時はプレビュー全体を残し、確認にフォーカスして「Could not save contacts. Try again.」と通知します。再試行でも確認のラベルを維持します。 Fail next save は、実際の保存を1回(AddまたはImport)失敗させる準備をし、消費時にリセットしてアダプターのfailオプションを渡します。連絡先を消しません。

新しいブラウザでサンプルをインポートすると「Added 3 contacts; skipped 3 records.」を表示します。パネルを閉じ、検索を解除して追加した連絡先を見せ、合計5件を描画してImport contactsにフォーカスします。再検証後の実際の件数は異なる場合があります。CancelとBackはImport contactsにフォーカスし、「Import cancelled. Contacts unchanged.」と通知します。検索は解除しません。

すべての操作にラベル、ネイティブのボタン・チェックボックスの意味、論理的なDOMタブ順を備えます。Enterでボタンを起動し、Spaceでデモ用チェックボックスを切り替えます。既存の見えるフォーカスリングを維持し、フォーカストラップは作りません。320pxでは1列とし、操作を折り返し、ファイル入力幅を制限し、長いメール・文字列を折り返します。カードには項目ラベルと結果の文字を残し、色だけで伝えません。デスクトップでは既存の1050px幅と広いカード項目を使い、ページ全体の横スクロールを防ぎます。キーボード、320px、デスクトップの検証は計画段階で、まだ実行していません。

元のファイルと出所の詳細

output/docs/screen-design.md.txt · SHA-256 c2b1dc590b78cce4048445b09ac398e19d11c1bef1b9b255b3a71aeb91e48cd0

# CRM-142 screen design

Text wireframe only; no runtime screenshot or implemented feature.

```text
Contacts                              [Import contacts]
Keep your customer contacts in one place.
┌ Import contacts ────────────────────────────────────┐
│ CSV stays in this browser.                          │
│ Maximum 100 KB (100,000 bytes), 500 nonblank records.│
│ Required columns: name, email. Optional: company.   │
│ CSV file [Choose file] customer-contacts.csv         │
│ [Review CSV]                    [Back to contacts]  │
│ Review: Ready 3 · Invalid 1 · Duplicate 2            │
│ Record 1 · Jordan Lee · jordan@example.test         │
│ Company: Fieldwork, Inc. · Ready                    │
│ …all six records, each with outcome/reason…         │
│ [ ] Fail next save                                 │
│ [Import ready contacts] [Cancel import]             │
└────────────────────────────────────────────────────┘
Search contacts [Name, email or company]
[Live status]
[Existing contact cards]
▸ Add contact
```

`Import contacts` opens the panel and focuses `CSV file`. `Review CSV` is disabled without a selected file and while reading. Use `accept=".csv,text/csv"` as a chooser hint, not validation. File selection resets errors/counts/preview and permits reselecting the same file. Review is an explicit local read; it writes nothing. Show reading status, then focus the review heading (`tabindex="-1"`) and announce counts through existing `#status`. A stale read result must not replace a newer selection or reopen a cancelled panel.

For `samples/customer-contacts.csv` against `initialContacts` from `src/contacts.js`:

| Record | Name | Outcome / visible reason |
| --- | --- | --- |
| 1 | Jordan Lee | Ready |
| 2 | Alex Duplicate | Duplicate — Email already in Contacts. |
| 3 | Missing Email | Invalid — Enter a valid email. |
| 4 | Casey "CJ" Kim | Ready |
| 5 | Jordan Again | Duplicate — Email repeats earlier valid record 1. |
| 6 | `<img src=x onerror=alert(1)>` | Ready; display literal text |

Display every record's trimmed name, email and company; absent company shows “—”. Reasons also cover “Name is required.” and combined missing-name/invalid-email errors. Quoted embedded newlines remain readable with pre-wrap. No in-app row editing: “Fix invalid rows in your CSV and choose the file again.” Structural errors show e.g. “Unclosed quote in record 2. Nothing imported.” and disable confirmation. Limits and missing/duplicate headers have similarly specific messages.

Confirmation copy: “Import 3 ready contacts; skip 3 invalid or duplicate records.” Button accessible name stays `Import ready contacts`; disable when Ready is zero or saving. No additional confirmation modal. While saving show “Saving contacts…” and prevent file/review/cancel/add mutations. On failure keep all preview data, focus confirmation and announce “Could not save contacts. Try again.” Keep the confirmation label for retry. `Fail next save` arms one actual save attempt (Add or Import), resets when consumed, and passes the adapter's fail option; it does not clear contacts.

After successful sample import in a fresh browser: “Added 3 contacts; skipped 3 records.” Close panel, clear search to expose imported contacts, render five total contacts, focus Import contacts. Actual counts may differ after revalidation. Cancel/Back focus Import contacts and announce “Import cancelled. Contacts unchanged.” They do not clear the search.

All controls have labels, native buttons/checkbox semantics and logical DOM tab order; Enter activates buttons, Space toggles the demo checkbox. Retain the existing visible focus ring. No focus trap. At 320px use a single column, wrap actions, constrain file input, and break long emails/text; cards retain visible field labels and outcome text (never color alone). At desktop keep the existing 1050px content width and use wider card fields. No horizontal page scroll. Keyboard, 320px and desktop checks are planned, not executed.