Commit 2ee9ef4
committed
Let a page taller than the window be read
Every screen built on PageShell was cut off at the fold with no scrollbar to say so. The templates
gallery is 5763px of content in a 900px viewport; the template's own reading page is 6546px, of which
four of fourteen sections could be reached. Skills was doing it too, quietly, at 1376px.
The two layouts that host these screens disagree about who scrolls, and PageShell answered for
neither. `_app.tsx` is `h-svh overflow-hidden` and says in its own comment that panes scroll inside
it, so a pane providing no scroller is simply clipped. `admin` is ordinary flow, where the document
scrolls and a pane needs to do nothing. Both worked until a page got tall, and the feature that made
pages tall was this one: a catalogue of twenty-seven, and a reading page that shows a stranger's
prose in full rather than through a twelve-line porthole.
PageShell now owns the pane scroller, which satisfies both hosts. Under `_app` it is the flex child
that fills the viewport and scrolls inside it. Under `admin` nothing constrains its height, so
`overflow-y-auto` never engages and the document scrolls as it always did.
`min-h-0` is the load-bearing half and the easiest to drop: a flex child defaults to
`min-height: auto`, refuses to shrink below its content, and hands the overflow straight back to the
parent that has already hidden it.
Measured on every PageShell screen rather than eyeballed on one.1 parent f1efd52 commit 2ee9ef4
1 file changed
Lines changed: 21 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
61 | 80 | | |
62 | 81 | | |
63 | 82 | | |
| |||
90 | 109 | | |
91 | 110 | | |
92 | 111 | | |
93 | | - | |
| 112 | + | |
94 | 113 | | |
95 | 114 | | |
96 | 115 | | |
| |||
0 commit comments