UI Guidelines

Contents
  1. Who the UI Is For
  2. Audit: Where the App Differs Today
  3. Principles
  4. Layout
  5. Type and Colour
  6. Words
  7. Controls
  8. Pictures
  9. Feedback and Errors
  10. Platform
  11. Keyboard
  12. Process
  13. Decisions
  14. Open Questions

Status: accepted, no open questions. Rules marked (test) are meant to be enforced by a source-scan test, like SourceHygieneTest. The rest is review practice.

Who the UI Is For

A pixel artist. They think in clips, frames, colours and the editor. They do not think about formats, sizes, file names or copying (CLAUDE.md, hard rules). Every screen serves one job in the path film, set up, draw, hand off, publish.

Audit: Where the App Differs Today

Counted in roto-app/src/main on 2026-11-28.

Area Finding
Theme MaterialTheme { } with no scheme and no typography: default Material purple. Nothing was chosen.
Spacing 129 dp literals. 8, 4, 12 and 16 are 78 of them. The rest are ad hoc: 2, 3, 6, 10, 20, 24 and many sizes
Screen title titleLarge on eight screens, headlineSmall on Home
Buttons 16 filled, 37 outlined, 25 text. No rule says which is which
Exit labels “Done” (3), “Close” (2), “Close player”, “Back” (1), “Cancel” (4) mean overlapping things
Ellipsis “Import video…”, “Import model…” but “Import models” and “Import” in a dialog; no rule
Icons None. All actions are text buttons
Disabled controls Disabled with no reason shown, except where a Helped tooltip happens to say
Terms “Render” means make a handoff. A GIF export would also be “render” to an artist

What is already good and stays: one Helped tooltip on every control, SelectableMessage for errors, OffUiThread for work, Section and Setting and Choice as shared controls, one PictureView and one Filmstrip.

Principles

  1. One screen, one job. The title says which. The way forward is obvious.
  2. Show the picture. Pixel art is the content. Chrome stays quiet and never competes with it.
  3. Say what happened. Every action ends in visible state: a result line, a changed list, an error.
  4. No dead ends. A disabled control says why. An error says what to do.
  5. Hands stay on the work. Common actions have keys. Nothing needs a mouse trip to a menu.
  6. Words of the artist. Use the glossary below. Never a format name, a path or a hash unless the artist asked for it.

Layout

  • Screen skeleton, same on every screen: a header row, a body, no footer.
    • Header: title (left, titleLarge), then the exit button (right). No status in the header.
    • Body: panels. A side panel is 280 dp wide; settings in it are Sections.
    • No minimum window size. A panel or body that does not fit scrolls. Nothing is cut off or unreachable at any size.
    • The window remembers itself. Settings stores size, position and maximised state on close and restores them on start. A restored window that lies outside every connected screen is moved onto the primary one. The first run uses a default size.
    • Home uses the same header. Its headlineSmall becomes titleLarge.
  • One filled button per view. It is the way forward: Publish, Create, Next, Done. Secondary actions are outlined. Tertiary actions (Cancel, links, row actions in a list) are text buttons. Destructive actions are outlined, with the error colour only on the confirm step.
  • Spacing scale (test): 4, 8, 12, 16, 24 dp. Named Space.xs, s, m, l, xl in one Tokens.kt. A dp literal outside Tokens.kt fails the test, except sizes of pictures and panels, which are named Size.* there too.
  • Alignment: padding 16 around a screen; 12 between blocks; 8 between related controls; 4 inside a control group.

Type and Colour

  • Icons: a small fixed set in Icons.kt: play, pause, step back, step forward, zoom in, zoom out, fit, folder. Only players, pictures and the filmstrip use them. They are icon buttons with a tooltip, and the tooltip names the key. Every other button stays text. A new icon needs a new row in this list first.

  • Roles (test: no other roles):

    Use Role
    Screen title titleLarge
    Section heading titleMedium
    Body and labels bodyMedium
    Hints, secondary line, counts bodySmall, onSurfaceVariant
    Row primary text bodyLarge
  • Colour is semantic. error for failure only. primary for the one forward action and selection. No colour carries meaning alone: a state also has text or a mark.

  • Define a theme. Neutral, low-saturation surfaces so the art keeps the colour. Light and dark schemes. The app follows the system by default. The settings window has an “Appearance” choice (System, Light, Dark), stored in Settings. The default purple goes. The palette lives in Theme.kt; screens never write Color(...) (test), except to show a project’s own palette or ramp colours.

Words

  • Sentence case. Verb first on buttons: “Open in editor”, “Export animation…”.

  • Ellipsis rule: a button ends in … when it opens a picker or a dialog that needs more input before anything happens. It does not when it acts at once.

  • Exit verbs, fixed:

    Word Meaning
    Done Finish this screen. Work is already saved.
    Cancel Leave a dialog or a step and drop its changes.
    Close Dismiss a pane or panel that holds no unsaved work.
    Back, Next Wizard steps only.
    Save Write the changes of a form that is not live. Live-editing screens have no Save.
    Create Make a new thing that did not exist (project, variant).

    “Close player” becomes “Close”. “Back to defaults” and “Back to proposal” become “Reset to defaults” and “Reset to proposal”, since Back is for the wizard.

  • Glossary. One word per meaning. It goes in docs/help/index.md too.

    Word Means Not
    Clip one filmed take of an action and facing video, shot
    Key frame a frame the artist draws keyframe
    Handoff the .ase file Roto writes for the editor export, render output
    Render make or refresh a handoff any export
    Publish write the finished frames into the game project deploy, export
    Export make a file to share, such as a GIF publish
    Draft Roto’s first palette pass auto-colour
    Art the artist’s own layer final

Controls

  • Use the shared controls: Section, Setting, Radius, Choice, SelectableMessage. A screen that needs a new kind of control adds it to Controls.kt first, then uses it. No screen builds its own slider or dropdown.
  • Every control has Helped(...) and a row in docs/help (HelpCoverageTest already enforces it).
  • A control that applies live does so with no Apply button. A form that needs several fields first (the wizard, a dialog) has one forward button.
  • Disabled needs a reason. Helped gets a second line when the control is disabled: “Render the clip first”. The wording lives next to the enabling rule in the model, so it cannot drift from it.
  • Numeric settings show their value in the label (“Radius: 3”), as Radius does.

Pictures

  • Always nearest-neighbour, always integer zoom, via PictureView. Never smooth a pixel-art picture.
  • Background choices (checker, dark, light, palette colour) are the same set everywhere.
  • Gestures are the same on every picture (PictureGestures): wheel zooms, middle drag or Space-drag pans, left drag paints or marks where the screen says so. A new screen reuses them or changes them for all screens.
  • Ground line, root and canvas bounds use one overlay style and one colour each.

Feedback and Errors

  • Long work runs through OffUiThread, shows a running line (“Rendering 3 of 8…”) and a way to cancel when it can be cancelled. The UI never freezes.

  • Status lives where the work is. Progress and results appear next to the thing that causes them, never in a shared bar or the header:

    • Loading previews: “n/m previews loaded” in the previews panel.
    • Rendering: a progress line with an ETA beside the Render button (“Rendering 3 of 8, ~1:42 left”).
    • Publishing: the result beside the Publish button (“Published 24 files”), with “Show in folder”.
    • An export: the same, in its dialog.

    Rule: the status text is a sibling of its trigger or the panel it fills. It uses bodySmall and onSurfaceVariant; a failure becomes a SelectableMessage in the same place.

  • ETA is shown only for work with known steps, and is the mean time per finished step times the steps left. It is for the artist’s eyes and never reaches any output, so the determinism rule is safe. Under 3 steps done it shows no ETA, only “3 of 8”. Work of unknown length shows “Working…” and no number.

  • Errors use SelectableMessage: the message of the exception, which already names the file or the rule. Do not wrap it in more words.

  • Confirm only what cannot be undone or replaces the artist’s work: replacing a model, deleting a profile. A confirm names what is lost. Everything else is undoable or harmless and gets no dialog.

  • Never write to the art layer. The UI says when a re-render keeps the artist’s layers.

Platform

Windows is the development platform. Most users may be on macOS. Roto is a utility, so it does not chase a native look. It does follow the common habits of each system:

  • Modifier: “Ctrl” in this document means Cmd on macOS. The code asks one helper (Shortcut), never isCtrlPressed directly (test).
  • Menus: the File and Help menus (AppMenuBar) use the system menu bar on macOS. Quit, Settings and About sit where macOS users look for them (Cmd+Q, Cmd+,).
  • Pickers: open and save use the system’s own file dialog.
  • Show in folder reads “Show in Explorer”, “Reveal in Finder” or “Show in file manager”. One helper chooses the word and the action.
  • Fonts and sizes: the system font through Material’s default. No custom font.
  • Paths shown to the artist use the system’s separator. Files Roto writes never do (RelativePath).
  • Mac builds are not tested by the author. Mark a Mac-only fix as unverified in its commit.

Keyboard

One table for the whole app. Each screen lists the keys it supports in its help page.

Key Action
F1 Help for the screen
Esc Cancel the dialog, or close the pane
Enter The forward button of a dialog
Space Play or pause a player
Left, Right Previous or next frame
Ctrl+Z, Ctrl+Y Undo and redo where the screen has history (brush strokes already do)
Ctrl+O Open the profile or file picker of the screen

Process

  • Shared pieces first. A rule above that code can carry becomes a component: Screen(title, onExit) { body } for the skeleton, PrimaryButton, Space, Size. Screens stop choosing their own.
  • Enforcement test, UiConventionsTest in roto-app: scans the sources and fails on dp literals outside Tokens.kt, on Color( outside Theme.kt and palette views, on type roles outside the table, and on button labels outside the verb list. It is a text scan; it needs no window.
  • Migration, one commit each, tests green between: Tokens.kt and the theme with the Appearance setting; window size memory (Settings fields, codec and round-trip test together); the screen skeleton and Home; button hierarchy and labels per screen; spacing literals; status placement and ETA; Shortcut and the keyboard table; icons.
  • New screens, such as the export dialog in docs/specs/export-formats.md, follow this document from the first commit.
  • CLAUDE.md has one line under Constraints that points here.

Decisions

Made on 2026-11-28.

  1. Theme: follow the system; an “Appearance” choice in settings overrides it.

  2. Icons: a small set, for players and pictures only. See Type and colour.

  3. Window: no minimum size, scroll instead; size, position and maximised state are remembered.

  4. Status: shown where the work happens, with an ETA beside Render. No header status.

  5. Platform: Windows first; macOS gets the common habits, not a native look. See Platform.

  6. Linux: the same rules as macOS, lowest priority. No Linux-only work is planned.

  7. Dark scheme tuning: the checker and dark backgrounds of PictureView on a dark surface are tuned after release, from real use.

  8. ETA wording: ~m:ss left, for example “Rendering 3 of 8, ~1:42 left”. Over one hour: ~h:mm:ss.

Open Questions

None.

View this page on GitHub