nandi/frqpublic Fork 0
db958d8
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.

Let a fill-height column stop short of what follows it

The people panel put the conversation inside a `:fill-height` column, and
fill-height meant everything from the cursor to the bottom of the window —
so the jump row, the separator and the compose bar were pushed against the
bottom edge and the compose row's margin had nowhere to sit.

`:reserve` now bounds a fill-height region the way it already bounds a
`:scroll`, and the columns of the row carry it. Nothing inside them does:
a scroll subtracting it again inside a column that had already stopped
short took the same points off the list twice.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
nandi committed 2026-08-30T19:20:08-07:00 Browse files
db958d8 parent: 9cf11a6
modified src/frq/app.jolt +23 -12
@@ -848,6 +848,21 @@
848848 ;; width that stops short of it.
849849 (def ^:private users-width 180)
850850
851+;; What the rows under the conversation need left to them: the jump button's
852+;; row, the separator, the compose bar and the air around it. The columns of
853+;; the row reserve it, and so nothing inside them has to — a `:scroll` that
854+;; subtracted it again inside a column already stopped short would take the
855+;; same points off the list twice.
856+;;
857+;; Plus the reply banner's row when there is one, and the pasted picture when
858+;; there is one. Those rows do move the compose bar, and should: each appears
859+;; because the reader just asked for something — unlike the jump button, which
860+;; appears on its own and must not shift what is under it.
861+(defn- below-messages []
862+ (+ 124
863+ (if @s/replying-to 34 0)
864+ (if @s/attachment 76 0)))
865+
851866 (defn- messages-width
852867 "How wide the message list may be with the people panel beside it.
853868
@@ -882,11 +897,11 @@
882897 show, and says so rather than showing an empty column."
883898 [name]
884899 (let [people (s/member-list name)]
885- [:vbox {:key :users :width-request users-width :fill-height true :spacing 8}
900+ [:vbox {:key :users :width-request users-width :fill-height true
901+ :reserve (below-messages) :spacing 8}
886902 [:title-2 {:label (str "People " (count people))}]
887903 [:scroll {:scroll-key (str "users-" name)
888- :orientation :vertical
889- :reserve 124}
904+ :orientation :vertical}
890905 (if (seq people)
891906 (for [p people] [member-row p])
892907 [:dim-label {:label "Nobody listed yet."}])]]))
@@ -947,24 +962,20 @@
947962 ;; it every time the panel was toggled.
948963 [:hbox {:spacing 8 :wrap false}
949964 [:vbox {:key :messages :fill-height true
965+ :reserve (below-messages)
950966 :width-request (if show-users? (messages-width) 0)}
951967 [:scroll {:scroll-key "chat-messages"
952968 :orientation :vertical
953- ;; Plus the reply banner's row when there is one, and the
954- ;; pasted picture when there is one. Those rows do move the
955- ;; compose bar, and should: each appears because the reader just
956- ;; asked for something — unlike the jump button, which appears
957- ;; on its own and must not shift what is under it.
958- :reserve (+ 124
959- (if @s/replying-to 34 0)
960- (if @s/attachment 76 0))
961969 :stick-to-bottom true
962970 :scroll-to-bottom @s/jump-tick
963971 :on-change #(reset! s/at-present? (= "end" %))}
964972 (if (seq (:messages buffer))
965973 (message-rows (:messages buffer))
966974 [:dim-label {:label "Nothing here yet."}])]]
967- [:vbox {:key :people-pane :fill-height true}
975+ ;; The wrapper takes no height of its own: the panel inside it is the
976+ ;; column, and a fill-height wrapper around it would claim the strip the
977+ ;; compose bar sits in whether or not the panel was showing.
978+ [:vbox {:key :people-pane}
968979 (when show-users? [users-panel name])]]
969980 ;; Only while it is needed, and directly above the compose bar: the way
970981 ;; back to the present belongs next to the thing that puts you there.
@@ -848,6 +848,21 @@
848 ;; width that stops short of it.848 ;; width that stops short of it.
849 (def ^:private users-width 180)849 (def ^:private users-width 180)
850 850
851+;; What the rows under the conversation need left to them: the jump button's
852+;; row, the separator, the compose bar and the air around it. The columns of
853+;; the row reserve it, and so nothing inside them has to — a `:scroll` that
854+;; subtracted it again inside a column already stopped short would take the
855+;; same points off the list twice.
856+;;
857+;; Plus the reply banner's row when there is one, and the pasted picture when
858+;; there is one. Those rows do move the compose bar, and should: each appears
859+;; because the reader just asked for something — unlike the jump button, which
860+;; appears on its own and must not shift what is under it.
861+(defn- below-messages []
862+ (+ 124
863+ (if @s/replying-to 34 0)
864+ (if @s/attachment 76 0)))
865+
851 (defn- messages-width866 (defn- messages-width
852 "How wide the message list may be with the people panel beside it.867 "How wide the message list may be with the people panel beside it.
853 868
@@ -882,11 +897,11 @@
882 show, and says so rather than showing an empty column."897 show, and says so rather than showing an empty column."
883 [name]898 [name]
884 (let [people (s/member-list name)]899 (let [people (s/member-list name)]
885- [:vbox {:key :users :width-request users-width :fill-height true :spacing 8}900+ [:vbox {:key :users :width-request users-width :fill-height true
901+ :reserve (below-messages) :spacing 8}
886 [:title-2 {:label (str "People " (count people))}]902 [:title-2 {:label (str "People " (count people))}]
887 [:scroll {:scroll-key (str "users-" name)903 [:scroll {:scroll-key (str "users-" name)
888- :orientation :vertical904+ :orientation :vertical}
889- :reserve 124}
890 (if (seq people)905 (if (seq people)
891 (for [p people] [member-row p])906 (for [p people] [member-row p])
892 [:dim-label {:label "Nobody listed yet."}])]]))907 [:dim-label {:label "Nobody listed yet."}])]]))
@@ -947,24 +962,20 @@
947 ;; it every time the panel was toggled.962 ;; it every time the panel was toggled.
948 [:hbox {:spacing 8 :wrap false}963 [:hbox {:spacing 8 :wrap false}
949 [:vbox {:key :messages :fill-height true964 [:vbox {:key :messages :fill-height true
965+ :reserve (below-messages)
950 :width-request (if show-users? (messages-width) 0)}966 :width-request (if show-users? (messages-width) 0)}
951 [:scroll {:scroll-key "chat-messages"967 [:scroll {:scroll-key "chat-messages"
952 :orientation :vertical968 :orientation :vertical
953- ;; Plus the reply banner's row when there is one, and the
954- ;; pasted picture when there is one. Those rows do move the
955- ;; compose bar, and should: each appears because the reader just
956- ;; asked for something — unlike the jump button, which appears
957- ;; on its own and must not shift what is under it.
958- :reserve (+ 124
959- (if @s/replying-to 34 0)
960- (if @s/attachment 76 0))
961 :stick-to-bottom true969 :stick-to-bottom true
962 :scroll-to-bottom @s/jump-tick970 :scroll-to-bottom @s/jump-tick
963 :on-change #(reset! s/at-present? (= "end" %))}971 :on-change #(reset! s/at-present? (= "end" %))}
964 (if (seq (:messages buffer))972 (if (seq (:messages buffer))
965 (message-rows (:messages buffer))973 (message-rows (:messages buffer))
966 [:dim-label {:label "Nothing here yet."}])]]974 [:dim-label {:label "Nothing here yet."}])]]
967- [:vbox {:key :people-pane :fill-height true}975+ ;; The wrapper takes no height of its own: the panel inside it is the
976+ ;; column, and a fill-height wrapper around it would claim the strip the
977+ ;; compose bar sits in whether or not the panel was showing.
978+ [:vbox {:key :people-pane}
968 (when show-users? [users-panel name])]]979 (when show-users? [users-panel name])]]
969 ;; Only while it is needed, and directly above the compose bar: the way980 ;; Only while it is needed, and directly above the compose bar: the way
970 ;; back to the present belongs next to the thing that puts you there.981 ;; back to the present belongs next to the thing that puts you there.