Files
marcandClaude Opus 5 dcc42bb8e0 Centre the writing column again
Pinning it to the left edge put the start of every line in the same
place, which was the point, but on a wide window it left the entire
right half of the pane as one dead block. Centred, the same leftover
space reads as two margins instead.

The page surface that tried to give that block a meaning is reverted in
the commit before this one: it made the whole sheet sit hard against the
left edge, which was worse than the problem.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-11 18:36:54 +02:00

23 lines
1.0 KiB
JavaScript

/* Throwaway: one wide screenshot of the writing surface, to look at it. */
import { OUT, launch, withFreshUser, createNotebook, createNote, typeInEditor } from "./lib.mjs";
const browser = await launch();
const session = await withFreshUser(browser, "shot");
const p = session.page;
await p.setViewportSize({ width: 1680, height: 900 });
await createNotebook(p, "Look");
await createNote(p);
await typeInEditor(p, "askjdnasjkdnkjasndjknkjaskjdnasjkdskajndjkanHelkl HALLLO");
await p.keyboard.press("Enter");
await p.keyboard.type("sdfsdfsdfsdfasddddd");
await p.waitForTimeout(1500);
await p.screenshot({ path: `${OUT}/look.png` });
const box = await p.evaluate(() => {
const pm = document.querySelector(".ProseMirror").getBoundingClientRect();
const pane = document.querySelector(".note-editor").parentElement.getBoundingClientRect();
return { pm: { x: Math.round(pm.x), w: Math.round(pm.width) }, pane: { x: Math.round(pane.x), w: Math.round(pane.width) } };
});
console.log(JSON.stringify(box));
await session.cleanup();
await browser.close();