Pause the live match with one button or Space, and it resumes at your speed

2 hours ago

Openfoot Manager's live match has a rebuilt speed panel. One big button pauses and resumes, the Space bar does the same from anywhere on the match screen, and resuming plays at the speed you left. After that, a half-time bug that turned up in review, and a control contributors can reuse.

Ask about this presentation

Chapters

  1. 0:00One button, or Space
  2. 0:19Before: Pause was a fifth speed
  3. 0:35The new panel, top to bottom
  4. 0:54Pausing keeps the pace
  5. 1:13What Space does, and when it stays out of the way
  6. 1:29The half-time bug review caught
  7. 1:57Twelve languages, and the panel fits all of them
  8. 2:19A segmented control any panel can use
  9. 2:45Tests, written red first
  10. 3:08In the nightly builds
Show transcript
  1. Openfoot Manager's live match has a rebuilt speed panel. One big button pauses and resumes, the Space bar does the same from anywhere on the match screen, and resuming plays at the speed you left. After that, a half-time bug that turned up in review, and a control contributors can reuse.

    Slide text
    Openfoot Manager
    Kick-off 0'

    Pause with one button or Space, and resume at your speed

    Resume Space
    Paused · resumes at Normal
  2. This is the panel it replaces. Pause sat in the row with Slow, Normal, Fast and Max, like a fifth speed, so getting going again meant picking a speed. The label text was only 10 pixels. And Step 1 minute only appeared while the match was paused.

    Slide text
    Openfoot Manager
    1st half 10'

    Pause used to be a fifth speed

    The old Simulation speed panel: Pause, Slow, Normal, Fast and Max in one row, with Step 1 minute below
    The old speed panel, from the game's README screenshot
    • To resumePick a speed again
    • Labels10 px under each icon
    • Step 1 minuteShown only while paused
  3. Now it works like a media player. One big button reads Pause while the match plays and Resume while it's paused. Under it, a line says the pace. The four speeds are a radio group, with an icon and a word each, at the game's 12 pixel floor. And Step 1 minute stays put, disabled while the match plays.

    Slide text
    Openfoot Manager
    1st half 20'

    Now it works like a media player

    Pause / Resume Space
    One big toggle. Space works from anywhere on the match screen.
    Playing at Normal
    A line saying the pace. Screen readers announce it politely.
    Slow Normal Fast Max
    Four speeds, a radio group. An icon and a word each, at the 12 px floor.
    Step 1 minute
    Stays in place. Disabled while the match plays.
  4. Pausing keeps your speed. While the match plays, the chosen speed is filled green. Paused, it's only outlined, and the line reads Paused, resumes at Fast. Press Resume, and it's back at Fast. As before, only Slow, Normal and Fast carry into the second half, so Max can't skip it to the end.

    Slide text
    Openfoot Manager
    1st half 30'

    Pausing keeps your speed

    Playing
    Slow Normal Fast Max
    Playing at Fast
    Paused
    Slow Normal Fast Max
    Paused · resumes at Fast

    Max never carries into the second half. Only Slow, Normal and Fast are kept, as before.

  5. Space works from anywhere on the match screen, with three exceptions. When a text field or a button has the focus, Space is theirs. A held Space repeats, which would flicker the match. And Space with Control, Shift, Alt or Meta belongs to another shortcut.

    Slide text
    Openfoot Manager
    1st half 40'

    Space pauses anywhere, with three exceptions

    function handleKeyDown(event: KeyboardEvent) {
      if (event.code !== "Space" && event.key !== " ") return;
      // A held key repeats, which would flicker the match; a modified Space is someone else's.
      if (event.repeat || event.ctrlKey || event.shiftKey || event.altKey || event.metaKey) return;
      if (ownsSpace(event.target)) return;
      event.preventDefault();
      onTogglePause();
    }
    Ignored: a field or button has focus Ignored: Space held down Ignored: with Ctrl, Shift, Alt or Meta
  6. Review caught one real bug. At half time, the screen pauses and hands over to the break 600 milliseconds later. A Space or Step press in that window resumed play, and at Fast or Max the second half kicked off before the team talk and substitutions showed. Extra-time half time, the shootout and full time had the same gap. Now a transitioning gate blocks every step until the hand-over and turns Space off, including behind the substitutions dialog.

    Slide text
    Openfoot Manager
    Half time HT

    Space could start the second half before the break

    Half time reached The match pauses
    The break shows Team talk and substitutions
    600 ms hand-over
    Before the fixA Space or Step press in the window resumed play. At Fast or Max, the second half kicked off first.
    NowA transitioning gate makes every step a no-op and turns Space off. Space is also off behind the substitutions dialog.
  7. The four new strings are in all 12 of the game's languages. In Russian, the speed row ran about 110 pixels past the panel, and Max scrolled out of sight. German overflowed too. Now the row wraps, so Russian shows two rows of two. Measured in headless Chrome, overflow is zero in six languages, at normal and extra-large text.

    Slide text
    Openfoot Manager
    2nd half 55'

    Long translations no longer push Max off the panel

    en Resume Space
    de Fortsetzen Leertaste
    ru Продолжить Пробел
    111 px
    How far the speed row ran past the panel in Russian
    0 px
    Overflow now, in six languages, normal and extra-large text
  8. For contributors, the speed row is a new shared segmented control. It's a radio group with one tab stop, moved by the arrow keys, Home and End, and with fill it wraps instead of scrolling. The match turns wrapping off, since one step left from Slow would land on Max. The arrow-key logic and the look are shared with Tabs, whose tests pass unchanged. The Settings page's own copy moves over in the configurable sidebar pull request.

    Slide text
    Openfoot Manager
    2nd half 65'

    For contributors: a segmented control in ui/

    <SegmentedControl
      labelledBy={headingId}
      options={[…]}
      value={pace}
      onChange={onSelectPace}
      emphasis={paused ? "outlined" : "strong"}
      // Wrapping from Slow would land on Max.
      wrap={false}
      layout="stacked"
      fill
    />
    ui/SegmentedControl.tsx

    A radio group with one tab stop. Arrows, Home and End move the choice.

    ui/roving.ts · ui/segmented.ts

    The arrow-key logic and the segmented look, now shared with Tabs.

    Settings.components.tsx

    Its page-local copy moves over in the configurable-sidebar change.

  9. Each new test was seen failing first, for the predicted reason. Six cover the segmented control, six the speed panel, three the pace logic, plus the half-time tests. The full suite passes, about 2,600 tests across nearly 300 files, and so do all 21 translation gates. Cargo wasn't run, since the Rust backend didn't change.

    Slide text
    Openfoot Manager
    2nd half 80'

    Every new test was seen failing first

    6 SegmentedControl: name, tab stop, keys, wrap
    6 MatchSpeedControl: toggle, pace, step, Space
    3 useMatchPace: resume at the same pace, Max not kept
    + MatchLive: Space and Step during the half-time hand-over
    2,590
    tests passed across 291 files
    21 / 21 translation gates
    Build, lint, format, knip: pass
    Cargo: not run, no backend changes
  10. One limit stays. Russian renders in a system fallback font, because the game's bundled fonts carry no Cyrillic letters. That predates this change. The change is in the nightly builds from October 22 on. Next live match, press Space to pause, and it resumes at your speed.

    Slide text
    Openfoot Manager
    Full time FT

    In the nightly builds since October 22

    Still openRussian renders in a system fallback font. The bundled fonts, Barlow Condensed and Inter, carry no Cyrillic. This predates the change and is logged separately.
    Pause Space
    Playing at your speed, after every pause
    github.com/openfootmanager/
    openfootmanager/pull/972

What happened in AI today, in your inbox

One short email each evening. Read it and you’re caught up.

Built in New York with ❤️