nandi/frqpublic Fork 0
cbbcecd
Commits
Clone
git clone https://git.rickub.com/nandi/frq.git
git clone ssh://git@rickub.com/nandi/frq.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Leave the compose bar where the reader last saw it

The jump button's row is now always there — a spacer of its height when the
button is not in it — and the scroll reserves the same space either way. The
reserve used to vary with the button, which moved the compose bar up and down
under the reader every time the view drifted from the end and back.

And the combo sits lower: the chat's bottom margin is smaller than the space
above it, which is where a row at the bottom of a screen wants its room.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
nandi committed 2026-08-30T12:04:05-07:00 Browse files
cbbcecd parent: 68afa6f
modified src/frq/app.jolt +13 -7
@@ -344,17 +344,20 @@
344344 ;; Not a :page a page scrolls everything, which would carry the compose
345345 ;; bar off the bottom with the backlog. The message list is the only thing
346346 ;; that scrolls, bounded so what follows it keeps its room.
347- [:vbox {:spacing 8 :margin 12}
347+ ;; Less room under the compose row than around it: the space a row at the
348+ ;; bottom of a screen wants is above it, not beneath it.
349+ [:vbox {:spacing 8 :margin 12 :margin-bottom 4}
348350 [:hbox {:spacing 8}
349351 [:button {:label "← Chats" :on-click #(reset! s/screen :chats)}]
350352 [:title {:label (or name "Chat")}]]
351353 [error-note]
352- ;; :reserve leaves room for what sits below the separator and compose
353- ;; bar, and the jump button when it is there. A reserve that does not
354- ;; count the button is a list that grows over the compose bar and pushes
355- ;; it off the bottom of the window the moment the button appears.
354+ ;; :reserve leaves room for everything below: the jump button's row, the
355+ ;; separator and the compose bar. It does not vary with whether the button
356+ ;; is showing, and neither does that row a reserve that changed would
357+ ;; move the compose bar under the reader every time the button came and
358+ ;; went.
356359 [:scroll {:orientation :vertical
357- :reserve (if @s/at-present? 72 116)
360+ :reserve 116
358361 :stick-to-bottom true
359362 :scroll-to-bottom @s/jump-tick
360363 :on-change #(reset! s/at-present? (= "end" %))}
@@ -363,8 +366,11 @@
363366 [:dim-label {:label "Nothing here yet."}])]
364367 ;; Only while it is needed, and directly above the compose bar: the way
365368 ;; back to the present belongs next to the thing that puts you there.
369+ ;; The row keeps its height whether or not the button is in it, so the
370+ ;; compose bar below stays where the reader last saw it.
366371 [:vbox {:key :jump}
367- (when-not @s/at-present?
372+ (if @s/at-present?
373+ [:spacer {:size 34}]
368374 [:button {:label "↓ Jump to present" :on-click s/jump-to-present!}])]
369375 [:separator {}]
370376 [:hbox {:spacing 8}
@@ -344,17 +344,20 @@
344 ;; Not a :page a page scrolls everything, which would carry the compose344 ;; Not a :page a page scrolls everything, which would carry the compose
345 ;; bar off the bottom with the backlog. The message list is the only thing345 ;; bar off the bottom with the backlog. The message list is the only thing
346 ;; that scrolls, bounded so what follows it keeps its room.346 ;; that scrolls, bounded so what follows it keeps its room.
347- [:vbox {:spacing 8 :margin 12}347+ ;; Less room under the compose row than around it: the space a row at the
348+ ;; bottom of a screen wants is above it, not beneath it.
349+ [:vbox {:spacing 8 :margin 12 :margin-bottom 4}
348 [:hbox {:spacing 8}350 [:hbox {:spacing 8}
349 [:button {:label "← Chats" :on-click #(reset! s/screen :chats)}]351 [:button {:label "← Chats" :on-click #(reset! s/screen :chats)}]
350 [:title {:label (or name "Chat")}]]352 [:title {:label (or name "Chat")}]]
351 [error-note]353 [error-note]
352- ;; :reserve leaves room for what sits below the separator and compose354+ ;; :reserve leaves room for everything below: the jump button's row, the
353- ;; bar, and the jump button when it is there. A reserve that does not355+ ;; separator and the compose bar. It does not vary with whether the button
354- ;; count the button is a list that grows over the compose bar and pushes356+ ;; is showing, and neither does that row a reserve that changed would
355- ;; it off the bottom of the window the moment the button appears.357+ ;; move the compose bar under the reader every time the button came and
358+ ;; went.
356 [:scroll {:orientation :vertical359 [:scroll {:orientation :vertical
357- :reserve (if @s/at-present? 72 116)360+ :reserve 116
358 :stick-to-bottom true361 :stick-to-bottom true
359 :scroll-to-bottom @s/jump-tick362 :scroll-to-bottom @s/jump-tick
360 :on-change #(reset! s/at-present? (= "end" %))}363 :on-change #(reset! s/at-present? (= "end" %))}
@@ -363,8 +366,11 @@
363 [:dim-label {:label "Nothing here yet."}])]366 [:dim-label {:label "Nothing here yet."}])]
364 ;; Only while it is needed, and directly above the compose bar: the way367 ;; Only while it is needed, and directly above the compose bar: the way
365 ;; back to the present belongs next to the thing that puts you there.368 ;; back to the present belongs next to the thing that puts you there.
369+ ;; The row keeps its height whether or not the button is in it, so the
370+ ;; compose bar below stays where the reader last saw it.
366 [:vbox {:key :jump}371 [:vbox {:key :jump}
367- (when-not @s/at-present?372+ (if @s/at-present?
373+ [:spacer {:size 34}]
368 [:button {:label "↓ Jump to present" :on-click s/jump-to-present!}])]374 [:button {:label "↓ Jump to present" :on-click s/jump-to-present!}])]
369 [:separator {}]375 [:separator {}]
370 [:hbox {:spacing 8}376 [:hbox {:spacing 8}