Sub topic 6
Turn the flow into screens and states
This chapter assumes you have already named your riskiest assumption and mapped one user flow, such as the trip search flow from the previous chapter: home, results, detail. You should be able to read simple HTML or use a design tool with frames and links. Here you convert that flow into a concrete list of screens and the states each screen can be in.
Why flows are not yet screens
A flow is a sequence of steps. A screen is something a participant sees. A single step can need several screens, and a single screen can show different things depending on what has happened.
Take the step "user searches for a trip." The flow box says one thing. The participant will see:
- an empty search form,
- the form with their input,
- a loading moment,
- a results list,
- possibly a "nothing found" message.
If you build only the happy path, the participant has no way to react to anything else. The first time they type something unexpected, the prototype has nothing to show, and the session turns into you apologizing.
Screens versus states
Use these two terms consistently.
- A screen is a distinct view with its own purpose, such as Home, Results or Trip detail.
- A state is a variation of one screen caused by data or events. Examples are empty, loading, filled, error and success.
The distinction matters for effort. A new screen usually means a new frame or page. A new state often means a small change to an existing one: a different message, a disabled button, an extra row.
| Question | If yes | Example |
|---|---|---|
| Does the participant's goal change? | New screen | Results to Trip detail |
| Is it the same view with different data or feedback? | New state | Results with 3 items, or with 0 items |
| Does it appear on top of the current view and return to it? | State of that screen, often an overlay | A "Sign in to save" dialog |
Step 1: List screens from the flow
Walk through your flow one step at a time and write down the view the participant needs at each step. Name screens with a noun, not a verb: results, not show-results. Short lowercase names will later double as page IDs or frame names, and you will see them in your click log.
For the trip flow:
home: search entry point.results: list of matching trips.detail: one trip with price and dates.
Keep the list to what the flow needs. If a screen is not on the path the participant will walk, or one of the plausible detours, leave it out. The riskiest assumption decides this. If you are testing whether people understand the pricing on the detail screen, a polished account-settings page is wasted work.
Step 2: Add states for each screen
For each screen, ask these prompts. Most screens need only two or three states.
- Empty: what does it look like before any data exists?
- Loading: is there a wait that the participant will notice?
- Filled: the normal case with realistic data.
- Error: what if input is wrong or something fails?
- Success: is there confirmation after an action?
Then decide which states are worth building. A state earns its place when one of these is true:
- The participant is likely to reach it during the task.
- It tests your riskiest assumption directly.
- Leaving it out would make the prototype visibly broken.
A loading spinner for a 200 ms request rarely meets that bar. A "no results" message for a search that participants might plausibly make does.
A state inventory
Write the inventory down before opening any tool. A table works well.
| Screen | States to build | States to skip | Reason |
|---|---|---|---|
| `home` | Empty form | Validation errors | Task gives a clear scenario, so bad input is unlikely |
| `results` | Filled (3 trips), empty | Loading | Empty result is a plausible detour; loading is brief |
| `detail` | Filled | Sold-out variant | Not tied to the assumption under test |
This table is also your build checklist and, later, a reference when you write tasks. A task that a participant can only finish by passing through a skipped state is a task you cannot run.
Mapping states as a diagram
Screens and the states within them form a small state machine. Drawing it shows missing transitions before you build anything.
Read the diagram for two kinds of gaps. A state with no arrow out is a dead end, so the participant gets stuck for reasons unrelated to your question. A state with no arrow in is unreachable, so you built it for nothing.
Step 3: Decide how states will be reached
In a real product, data decides which state appears. In a clickable prototype, you decide, and there are three common approaches.
- Separate screens per state. Build
results-filledandresults-emptyas two frames or sections. This is the simplest and works in every tool. - Triggered by a participant action. The "no results" state appears only if they pick a particular option. This feels more real but requires you to predict their choices.
- Moderator-controlled. You switch states during the session, for example by pressing a key. This is flexible but easy to get wrong while you are also taking notes.
For a first prototype, use approach 1. Every state is a separate screen, and each hotspot points at exactly one of them.
Building states in plain HTML
The HTML example from this tutorial's code sample uses one section per screen and shows one at a time. A state can be added the same way: it is just another section with its own ID.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Trip planner prototype with states</title>
</head>
<body>
<section id="home" class="screen">
<h1>Plan a weekend trip</h1>
<button data-goto="results-filled">Search beaches</button>
<button data-goto="results-empty">Search the Arctic</button>
</section>
<section id="results-filled" class="screen">
<h1>3 trips found</h1>
<button data-goto="detail">Lisbon, 2 nights</button>
<button data-goto="home">Back</button>
</section>
<section id="results-empty" class="screen">
<h1>No trips match your search</h1>
<p>Try a different destination or date.</p>
<button data-goto="home">Change search</button>
</section>
<section id="detail" class="screen">
<h1>Lisbon, 2 nights</h1>
<button data-goto="results-filled">Back to results</button>
<button data-goto="home">Start over</button>
</section>
<script>
const clickLog = [];
function show(id) {
document.querySelectorAll('.screen').forEach(function (s) {
s.hidden = s.id !== id;
});
}
document.addEventListener('click', function (e) {
const link = e.target.closest('[data-goto]');
if (!link) return;
clickLog.push({ to: link.dataset.goto, at: Date.now() });
show(link.dataset.goto);
});
show('home');
</script>
</body>
</html>Each state has an ID that matches the inventory table, so the click log reads like a record of the path the participant took. Notice that results-filled and results-empty are both reachable from home, and both lead somewhere. That mirrors the state diagram.
Naming conventions that save you later
Use one pattern for every screen and state: screen or screen-state. Examples are home, results-filled, results-empty, detail. Reasons to be strict about this:
- The names appear in your click log and your notes, so you need them to be unambiguous.
- Design tools list frames alphabetically, so a shared prefix groups the states of one screen.
- You will refer to them in the test script's observation notes, and vague names like
screen2-finalcause confusion.
Common mistakes
- Building only the happy path. The participant makes one unexpected move and the prototype has no response. Build at least the plausible detours.
- Building every state. Edge cases the participant will not reach cost time and test nothing.
- Dead ends. Every screen and state needs at least one working exit, usually a Back or Start over control.
- Hidden state differences. If
results-filledandresults-emptylook nearly identical, the participant may not notice the change. Make the difference obvious in the heading or message. - Confusing state with screen. Duplicating a whole page to change one label is a sign you need a state, not a screen. In design tools, look for variants or components. In HTML, change only the part that differs.
Check before moving on
Before you add content, confirm that:
- Every step in your flow has at least one screen.
- Each screen has an entry in the state inventory, including the states you chose to skip and why.
- Every state has an arrow in and an arrow out in the diagram.
- Screen and state names follow one naming pattern.
The next chapter wires these screens together with hotspots and navigation.
Exercise
You are testing whether people understand a "save for later" button on a recipe app. The flow is: recipe list, recipe page, tap Save, see the saved list. List the screens, then name two states worth building and one you would skip, with a reason for each.
Show answer
Screens: recipes, recipe, saved. States worth building: saved-filled (the saved list containing the recipe just saved), because it shows whether participants understand the result of the button, and saved-empty (reached if a participant opens the saved list before saving anything), because that is a plausible detour in a test about this feature. A state to skip: a loading state for the recipe list, because the wait is brief and does not bear on the assumption about the Save button. Answers may vary, but each choice should link back to the assumption being tested.
Exercise
A teammate builds results-empty as a copy of the whole results page, with a new header, new footer and new navigation bar, so that the two pages now differ in several places. Why is this a problem, and what should they do instead?
Show answer
The copy shows many differences that have nothing to do with the empty-results message, so a participant may react to the changed header or navigation instead of the message you want to test. It also makes later edits harder, because every change must be made twice. They should keep the shared parts identical and change only the part that differs, which is the heading and message. In a design tool they can use a component or variant. In HTML they can change only the content of the section.