Web & App Design

Prototype and Play

A prototype is the design you can use: tap a row and the next screen slides in, tap the plus and a sheet rises over the list. In Nox the links live on the layers themselves as interactions. Play mode puts the screens in the canvas's place so you can try them, and an agent can check every link and play a flow through without a screen.

A flow of three screens: a row pushes the task screen in, its back button returns, the plus lays a sheet over Today
A flow of three screens: a row pushes the task screen in, its back button returns, the plus lays a sheet over Today

An interaction is four things: what sets it off (the trigger), what it does (the action), where that leads (a frame directly on the page), and how the next screen comes in (the transition).

By hand
  1. In Design, select the layer to tap: a row, a button, a back arrow.
  2. In the inspector, press the plus beside Interactions.
  3. Click Add: on a click, lead to… and choose a frame. The row reads, for example, Click → Task · Push.
  4. Click the row to change it: On (the trigger), Do (the action), Lead To, Come In By (the transition), and for an overlay Lay It, Veil and A Click Beside It Closes It. Remove takes it away.
  5. Select the first screen and turn on Starts a flow, so Play and the agents know where the flow begins.
The Interactions section: a click that pushes Checkout in, and a hover that lays Receipt over the screen
The Interactions section: a click that pushes Checkout in, and a hover that lays Receipt over the screen

The triggers are Click, Hover, Press, Mouse Enter, Mouse Leave and After a Delay. The actions are Navigate, Open Overlay, Swap Overlay, Close Overlay, Back, Scroll To, Open URL, Set Variable and Change To (another variant, for hover and pressed states; see Button states).

A tap on something inside a layer is answered by the nearest layer around it that has an interaction for it. Put the interaction on the whole row, not on its title, and the whole row is the target.

Transitions#

Instant, Dissolve, Move In, Move Out, Push, Slide In, Slide Out and Smart Animate. Through the tools, each also takes a direction (left, right, up, down), an easing (linear, ease in, ease out, ease in and out, spring) and a duration in milliseconds; the default is ease out over 300.

Use them as the platform does. Push left to go deeper, push right to come back, move in up for a sheet, dissolve for a change that does not move the user anywhere. Keep durations between 200 and 400: shorter feels abrupt, longer feels slow.

Smart Animate matches layers of the two frames by name and kind and moves each from where it was to where it is, changing size, color, corners and opacity on the way. A layer only one frame has fades. Give the layers that should travel the same names in both frames.

Overlays#

An overlay lays a frame over the screen without leaving it: a sheet, a menu, a dialog. Lay It places it at the center, a corner, or the middle of the top or bottom edge. Veil darkens the screen under it (None, Light, Half, Dark). A click beside it closes it unless you turn that off. Close Overlay on a button inside it closes it; Swap Overlay puts another in its place.

With an agent
Wire the Tasks flow: Today starts it. The third row pushes Task in from the right. Task's back button goes back. The plus opens New task as a sheet at the bottom, with a spring and a dark veil; Add task closes it.

The agent calls update_nodes:

{"changes": [
  {"id": "TODAY_ID", "flow": "Tasks"},
  {"id": "ROW_ID", "interactions": [{"trigger": "click", "action": "navigate", "target": "TASK_ID", "transition": "push", "direction": "left", "duration": 300}]},
  {"id": "BACK_ID", "interactions": [{"action": "back", "transition": "push", "direction": "right"}]},
  {"id": "ADD_BUTTON_ID", "interactions": [{"action": "open_overlay", "target": "NEW_TASK_ID", "place": "bottom_center", "veil": "#0B0D1266", "transition": "move_in", "direction": "up", "easing": "spring", "duration": 350}]},
  {"id": "ADD_TASK_ID", "interactions": [{"action": "close_overlay"}]}
]}

Scrolling frames#

A frame whose content reaches past its edges can scroll when played. Choose the way in the overflow menu of the Game UI section: None, Horizontal, Vertical or Both. Children that must not move, such as a header or a tab bar, get Stays Put in the Layout section. Scroll To on a button scrolls its frame to a layer: a table of contents, a "back to top".

For an agent these are "scrolls": "vertical" on the frame and "stays_put": true on the child. Design an app screen builds a screen that scrolls under fixed bars.

Play mode#

Press ⌘3 or click Play at the top. The prototype is played in the canvas's place, starting at the selected frame, or where the page's first flow starts. Click, hover and scroll as a user would. The one button on the bar plays again from the start, and Esc returns to the mode you came from. A page with nothing to play beeps and stays where it is.

Play is free: anyone with the file can try the flow, without Nox Pro.

Check the flow with an agent#

check_prototype lists the flows, the screens each can reach, and every interaction that would do nothing, such as one that leads to a frame you deleted. Run it after every change to the links.

With an agent

With play, it follows a list of events from a frame, without a screen, and says after each who answered, what it did and what is shown. The agent calls check_prototype:

{"play": {"start": "TODAY_ID", "events": [{"node": "ROW_ID"}, {"node": "BACK_ID"}, {"node": "ADD_BUTTON_ID"}, {"outside": true}]}}

The reply has a step for each event; the third reads in part:

{"answered_by": "ADD_BUTTON_ID", "overlays": ["NEW_TASK_ID"], "overlays_at": [{"frame": "NEW_TASK_ID", "x": 0, "y": 424}], "screen": "TODAY_ID"}

The fourth, a click beside the sheet, says "closed": true. An event can also be {"node": "TODAY_ID", "scroll": [0, 400]}, which reports how far the frame then is scrolled.

play_flow plays the same events where you can see them: in the app, Play mode shows each screen as the agent goes. It takes start, events (with {"back": true} to go back) and stop:

{"start": "TODAY_ID", "events": [{"node": "ROW_ID"}, {"back": true}]}

Ask the agent to play the whole flow after it wires it, and to say which tap led nowhere. A prototype with one dead link is the one the client finds.