fix(editor): on a narrow screen the graph editor has no width; below 900 px the panels become tabs

Aperta
#182 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@kalwalt ci sta già lavorando.

Dal 19/11/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

bug editor
Problem

Found on a phone while measuring #134's shadow frame rate, and checked on dev at 5cbf149:

  • index.html sets <meta name="viewport" content="width=device-width, initial-scale=1.0">, so a phone lays the studio out at its real width: 360 to 430 CSS px in portrait.
  • .layout is grid-template-columns: 180px 1fr 380px (src/app/studio.css). The two fixed columns take 560 px. Below that, the editor's 1fr column gets no width at all (.editor-pane has min-width: 0): the graph is not drawn, and the preview column (stage, Properties, log) fills the screen. Nothing in the graph can be seen or changed.
  • Between 560 and about 800 px (a phone in landscape, a small tablet) the editor gets less than one node's width (.studio-node is 230 px).
  • The code panel (#35) is position: fixed; inset: 56px 392px 24px 192px: below 584 px it has a negative width.

It looks tied to the player only because coming back from it is when one looks at the studio again, often after turning the phone. The player hand-off ($('btn-player') in src/app/studio.ts) does not touch the editor.

Design

Below 900 px of window width (at 900 the editor keeps 340 px), the studio shows one panel at a time:

  1. A tab bar under the toolbar: Nodes (the palette and the assets panel), Graph (the editor), Properties (the inspector), Preview (the stage and the log). Graph is shown at startup. The tab shown is not saved.
  2. The panel shown takes the whole width and height under the bars. The others are hidden. At 900 px and above the tab bar is hidden and the three columns are as today: the desktop layout does not change.
  3. Adding a node from the Nodes tab adds it as today, then shows Graph, so the node is seen where it lands.
  4. A running preview keeps running while its tab is hidden. AR View sizes its canvas from the video, not from the stage (mountArFrame, src/runtime/ar-frame.ts), so hiding the stage changes nothing in the picture; a test checks it.
  5. The toolbar scrolls sideways below 900 px (overflow-x: auto) rather than wrapping. It builds on #179, which keeps its controls on one line.
  6. The code panel fills the window below 900 px, with a small margin, instead of the desktop insets.

Not in this issue:

  • touch gestures in the editor (pan, pinch to zoom, dragging a node, making a wire). They are checked on a phone for the acceptance below; one that does not work gets its own issue;
  • bigger touch targets and icon-only toolbar buttons;
  • a "Zoom to fit" button.
Tasks
  • Failing e2e tests first, in a spec of their own with a 390 × 844 viewport:
    • at startup the Graph tab is shown, and the editor's box is at least 300 px wide and 300 px high;
    • each tab shows its panel and hides the others;
    • a click on a palette button in Nodes adds the node and shows Graph with the node in it;
    • Run, then a switch to Graph and back to Preview: the canvas has the same size as before the switch;
    • the code panel lies inside the window.
  • One more test at the suite's viewport (1500 × 950): the tab bar is hidden and the three columns are there.
  • The tab bar in index.html, its CSS (one @media (max-width: 899px) block in src/app/studio.css), and its few lines of script in src/app/studio.ts.
  • README: a line on narrow screens, next to the phone and HTTPS note.
  • A CHANGELOG line under Fixed.
Files

index.html, src/app/studio.css, src/app/studio.ts, tests/e2e/ (a new spec), README.md, CHANGELOG.md.

Acceptance
  • On a phone in portrait and in landscape, the graph is visible and editable: a node can be added, moved, wired and removed. Walter checks it on his phone.
  • At 900 px and above, the studio looks and works as before, and the e2e suite is green.
  • No change to the graph format, the node catalog or the plugin API.
Lingua principale
TypeScript
Stelle
1
Fork
0
Merge medio
2h 36m
PR unite (30g)
92

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di webarkit/webarkit-studio

Tutte le issue di webarkit/webarkit-studio

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.