Commit 5c98640
committed
wip scroll: Show start of latest message if long, instead of end; TODO test
TODO test, inter alia: clamp min, clamp max
This makes our first payoff in actual UX from having the message list
split into two back-to-back slivers!
With this change, if you open a message list and the latest message
is very tall, the list starts out scrolled so that you can see the
top of that latest message -- plus a bit of context above it (25% of
the viewport's height). Previously the list would always start out
scrolled to the end, so you'd have to scroll up in order to read
even the one latest message from the beginning.
In addition to a small UX improvement now, this makes a preview of
behavior we'll want to have when the bottom sliver starts at the
first unread message, and may have many messages after that.
This new behavior is nice already with one message, if the message
happens to be very tall; but it'll become critical when the bottom
sliver is routinely many screenfuls tall.1 parent c072738 commit 5c98640
1 file changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
329 | | - | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
330 | 332 | | |
331 | 333 | | |
332 | | - | |
| 334 | + | |
| 335 | + | |
333 | 336 | | |
334 | 337 | | |
335 | 338 | | |
| |||
0 commit comments