Keep state across a layout change
Hard
Rule. Keep the scroll place, the selection, open panels, and typed text when the layout changes.
Why. A resize or a turn must not cost a person their place.
- Hold state above the layout, not inside one layout.
- Pass all data to each part, even data a small layout hides.
- Reopen a flow at the same step with the answers in place.
Size pair. The open order and the typed note stay when the window narrows from 1280 to 375.