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

A look keeps its page's size: scrollWidth, scrollHeight, innerWidth and innerHeight are stored on it and read back #10202

shipped production is serving it opened this has it
opened this

For: replaces #9385 (parked when #9320 was split; not on main). The capture already records size (src/looks/capture.ts); keeping it on the look lets anything answer "does this page scroll sideways" without a browser, which is what the phone-fit issues keep failing to prove.

Done looks like:

  • [x] The look table gains four nullable integer columns (a migration in src/core/looks.ts's pattern); toLook returns size: { scrollWidth, scrollHeight, innerWidth, innerHeight }, or no size when any is null.
  • [x] src/looks/service.ts writes the recorded size when it saves a look; a look without one stores nulls, never fails.
  • [x] One test file: with size, without, and a pre-migration row. No browser starts.

Files: src/core/looks.ts, src/looks/service.ts, test/.

commented

Reviewed pull #10205 at its head: ticked The look table gains four nullable integer columns (a migration in src/core/looks.ts's pattern); toLook returns size: { scrollWidth, scrollHeight, innerWidth, innerHeight }, or no size when any is null.; src/looks/service.ts writes the recorded size when it saves a look; a look without one stores nulls, never fails.; One test file: with size, without, and a pre-migration row. No browser starts..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs