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

Give the people panel the pane on a narrow window

Beside the backlog the panel is 150 points wide, which on a phone-width
window is half of everything there is: the names ellipsised to three
letters while the conversation next to them had 240. So where the window
is too narrow to hold the chats list and a conversation at once, it is
too narrow to hold a conversation and a column of names — the panel
takes the pane, full width, and the backlog stands down until the People
switch turns it off.

The message column stays in the row rather than vanishing from it, empty
and asking for nothing: a column with no width that still fills the
height would be handed half the row by `flexed`, which is the squash
again with the scroll left in it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
nandi committed 2026-09-12T09:10:13-07:00 Browse files
553469e parent: 52bb072
modified common/frq/screens/chat.cljc +37 -20
@@ -1133,10 +1133,17 @@
11331133
11341134 The list is the server's — NAMES on the way in, kept up by the joins and
11351135 parts after it — so a channel this client has never been in has nothing to
1136- show, and says so rather than showing an empty column."
1137- [name]
1136+ show, and says so rather than showing an empty column.
1137+
1138+ On a window too narrow to have shown the chats list and a conversation at
1139+ once, it is too narrow to show a conversation and a 150-point column beside
1140+ it either: the names ellipsised to three letters while the panel took half
1141+ the screen. So there it is not a column beside the backlog — it is what the
1142+ backlog's place holds, full width, until the switch above turns it off."
1143+ [name narrow?]
11381144 (let [people (actions/member-list name)]
1139- [:vbox {:key :users :width-request users-width :fill-height true
1145+ [:vbox {:key :users :width-request (when-not narrow? users-width)
1146+ :fill-height true
11401147 :reserve (below-messages) :spacing 8}
11411148 [:title-2 {:label (str "People " (count people))}]
11421149 [:scroll {:scroll-key (str "users-" name)
@@ -1151,7 +1158,11 @@
11511158 (defn chat-screen []
11521159 (let [name @cells/current
11531160 buffer (get @cells/channels name)
1154- show-users? (and @cells/show-users? name (str/starts-with? name "#"))]
1161+ show-users? (and @cells/show-users? name (str/starts-with? name "#"))
1162+ ;; Beside the backlog only where there is room for both. On a narrow
1163+ ;; window the panel is the pane, and the backlog stands down for as
1164+ ;; long as it is up — see `users-panel`.
1165+ narrow-people? (and show-users? (not (actions/wide?)))]
11551166 ;; Not a :page — a page scrolls everything, which would carry the compose
11561167 ;; bar off the bottom with the backlog. The message list is the only thing
11571168 ;; that scrolls, bounded so what follows it keeps its room.
@@ -1239,26 +1250,32 @@
12391250 ;; for the reconciler, and take the message list's scroll position with
12401251 ;; it every time the panel was toggled.
12411252 [:hbox {:spacing 8 :wrap false}
1242- [:vbox {:key :messages :fill-height true
1243- :width-request (if show-users? (messages-width) 0)}
1244- [:scroll {:scroll-key (messages-scroll-key)
1245- :orientation :vertical
1246- :reserve (below-messages)
1247- :stick-to-bottom true
1248- :scroll-to-bottom @cells/jump-tick
1249- :on-change #(reset! cells/at-present? (= "end" %))
1250- ;; The terminal's half of the same question, which arrives
1251- ;; as the offset the list moved to rather than as a place.
1252- ;; `scrolled!` is what turns one into the other.
1253- :on-scroll actions/scrolled!}
1254- (if (seq (:messages buffer))
1255- (message-rows (:messages buffer))
1256- [:dim-label {:label "Nothing here yet."}])]]
1253+ ;; Empty and claiming nothing when the panel has taken the pane: a column
1254+ ;; with no width and something filling it inside would still be handed
1255+ ;; half the row, which is the squash with the scroll left in it.
1256+ [:vbox {:key :messages :fill-height (not narrow-people?)
1257+ :width-request (if (and show-users? (not narrow-people?))
1258+ (messages-width)
1259+ 0)}
1260+ (when-not narrow-people?
1261+ [:scroll {:scroll-key (messages-scroll-key)
1262+ :orientation :vertical
1263+ :reserve (below-messages)
1264+ :stick-to-bottom true
1265+ :scroll-to-bottom @cells/jump-tick
1266+ :on-change #(reset! cells/at-present? (= "end" %))
1267+ ;; The terminal's half of the same question, which arrives
1268+ ;; as the offset the list moved to rather than as a place.
1269+ ;; `scrolled!` is what turns one into the other.
1270+ :on-scroll actions/scrolled!}
1271+ (if (seq (:messages buffer))
1272+ (message-rows (:messages buffer))
1273+ [:dim-label {:label "Nothing here yet."}])])]
12571274 ;; The wrapper takes no height of its own: the panel inside it is the
12581275 ;; column, and a fill-height wrapper around it would claim the strip the
12591276 ;; compose bar sits in whether or not the panel was showing.
12601277 [:vbox {:key :people-pane}
1261- (when show-users? [users-panel name])]]
1278+ (when show-users? [users-panel name narrow-people?])]]
12621279 ;; Only while it is needed, and directly under the backlog: the way back
12631280 ;; to the present belongs next to the thing that puts you there, which is
12641281 ;; the conversation and not the overview.
@@ -1133,10 +1133,17 @@
1133 1133
1134 The list is the server's — NAMES on the way in, kept up by the joins and1134 The list is the server's — NAMES on the way in, kept up by the joins and
1135 parts after it — so a channel this client has never been in has nothing to1135 parts after it — so a channel this client has never been in has nothing to
1136- show, and says so rather than showing an empty column."1136+ show, and says so rather than showing an empty column.
1137- [name]1137+
1138+ On a window too narrow to have shown the chats list and a conversation at
1139+ once, it is too narrow to show a conversation and a 150-point column beside
1140+ it either: the names ellipsised to three letters while the panel took half
1141+ the screen. So there it is not a column beside the backlog — it is what the
1142+ backlog's place holds, full width, until the switch above turns it off."
1143+ [name narrow?]
1138 (let [people (actions/member-list name)]1144 (let [people (actions/member-list name)]
1139- [:vbox {:key :users :width-request users-width :fill-height true1145+ [:vbox {:key :users :width-request (when-not narrow? users-width)
1146+ :fill-height true
1140 :reserve (below-messages) :spacing 8}1147 :reserve (below-messages) :spacing 8}
1141 [:title-2 {:label (str "People " (count people))}]1148 [:title-2 {:label (str "People " (count people))}]
1142 [:scroll {:scroll-key (str "users-" name)1149 [:scroll {:scroll-key (str "users-" name)
@@ -1151,7 +1158,11 @@
1151 (defn chat-screen []1158 (defn chat-screen []
1152 (let [name @cells/current1159 (let [name @cells/current
1153 buffer (get @cells/channels name)1160 buffer (get @cells/channels name)
1154- show-users? (and @cells/show-users? name (str/starts-with? name "#"))]1161+ show-users? (and @cells/show-users? name (str/starts-with? name "#"))
1162+ ;; Beside the backlog only where there is room for both. On a narrow
1163+ ;; window the panel is the pane, and the backlog stands down for as
1164+ ;; long as it is up — see `users-panel`.
1165+ narrow-people? (and show-users? (not (actions/wide?)))]
1155 ;; Not a :page — a page scrolls everything, which would carry the compose1166 ;; Not a :page — a page scrolls everything, which would carry the compose
1156 ;; bar off the bottom with the backlog. The message list is the only thing1167 ;; bar off the bottom with the backlog. The message list is the only thing
1157 ;; that scrolls, bounded so what follows it keeps its room.1168 ;; that scrolls, bounded so what follows it keeps its room.
@@ -1239,26 +1250,32 @@
1239 ;; for the reconciler, and take the message list's scroll position with1250 ;; for the reconciler, and take the message list's scroll position with
1240 ;; it every time the panel was toggled.1251 ;; it every time the panel was toggled.
1241 [:hbox {:spacing 8 :wrap false}1252 [:hbox {:spacing 8 :wrap false}
1242- [:vbox {:key :messages :fill-height true1253+ ;; Empty and claiming nothing when the panel has taken the pane: a column
1243- :width-request (if show-users? (messages-width) 0)}1254+ ;; with no width and something filling it inside would still be handed
1244- [:scroll {:scroll-key (messages-scroll-key)1255+ ;; half the row, which is the squash with the scroll left in it.
1245- :orientation :vertical1256+ [:vbox {:key :messages :fill-height (not narrow-people?)
1246- :reserve (below-messages)1257+ :width-request (if (and show-users? (not narrow-people?))
1247- :stick-to-bottom true1258+ (messages-width)
1248- :scroll-to-bottom @cells/jump-tick1259+ 0)}
1249- :on-change #(reset! cells/at-present? (= "end" %))1260+ (when-not narrow-people?
1250- ;; The terminal's half of the same question, which arrives1261+ [:scroll {:scroll-key (messages-scroll-key)
1251- ;; as the offset the list moved to rather than as a place.1262+ :orientation :vertical
1252- ;; `scrolled!` is what turns one into the other.1263+ :reserve (below-messages)
1253- :on-scroll actions/scrolled!}1264+ :stick-to-bottom true
1254- (if (seq (:messages buffer))1265+ :scroll-to-bottom @cells/jump-tick
1255- (message-rows (:messages buffer))1266+ :on-change #(reset! cells/at-present? (= "end" %))
1256- [:dim-label {:label "Nothing here yet."}])]]1267+ ;; The terminal's half of the same question, which arrives
1268+ ;; as the offset the list moved to rather than as a place.
1269+ ;; `scrolled!` is what turns one into the other.
1270+ :on-scroll actions/scrolled!}
1271+ (if (seq (:messages buffer))
1272+ (message-rows (:messages buffer))
1273+ [:dim-label {:label "Nothing here yet."}])])]
1257 ;; The wrapper takes no height of its own: the panel inside it is the1274 ;; The wrapper takes no height of its own: the panel inside it is the
1258 ;; column, and a fill-height wrapper around it would claim the strip the1275 ;; column, and a fill-height wrapper around it would claim the strip the
1259 ;; compose bar sits in whether or not the panel was showing.1276 ;; compose bar sits in whether or not the panel was showing.
1260 [:vbox {:key :people-pane}1277 [:vbox {:key :people-pane}
1261- (when show-users? [users-panel name])]]1278+ (when show-users? [users-panel name narrow-people?])]]
1262 ;; Only while it is needed, and directly under the backlog: the way back1279 ;; Only while it is needed, and directly under the backlog: the way back
1263 ;; to the present belongs next to the thing that puts you there, which is1280 ;; to the present belongs next to the thing that puts you there, which is
1264 ;; the conversation and not the overview.1281 ;; the conversation and not the overview.