diff --git a/designs/chat-choice-card/README.md b/designs/chat-choice-card/README.md new file mode 100644 index 00000000000..76da6377428 --- /dev/null +++ b/designs/chat-choice-card/README.md @@ -0,0 +1,98 @@ +# Multiple-choice card in Harness chats (designs only) + +Tracker v0nwyk. Daniel, 1 Dec: "we also need a card for multiple choices in the harness chats". +No app code changes. All content in the images is sample content. + +These are static mockups, not screenshots of the app. They use the `--hx-*` theme colours, the Hub +Needs-you card (27xp64), the Hub dock chat, and the app's project chat bubbles. The shells around the +chat are simplified and the font is the system fallback. + +## Images + +Each name below has a `-light.png` and a `-dark.png` version. + +| Surface | In the chat | Dialogs: multi-select, Other, three confirms | All card states | +| ------- | --------------------- | -------------------------------------------- | ----------------- | +| Hub web | `web-1-in-chat` | `web-2-sheets` | `web-3-states` | +| Mac app | `mac-1-in-chat` | `mac-2-sheets` | `mac-3-states` | +| iPhone | `iphone-1-in-chat` | `iphone-2-sheets` | `iphone-3-states` | + +- `web-4-phone-width`: Hub web in a phone browser. +- `iphone-4-narrow-long`: long labels at 390 and 320 pt, a clickable link, and the full-text sheet. +- `directions`: the three directions to choose from. + +## Chosen direction + +**A. Tiles in the thread, one tap.** Daniel, 1 Dec: "Now lets go with in thread tiles." Every image +except `directions` shows A. It looks and behaves like the Needs-you card, so there is one pattern to +learn and build. The card can scroll out of view if the conversation continues. All states in the +brief are drawn for A on Hub web, Mac and iPhone, light and dark; none are missing. + +## Explored, not chosen + +`directions-{light,dark}.png` shows all three. + +- **B. Docked above the message box.** The question stays in reach while you ask follow-ups, and the + thread keeps a one-line marker. It takes much of the phone screen and needs a rule for several + open questions. +- **C. Small card, then pick and Send.** The card stays short, and single and multi-select work the + same way. A mis-tap cannot send an answer, but every answer takes at least three taps. + +## Decisions (direction A) + +- **Layout:** two columns in the Hub and Mac chat panels, one column on phones. The recommended option + comes first, with a small badge and a gold edge. Each option has a meaningful label and a one-line + effect. "Other…" is always the last tile. +- **No form in the thread** (design-patterns rule 1; the thread is a list): Other, multi-select and + confirm open a dialog (Hub, Mac) or a bottom sheet (phone). +- **One tap sends** an ordinary choice. +- **Confirm:** the tile says "Confirms deploy", "Confirms money" or "Confirms secret" before you tap. + The dialog lists what changes and whether it can be undone. iPhone then asks for Face ID. A secret + value is never shown. A retry asks for confirmation again. +- **Multi-select:** the card lists the option names as chips; a chip or "Choose…" opens the sheet. + Nothing is pre-ticked, even recommended options. Send shows the count and is disabled at zero. +- **Long text:** labels wrap and are never cut. Effects stop at two lines, with "Read full + descriptions" below the tiles. Authors should aim for about 90 characters. +- **Links:** an option with a link gets a clickable link and a separate "Choose" button, as the Hub + Needs-you card does today. +- **Answered:** the card shrinks to the question, the pick, who answered, from which device (or how) + and when, in Lisbon time. "Show all options" reopens it read-only. +- **Superseded or expired:** the buttons are removed, with a plain reason and, if there is a newer + question, a link to it. +- **Sending:** the pick is outlined with a spinner and the other tiles dim. +- **Failed:** the pick is kept, with "Try again" and "Change pick". If delivery is unconfirmed, the + only action is "Check status", so an answer cannot be sent twice. +- **Offline (Mac, iPhone):** "Waiting to send" with "Cancel send". The state images draw sending, + failed and queued for ordinary choices only. +- **Motion** (rule 4, not visible in still images): show the pick, then ease the card into the + answered receipt over about 300 ms. Respect reduced motion. +- **Same question in two places:** the chat card and the Needs-you card read one ask. Answering + either one updates both. + +## What the build would need beyond today's data + +- Today an ask has 2 to 4 options (label up to 80 characters, effect up to 400), at most one + recommended, and one `confirm` kind for the **whole ask**. Multi-select does not exist: it needs a + select-many flag, several recommended options and several recorded picks. +- Because confirm covers the whole ask, today every option in a deploy ask stops at the confirm step, + including "Keep on staging". The images tag only the risky option, which needs per-option confirm. +- "Replaced" and "Closed" need the chat to keep old asks with the reason they ended. "Change pick", + "Cancel send" and "Check status" also need explicit support. +- The iPhone images use a full-height chat. The app's project chat is currently a bottom sheet at up + to 85% height; this card does not require changing that. +- Today's iPhone confirm is a native alert followed by Face ID. The images propose a sheet with the + facts, then Face ID. The fact rows (project, amount, undo) would be new data. +- The Hub button keeps today's wording, "Confirm answer". + +## Decisions and open questions + +Direction is decided (A). One question remains, with a recommendation: + +1. **Decided (Daniel, 1 Dec):** only risky options ask for confirmation, as drawn, not the whole question. Today "Keep on staging" in a deploy question also stops at a confirm step, which is friction for a safe choice. Cost: confirm becomes per option. +2. **Open:** should multi-select be part of the first build? It needs new ask data. Recommendation: no. Ship single-choice and "Other" first; the multi-select sheet is drawn and can follow once asks can carry several picks. + +## Checks on the mockups + +- A script found no sideways overflow and no clipped chat cards or dialogs in the 24 images. +- A sample of the images was also inspected by eye for spacing, labels and both themes. +- Colour contrast was not measured, and nothing was tested in the running apps. diff --git a/designs/chat-choice-card/directions-dark.png b/designs/chat-choice-card/directions-dark.png new file mode 100644 index 00000000000..b1ee4f26c6c Binary files /dev/null and b/designs/chat-choice-card/directions-dark.png differ diff --git a/designs/chat-choice-card/directions-light.png b/designs/chat-choice-card/directions-light.png new file mode 100644 index 00000000000..f8c6edd9d6e Binary files /dev/null and b/designs/chat-choice-card/directions-light.png differ diff --git a/designs/chat-choice-card/iphone-1-in-chat-dark.png b/designs/chat-choice-card/iphone-1-in-chat-dark.png new file mode 100644 index 00000000000..a62afca8c74 Binary files /dev/null and b/designs/chat-choice-card/iphone-1-in-chat-dark.png differ diff --git a/designs/chat-choice-card/iphone-1-in-chat-light.png b/designs/chat-choice-card/iphone-1-in-chat-light.png new file mode 100644 index 00000000000..19c07a316ca Binary files /dev/null and b/designs/chat-choice-card/iphone-1-in-chat-light.png differ diff --git a/designs/chat-choice-card/iphone-2-sheets-dark.png b/designs/chat-choice-card/iphone-2-sheets-dark.png new file mode 100644 index 00000000000..bd5ef85a8d0 Binary files /dev/null and b/designs/chat-choice-card/iphone-2-sheets-dark.png differ diff --git a/designs/chat-choice-card/iphone-2-sheets-light.png b/designs/chat-choice-card/iphone-2-sheets-light.png new file mode 100644 index 00000000000..a9960408915 Binary files /dev/null and b/designs/chat-choice-card/iphone-2-sheets-light.png differ diff --git a/designs/chat-choice-card/iphone-3-states-dark.png b/designs/chat-choice-card/iphone-3-states-dark.png new file mode 100644 index 00000000000..c6580db2406 Binary files /dev/null and b/designs/chat-choice-card/iphone-3-states-dark.png differ diff --git a/designs/chat-choice-card/iphone-3-states-light.png b/designs/chat-choice-card/iphone-3-states-light.png new file mode 100644 index 00000000000..af17ee2c45d Binary files /dev/null and b/designs/chat-choice-card/iphone-3-states-light.png differ diff --git a/designs/chat-choice-card/iphone-4-narrow-long-dark.png b/designs/chat-choice-card/iphone-4-narrow-long-dark.png new file mode 100644 index 00000000000..ede5fa80ac9 Binary files /dev/null and b/designs/chat-choice-card/iphone-4-narrow-long-dark.png differ diff --git a/designs/chat-choice-card/iphone-4-narrow-long-light.png b/designs/chat-choice-card/iphone-4-narrow-long-light.png new file mode 100644 index 00000000000..1d90fc19684 Binary files /dev/null and b/designs/chat-choice-card/iphone-4-narrow-long-light.png differ diff --git a/designs/chat-choice-card/mac-1-in-chat-dark.png b/designs/chat-choice-card/mac-1-in-chat-dark.png new file mode 100644 index 00000000000..08ff241551c Binary files /dev/null and b/designs/chat-choice-card/mac-1-in-chat-dark.png differ diff --git a/designs/chat-choice-card/mac-1-in-chat-light.png b/designs/chat-choice-card/mac-1-in-chat-light.png new file mode 100644 index 00000000000..d872b1452b4 Binary files /dev/null and b/designs/chat-choice-card/mac-1-in-chat-light.png differ diff --git a/designs/chat-choice-card/mac-2-sheets-dark.png b/designs/chat-choice-card/mac-2-sheets-dark.png new file mode 100644 index 00000000000..1cbc6917ad3 Binary files /dev/null and b/designs/chat-choice-card/mac-2-sheets-dark.png differ diff --git a/designs/chat-choice-card/mac-2-sheets-light.png b/designs/chat-choice-card/mac-2-sheets-light.png new file mode 100644 index 00000000000..aedaa9422f7 Binary files /dev/null and b/designs/chat-choice-card/mac-2-sheets-light.png differ diff --git a/designs/chat-choice-card/mac-3-states-dark.png b/designs/chat-choice-card/mac-3-states-dark.png new file mode 100644 index 00000000000..895002cd121 Binary files /dev/null and b/designs/chat-choice-card/mac-3-states-dark.png differ diff --git a/designs/chat-choice-card/mac-3-states-light.png b/designs/chat-choice-card/mac-3-states-light.png new file mode 100644 index 00000000000..7f9d311f8ac Binary files /dev/null and b/designs/chat-choice-card/mac-3-states-light.png differ diff --git a/designs/chat-choice-card/web-1-in-chat-dark.png b/designs/chat-choice-card/web-1-in-chat-dark.png new file mode 100644 index 00000000000..374c976b0fe Binary files /dev/null and b/designs/chat-choice-card/web-1-in-chat-dark.png differ diff --git a/designs/chat-choice-card/web-1-in-chat-light.png b/designs/chat-choice-card/web-1-in-chat-light.png new file mode 100644 index 00000000000..41830e7c7f1 Binary files /dev/null and b/designs/chat-choice-card/web-1-in-chat-light.png differ diff --git a/designs/chat-choice-card/web-2-sheets-dark.png b/designs/chat-choice-card/web-2-sheets-dark.png new file mode 100644 index 00000000000..1c2bcba47d0 Binary files /dev/null and b/designs/chat-choice-card/web-2-sheets-dark.png differ diff --git a/designs/chat-choice-card/web-2-sheets-light.png b/designs/chat-choice-card/web-2-sheets-light.png new file mode 100644 index 00000000000..5f1d3fba3cc Binary files /dev/null and b/designs/chat-choice-card/web-2-sheets-light.png differ diff --git a/designs/chat-choice-card/web-3-states-dark.png b/designs/chat-choice-card/web-3-states-dark.png new file mode 100644 index 00000000000..3313ca5e255 Binary files /dev/null and b/designs/chat-choice-card/web-3-states-dark.png differ diff --git a/designs/chat-choice-card/web-3-states-light.png b/designs/chat-choice-card/web-3-states-light.png new file mode 100644 index 00000000000..1a6157b00da Binary files /dev/null and b/designs/chat-choice-card/web-3-states-light.png differ diff --git a/designs/chat-choice-card/web-4-phone-width-dark.png b/designs/chat-choice-card/web-4-phone-width-dark.png new file mode 100644 index 00000000000..2232d126962 Binary files /dev/null and b/designs/chat-choice-card/web-4-phone-width-dark.png differ diff --git a/designs/chat-choice-card/web-4-phone-width-light.png b/designs/chat-choice-card/web-4-phone-width-light.png new file mode 100644 index 00000000000..5aa4c55bf6f Binary files /dev/null and b/designs/chat-choice-card/web-4-phone-width-light.png differ