Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: phyphox/phyphox-webinterface
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: phyphox/phyphox-webinterface
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: development
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 16 commits
  • 14 files changed
  • 3 contributors

Commits on Sep 20, 2026

  1. Rebuild the graphs on Chart.js 4 with zoom, a data picker and a test …

    …suite
    
    Chart.js 2.7.2 is replaced by Chart.js 4.5.1 with chartjs-plugin-zoom 2.2.0
    and Hammer.js 2.0.8, all inlined so the interface keeps working offline.
    
    The graphs are now built entirely here from a JSON description the app embeds
    in the view layout ("graph" per element), instead of JavaScript generated by
    the apps; the contract is documented in readme.md. New: zoom and pan with the
    mouse (drag box, wheel, shift+drag) and with touch (pinch, drag), reset,
    follow mode with or without a configured window, a data picker that picks the
    nearest point on screen with two-point difference and slope and writes the
    experiment's pick outputs through POST /set, log axis toggles, a linear fit,
    clock-labelled time axes via /time, color maps that zoom with their axes plus
    a color scale bar, and "No data" hints. Bright mode, font scaling and the
    other view elements are unchanged.
    
    test/ adds a browser suite (node --test, puppeteer-core, headless Chromium)
    with a mock of the remote API; it runs against the mock or against a running
    app with PHYPHOX_URL, see readme.md.
    
    Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
    Staacks and claude committed Sep 20, 2026
    Configuration menu
    Copy the full SHA
    f2fd230 View commit details
    Browse the repository at this point in the history
  2. Pick points like the app: tap selects, drag spans two, hover previews

    The x-position based hover highlight and the tooltip are switched off
    everywhere; Chart.js receives no pointer events any more. The data picker
    reads the pointer itself: a tap or click selects the point nearest on screen,
    one in empty space deselects, a tap on a marker removes it, and dragging from
    a point to another spans the two for the difference and slope read-out, with
    the mouse, a finger or a pen alike. With a mouse the nearest point is
    previewed while hovering. The info box sits on the side of the last pick
    that keeps the other marker visible.
    
    Two fixes found by the suite along the way: the canvas's touch-action was
    being reset in zoom mode, which let the browser treat a pinch as a page zoom
    and a horizontal swipe as a back gesture, and the release position of a
    touch is not reliable, so taps use the press position and drags the last
    move. The picker tests freeze the data before picking.
    
    Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
    Staacks and claude committed Sep 20, 2026
    Configuration menu
    Copy the full SHA
    085da68 View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2026

  1. Drag pans, remove the linear fit, fix the hover preview and paused ti…

    …me axes
    
    Dragging in pan-and-zoom mode now pans, shift+drag draws the zoom box; an
    accidental drag then only moves the view a little. The linear fit is removed
    for now: it only fitted the visible points, which is inconsistent with the
    app, and was too prominent for a first version.
    
    The plugin hooks read the graph state from the chart instance instead of the
    plugin options, which Chart.js copies at every update: the hover preview and
    the pick markers were painted from a stale snapshot, so a bare redraw never
    showed the preview. A time axis with system time is redrawn when the time
    reference arrives, which nothing else did on a paused experiment after a
    reload. The hover preview also answers pens and any non-touch pointer.
    
    Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
    Staacks and claude committed Sep 21, 2026
    Configuration menu
    Copy the full SHA
    e418ee3 View commit details
    Browse the repository at this point in the history
  2. Maximize a graph by tapping or clicking its plot

    The plot itself has no interaction until it is maximized, so a tap or click
    on it now enters the maximized interactive mode, like the label does.
    
    Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
    Staacks and claude committed Sep 21, 2026
    Configuration menu
    Copy the full SHA
    f131d50 View commit details
    Browse the repository at this point in the history
  3. Tests: read the plot width and switch follow on in one JavaScript turn

    The follow test compared the window width after the click with a width read
    in a separate puppeteer call. The plot keeps growing with the data between the
    two calls (polled every 30 ms), so on a slow runner the width at the click was
    already more than 5 % larger and the iOS T1 run failed on it. Reading and
    clicking inside one page.evaluate cannot race.
    
    Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
    Staacks and claude committed Sep 21, 2026
    Configuration menu
    Copy the full SHA
    54a2bd9 View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2026

  1. View groups, transforms, alpha colours and a fixed plot area (file fo…

    …rmat 1.21)
    
    The view layout nests: a group is {type, elements, ...} without index or html,
    leaves keep their global sequential index. The page builds the containers
    (vertical, horizontal by weight, grid with columns from the width via a
    ResizeObserver and fillLastRow, stack as a CSS grid with every child in one
    cell) and applies the transform of a transform group from its bound buffers
    with the linear map and clamp. Maximizing a leaf inside groups keeps the path
    of groups visible. Colours may carry an alpha byte (#rrggbbaa), kept through
    the bright-mode adjustment and the colour map. plotLeft/Top/Right/Bottom pin
    the Chart.js chart area to fractions of the element (afterFit + padding).
    
    The mock gets a "Groups" view, a /res route with two fixture images, and the
    suite five tests for it; fixtures/webgroups.phyphox mirrors that view. The
    contract is documented in readme.md; iOS mirrors the emitter.
    
    Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
    Staacks and claude committed Sep 25, 2026
    Configuration menu
    Copy the full SHA
    b36406d View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2026

  1. Grid screen unit, verticalLayout and omitted labels (file format 1.21)

    A grid node carries maxWidthUnit: with "screen" the column count uses
    multiples of the viewport's shorter side, recomputed on resize. Elements
    with the verticalLayout class show the label on its own line above the
    control, both full width and left-aligned; without a label span the control
    takes the row, and a graph without a label has no title row. Inside a group
    the info's margins become padding so a flex item keeps its share of the row.
    
    The mock's "Groups" view and fixtures/webgroups.phyphox gain the cases, the
    suite a test for them; readme.md documents the contract.
    
    Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
    Staacks and claude committed Sep 26, 2026
    Configuration menu
    Copy the full SHA
    009667e View commit details
    Browse the repository at this point in the history
  2. Align at full width and spacing between group children (file format 1…

    ….21)
    
    The align attribute of value, edit, toggle, dropdown and slider becomes the
    class alignCenter or alignRight on the element's div, emitted by the app only
    where it applies (verticalLayout with a label, or no label; a slider only with
    showValue). The stylesheet aligns the label and the text of the control,
    positions the edit field with its unit as a line and places the checkbox.
    
    The spacing of vertical, horizontal and grid groups arrives as a "spacing"
    key of the view layout (text line heights) and is rendered as the flex gap of
    the container, so it never sits at the edges or next to a hidden child; a
    horizontal takes the gaps off the width before the weights share it, and the
    grid counts them in its column count and lets the columns share the rest.
    
    Both are documented in readme.md, mirrored in the mock and in
    fixtures/webgroups.phyphox, and covered by a test.
    
    Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
    Staacks and claude committed Sep 26, 2026
    Configuration menu
    Copy the full SHA
    0cb325e View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2026

  1. Tests: no races against live data in followX and the mouse test

    followX read the plot window and the newest point in two puppeteer calls
    while the experiment was measuring; on a slow runner new data arrived in
    between and the anchor check failed. Both are now read in one JavaScript
    turn, as the follow test does. The mouse test zoomed into a box while the
    auto range kept growing, which widened the box beyond its assertion; it now
    stops the measurement first, as the picker test does.
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    Staacks and claude committed Sep 27, 2026
    Configuration menu
    Copy the full SHA
    f48f530 View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2026

  1. Logical units and the unit dialog (file format 1.21)

    The apps now hand units over logically: a unit reference reaches the page
    as {id, text} in the new "value" and "edit" leaf configurations and as
    unitIdX/Y/Z in the graph configuration, next to the new placeholders
    unitSystem (the app's Unit system setting) and unitStrings (its translated
    symbols). PhyphoxUnits carries the same table as the apps (phyphox-docs
    spec/units.yml) and converts what an element shows - the value with the
    precision rule, the edit field and its limits, the chart's data, ranges,
    ticks and read-outs - while the REST API keeps the buffers' original
    values; typed values and pick outputs go back through the conversion. A
    click or tap on the unit of a value or edit element, or on an axis title
    area of a maximized graph, opens the unit dialog of that quantity.
    
    The mock and the webgraphs fixture gained the unit elements, the suite
    eight tests covering the three settings, the dialogs, the edit round trip,
    the affine temperature axis and the pick output.
    
    Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
    Staacks and claude committed Sep 30, 2026
    Configuration menu
    Copy the full SHA
    c4bf958 View commit details
    Browse the repository at this point in the history
  2. Unit dialog: mark the experiment's unit with "(default)"

    The apps shortened the string behind unitExperimentDefault to "default"
    (the rows are two or three characters wide), so the interface's English
    default and the mock follow, and the served test accepts the marker as the
    app sends it.
    
    Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
    Staacks and claude committed Sep 30, 2026
    Configuration menu
    Copy the full SHA
    6e9a3e2 View commit details
    Browse the repository at this point in the history
  3. Tests: a launch timeout that fits GitHub's runners, browser output in CI

    The suite failed on and off with "Timed out after 30000 ms while waiting
    for the WS endpoint URL": puppeteer's default launch timeout. On the
    runners the first test, which includes the launch, takes 12 to 47 s
    across the recent passing runs, so the launch sits within seconds of
    the limit and crosses it on a slow day (2026-09-20, twice on
    2026-09-30). The same Chromium build launches in a quarter second on a
    workstation. Raise the launch timeout to 180 s and, when CI is set,
    forward the browser's stderr to the job log so a hang shows its cause.
    
    Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
    Staacks and claude committed Sep 30, 2026
    Configuration menu
    Copy the full SHA
    9e2e572 View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2026

  1. Graphs: "Keep this view?" when leaving a zoomed maximized graph

    Leaving a maximized graph with a zoom (label click, click beside the plot,
    view switch, layout or font-size change) now asks the same question as the
    apps: the zoomed range per axis as the tick labels show it, "Reset zoom"
    and "Keep this section" as direct buttons, "More options…" with per-axis
    reset / keep / keep and follow new data and "Also apply to other graphs
    with…" the same data (shared input buffer), the same unit (converted
    between display units) or any axis of the same kind among the current
    view's graphs; Cancel stays. No question without a zoom, so the clock
    toggle alone does not ask. The strings come in as graphStrings keys named
    like the apps' resources (applyZoom*), with Java and Swift placeholders.
    
    Also: only the drawn axis title text (with a slop) opens the unit dialog,
    a click elsewhere outside the plot leaves the maximized graph; the restore
    icon of a maximized graph is drawn twice the size of the maximize icon.
    
    Tests: the question's three answers, no question without a zoom, "More
    options" across graphs, the title-only hit test and the view switch; the
    units test clicks the titles.
    
    Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
    Staacks and claude committed Oct 2, 2026
    Configuration menu
    Copy the full SHA
    3adb640 View commit details
    Browse the repository at this point in the history
  2. Keep this view?: the range appears only as the title of an axis section

    Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
    Staacks and claude committed Oct 2, 2026
    Configuration menu
    Copy the full SHA
    7f2a387 View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2026

  1. Drawing elements: geometry and scale (file format 1.21)

    The two drawing elements of phyphox-docs views/drawing.md reach the page as
    "geometry" and "scale" objects in the view layout and are drawn on a canvas
    per element (PhyphoxDrawing), redrawn on a resize and on a unit switch.
    Positions are fractions of the box, lengths fractions of the width, angles
    radians clockwise from twelve o'clock; the box is the full width and
    width / aspectRatio tall.
    
    A scale lays its tics out as the apps do: from min by ticStep in the
    experiment's unit, or at the nice multiples of GraphView.linearTicStep when
    ticStep is 0 and always while another unit is shown; the automatic tic count
    is max(2, floor(L / (5 * textSize))). Containers bound with minInput/maxInput
    re-range the tics without moving the baseline. The label of a convertible
    scale is a positioned hit box that opens the unit dialog - the one click a
    stack passes on, also under a transformed needle; a scale in a transform
    gets none.
    
    readme.md documents the contract, the mock and fixtures/webgraphs.phyphox
    carry a "Drawing" view, and five tests cover the shapes, the tics, the label
    click, the imperial setting and the resize.
    
    Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
    Staacks and claude committed Oct 5, 2026
    Configuration menu
    Copy the full SHA
    41da61d View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2026

  1. Images: lightSrc and darkSrc follow the bright mode (file format 1.21)

    An image element with a file per interface mode carries data-light-src
    and data-dark-src next to its src, each already resolved to src where
    the alternative is absent. modeImageHTML sets the src of the current
    bright mode in an inert template before the markup is inserted, so only
    the file shown is loaded, and toggling the mode rebuilds the views.
    Markup without the attributes is used unchanged. The snippet is
    documented in the readme ("Image elements"); the mock and the
    webgroups fixture gain two images with alternatives and a test checks
    the chosen file in both modes and after toggling.
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    Staacks and claude committed Oct 14, 2026
    Configuration menu
    Copy the full SHA
    752939f View commit details
    Browse the repository at this point in the history
Loading