Commit 2e69ee7
authored
refactor: remove auto bottom inset on scrollables (#784)
* refactor: remove auto bottom inset on scrollables
Scrollables no longer get the bottom safe-area inset applied natively.
Only keyboard handling stays automatic — apply the inset in JS instead.
Also drops manual scroll indicator insets on iOS; UIKit derives them
from the content inset.
* refactor: rename pinned scroll view to detected
v3 literally pinned the scroll view's frame to the container. v4 lets
Yoga own every frame — we only detect it and wire keyboard handling.
* docs: add changelog entry for #784
* fix(web): don't lift detected scrollables above the bottom safe area
Mirrors native — scroll content runs edge-to-edge behind the home
indicator and user-applied content padding owns the inset. Avoids
double padding when following the v4 migration advice.
* fix(ios): drop keyboard content inset — the sheet already avoids the keyboard
UIKit keeps the sheet above the keyboard and v4 rebounds the container
to the sheet's visible size, so the viewport is never behind it. The
v3-era keyboardHeight inset double-compensated, leaving a huge gap at
the bottom of scroll content while typing. Caret auto-scroll now
extends its target past an absolute footer instead.
* fix(ios): apply keyboard inset only when content overflows the viewport
Restores the keyboard-height content inset — content that already fits
above the keyboard has nothing to reveal, so the inset only opened
blank scroll range below it (huge gap at the bottom). Re-synced while
typing since a growing multiline input can cross the threshold.
* fix: keyboard inset stops at the keyboard edge for absolute footers
The inset also lifted content above a floating footer, doubling the
clearance the user's content padding already provides. Footer clearance
now belongs to the padding alone; the caret reveal extends its target
past the footer instead.
* chore(example): fix PromptSheet FOOTER_HEIGHT1 parent e13a5fc commit 2e69ee7
19 files changed
Lines changed: 194 additions & 161 deletions
File tree
- android/src/main/java/com/lodev09/truesheet
- core
- common/cpp/react/renderer/components/TrueSheetSpec
- docs/docs
- guides
- ios
- src
- fabric
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
Lines changed: 1 addition & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | | - | |
66 | 64 | | |
67 | 65 | | |
68 | 66 | | |
| |||
96 | 94 | | |
97 | 95 | | |
98 | 96 | | |
99 | | - | |
100 | | - | |
| 97 | + | |
101 | 98 | | |
102 | 99 | | |
103 | 100 | | |
| |||
Lines changed: 41 additions & 46 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
50 | | - | |
| 51 | + | |
51 | 52 | | |
52 | | - | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
132 | | - | |
133 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
138 | | - | |
| 137 | + | |
139 | 138 | | |
140 | 139 | | |
141 | 140 | | |
142 | 141 | | |
143 | 142 | | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
| 143 | + | |
| 144 | + | |
148 | 145 | | |
149 | | - | |
150 | | - | |
| 146 | + | |
| 147 | + | |
151 | 148 | | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
156 | 152 | | |
157 | | - | |
158 | | - | |
159 | 153 | | |
160 | 154 | | |
161 | | - | |
162 | | - | |
163 | | - | |
| 155 | + | |
164 | 156 | | |
165 | 157 | | |
166 | 158 | | |
| |||
170 | 162 | | |
171 | 163 | | |
172 | 164 | | |
173 | | - | |
| 165 | + | |
174 | 166 | | |
175 | 167 | | |
176 | 168 | | |
| |||
181 | 173 | | |
182 | 174 | | |
183 | 175 | | |
184 | | - | |
185 | | - | |
186 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
187 | 179 | | |
188 | 180 | | |
189 | | - | |
| 181 | + | |
190 | 182 | | |
191 | | - | |
192 | 183 | | |
193 | 184 | | |
194 | 185 | | |
195 | | - | |
| 186 | + | |
196 | 187 | | |
197 | 188 | | |
198 | 189 | | |
| |||
276 | 267 | | |
277 | 268 | | |
278 | 269 | | |
279 | | - | |
| 270 | + | |
280 | 271 | | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
285 | 276 | | |
286 | | - | |
| 277 | + | |
287 | 278 | | |
288 | | - | |
| 279 | + | |
289 | 280 | | |
290 | 281 | | |
291 | 282 | | |
292 | 283 | | |
293 | 284 | | |
294 | 285 | | |
295 | 286 | | |
296 | | - | |
| 287 | + | |
297 | 288 | | |
298 | 289 | | |
299 | 290 | | |
300 | 291 | | |
301 | 292 | | |
302 | | - | |
| 293 | + | |
303 | 294 | | |
304 | 295 | | |
305 | 296 | | |
| |||
326 | 317 | | |
327 | 318 | | |
328 | 319 | | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
329 | 324 | | |
330 | 325 | | |
331 | 326 | | |
332 | 327 | | |
333 | 328 | | |
334 | 329 | | |
335 | | - | |
336 | | - | |
| 330 | + | |
| 331 | + | |
337 | 332 | | |
338 | 333 | | |
339 | 334 | | |
| |||
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
322 | | - | |
323 | | - | |
324 | 322 | | |
325 | 323 | | |
326 | 324 | | |
| |||
643 | 641 | | |
644 | 642 | | |
645 | 643 | | |
646 | | - | |
| 644 | + | |
647 | 645 | | |
648 | 646 | | |
649 | 647 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
128 | 154 | | |
129 | 155 | | |
130 | 156 | | |
| |||
134 | 160 | | |
135 | 161 | | |
136 | 162 | | |
137 | | - | |
| 163 | + | |
138 | 164 | | |
139 | 165 | | |
140 | 166 | | |
| |||
251 | 277 | | |
252 | 278 | | |
253 | 279 | | |
| 280 | + | |
254 | 281 | | |
255 | 282 | | |
256 | 283 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
42 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
43 | 48 | | |
44 | 49 | | |
45 | 50 | | |
| |||
75 | 80 | | |
76 | 81 | | |
77 | 82 | | |
78 | | - | |
79 | 83 | | |
80 | 84 | | |
0 commit comments