Skip to content

Every state on one screen: the switch panel I put in every prototype

Long names, an empty account, a slow network: a coded prototype can show each of them with one switch, on the same screen. Here is the panel I add to every prototype.

Projects

  • Billing

    Deployed2h ago

    feat/invoices

    Ana Kim
  • Onboarding

    Building5m ago

    fix/copy

    Tom Weiss
  • Search

    Failed1d ago

    main

    Mira Patel

Long text

Data

One screen, five switches behind a settings button. Each one puts the same page into another state: long names, an empty account, a slow network.

The cases nobody draws

A design file shows the happy path. Short project names, a first name and a last name, a branch called main, a list that is already full.

Real data looks different. Someone names a project after the whole feature. A surname has thirty letters. A branch name is a ticket number and half a sentence. A new account has no projects at all, and on a slow connection the page is empty for a second before anything arrives.

None of this is rare. It is the first week after launch.

One switch per edge case

So every coded prototype I build gets a small panel of switches. Each one puts the screen into one state: long names, long branch names, empty, loading, error. Whatever the product needs.

No seeded database, no test account, no waiting for a slow network. Flip a switch and the same page is in that state, right where you were looking. Flip it back and nothing else has moved.

A switch costs a few minutes. Most of them are one line of mock data. If the panel is there from the first screen, every screen after it gets the same switches for free.

Who finds the problem, and when

The panel changes who finds the problem. I turn on long names and see the card break while I can still fix it in the component. The developer turns on empty and sees what the page should say before there is any data, instead of reading a note about it. The client clicks through the states in a review and asks the question that would otherwise arrive as a bug report.

And because the fix goes into the component, every screen that uses it is fixed too. The same long name does not break the next page.

Written byPortrait of Feri HorvathFeri