diff --git a/tests/journey.py b/tests/journey.py index 5f6fca2..232b90f 100644 --- a/tests/journey.py +++ b/tests/journey.py @@ -106,8 +106,8 @@ def lean_open(page: Page) -> bool: GRAPH_FIRST = """ try { - if (!localStorage.getItem('proof-reader-pane-3')) - localStorage.setItem('proof-reader-pane-3', JSON.stringify({graph: true, lean: false, share: 0, sideShare: 0})); + if (!localStorage.getItem('proof-reader-pane-4')) + localStorage.setItem('proof-reader-pane-4', JSON.stringify({graph: true, lean: false, share: 0, sideShare: 0})); } catch { /* a frame with no storage, such as the PDF's: nothing to set there */ } """ @@ -151,7 +151,7 @@ def reopen_proof(page: Page, url: str) -> None: print("Reopening the proof pane") page.goto(f"{url}#/{SLUG}", wait_until="load") page.locator(".proof").wait_for() - page.evaluate("""localStorage.setItem('proof-reader-pane-3', JSON.stringify({ + page.evaluate("""localStorage.setItem('proof-reader-pane-4', JSON.stringify({ graph: false, lean: false, share: 0.3, sideShare: 0.4 }))""") for slug in ("pcp-exposition", "pcp-specialist", "pcp-full-argument", "pcp-reading-guide", SLUG): @@ -171,7 +171,7 @@ def reopen_proof(page: Page, url: str) -> None: page.locator(".proof").wait_for() check(True, "reloading opens the proof pane again") check(page.evaluate("""() => { - const layout = JSON.parse(localStorage.getItem('proof-reader-pane-3')); + const layout = JSON.parse(localStorage.getItem('proof-reader-pane-4')); return layout.share === 0.3 && layout.sideShare === 0.4 && layout.lean === false && !Object.hasOwn(layout, 'graph'); }"""), "mode and split sizes persist without a saved closed pane") diff --git a/web/src/proof/ProofPage.tsx b/web/src/proof/ProofPage.tsx index 7e0e5e8..694e217 100644 --- a/web/src/proof/ProofPage.tsx +++ b/web/src/proof/ProofPage.tsx @@ -7,11 +7,11 @@ import { ModeToggle, type PaneMode } from "./ModeToggle"; import { memo, useEffect, useLayoutEffect, useRef, useState, type ReactNode } from "react"; // The key changes when the opening layout does, so a layout saved under the old one does not hide the new. -const KEY = "proof-reader-pane-3"; +const KEY = "proof-reader-pane-4"; /** Narrower than this, the graph sits above the Lean; from here they stand side by side. */ const SIDE_BY_SIDE = 1040; /** What the graph has before the reader pulls the handle: the statement's place in the proof, above or beside its Lean. */ -const OPENING = { share: 0.6, sideShare: 0.46 }; +const OPENING = { share: 0.5, sideShare: 0.5 }; const MAX = 0.78; /** A pull shorter than this leaves the Lean the whole page. */ const SHUT = 0.08;