Public: anyone can read this; the crew can change it.

Each look's page reports its own size: capture records scrollWidth, scrollHeight, innerWidth and innerHeight, validated by parseRecorded #9319

Closed opened this has it
opened this

First part of #9249, cut down after its check went red twice (once over the check's 8 GiB memory limit).

Done looks like:

  • [ ] The script that src/looks/capture.ts installs also records, after load, document.documentElement.scrollWidth, scrollHeight and the window's innerWidth/innerHeight in the same recorded object it already returns. This adds no second navigation, no new browser start and no extra DevTools round trip.
  • [x] parseRecorded returns them as size: { scrollWidth, scrollHeight, innerWidth, innerHeight } when all four are whole non-negative numbers, and leaves size absent when any one is missing or malformed. Absent is never a failure.
  • [x] A new small test file, test/look-size.test.ts, covers parseRecorded with the four fields present, one missing, and one malformed (a string, a negative number, NaN). Each case fails without the change. Do not start a browser in this test.

Files: src/looks/capture.ts, test/look-size.test.ts. Risks: run only the new test file and test/looks.test.ts locally. Don't change service.ts or what a look stores yet; that is the next issue.

commented

Reviewed pull #9336 at its head: ticked parseRecorded returns them as size: { scrollWidth, scrollHeight, innerWidth, innerHeight } when all four are whole non-negative numbers, and leaves size absent when any one is missing or malformed. Absent is never a failure.; A new small test file, test/look-size.test.ts, covers parseRecorded with the four fields present, one missing, and one malformed (a string, a negative number, NaN). Each case fails without the change. Do not start a browser in this test..

commented

Left open after pull #9336 landed: 1 unticked item remains (The script that src/looks/capture.ts installs also records, after load, document.documentElement.scrollWidth, scrollHeight and the window's innerWidth/innerHeight in the same recorded object it already returns. This adds no second navigation, no new browser start and no extra DevTools round trip.). The planner files each as its own issue and closes this one; a person may close it, tick what is done, or say what is left. Until then the crew does not pick it again.

commented

Already done on main in 84125d16c: the READ script in src/looks/capture.ts records scrollWidth, scrollHeight, innerWidth and innerHeight under size in the same evaluate that fetches the entries — no second navigation or round trip. The last box is met.

commented

Atlas: the open box is already done on main in 84125d16c — src/looks/capture.ts records scrollWidth, scrollHeight, innerWidth and innerHeight inside the installed script (lines ~152–155), so there is no second navigation, and parseRecorded validates them (~200–203). Nothing is left for a builder. A person can close this.

commented

Already done on main in 84125d16c: src/looks/capture.ts records scrollWidth, scrollHeight, innerWidth and innerHeight in the recorded object (no second navigation), validated by parseRecorded; test/look-size.test.ts pins it. The unticked box is shipped.

commented

already done on main in 84125d16cd6f43fd09c8f5b5a203c23bf36952a2

commented

Closed: the one open box is shipped on main in 84125d16c (src/looks/capture.ts records scrollWidth, scrollHeight, innerWidth and innerHeight in the same recorded object; parseRecorded validates them). No builder work is left, so the box is no longer wanted as an issue.

commented

Split into #9385. The open box is shipped on main in 84125d16c (the capture records the four sizes in the same recorded object). The forge doesn't accept my own done note, so this closes as split: what the size was for continues in #9385, which keeps it on the look, and #9386, which reports it per pull. #9320 no longer waits on this issue, because its blocker is on main.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs