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

Keep Join beside the box it belongs to

The join and search boxes asked for a fixed 380 points. That is right on a
window holding the list alone, and too wide for the list as a split view's
left column: the row is only sidebar-width across, so the entry took it all
and the button beside it wrapped onto a line of its own — Join under the
field rather than next to it.

Both rows now size their entry against the pane they are in, leaving room
for the button, the gap and the padding around them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
nandi committed 2026-08-30T19:44:27-07:00 Browse files
4256fb3 parent: d559f7a
modified src/frq/app.jolt +17 -4
@@ -160,6 +160,21 @@
160160 [:dim-label {:label (s/last-preview buffer)}]
161161 [:button {:label "Open" :kind :primary :on-click #(s/open-channel! name)}]]))
162162
163+(def ^:private sidebar-width 320)
164+
165+(defn- control-entry-width
166+ "How wide the join and search boxes ask to be.
167+
168+ A fixed 380 is right on a window that holds the list alone, and too wide for
169+ the list as a split view's left column: the row it sits on is only
170+ `sidebar-width` across, and an entry that asks for more than remains pushes
171+ the button beside it onto a row of its own — Join under the box rather than
172+ next to it. Beside the entry go the button and the gap, and around the row
173+ the card's and the page's padding, so the column's share is what is left of
174+ the sidebar after those."
175+ []
176+ (if (s/wide?) (- sidebar-width 130) 380))
177+
163178 (defn chats-screen []
164179 (let [buffers (s/channel-list)]
165180 [:page {:max-width 620}
@@ -179,7 +194,7 @@
179194 ;; Both kinds of conversation through one box: `#room` joins a
180195 ;; channel, `@nick` opens a message to a person.
181196 [:entry {:text @s/join-input
182- :width-request 380
197+ :width-request (control-entry-width)
183198 :placeholder "#channel or @nick"
184199 :on-change #(reset! s/join-input %)
185200 :on-activate #(do (s/join! @s/join-input) (reset! s/join-input ""))}]
@@ -191,7 +206,7 @@
191206 ;; one that stopped working.
192207 [:hbox {:spacing 8}
193208 [:entry {:text @s/search
194- :width-request 380
209+ :width-request (control-entry-width)
195210 :placeholder "Search channels"
196211 :on-change #(reset! s/search %)}]
197212 (when (seq @s/search)
@@ -840,8 +855,6 @@
840855 (when (and (empty? dirs) (empty? files))
841856 [:dim-label {:label "No pictures here that this app can read."}])]]]]))
842857
843-(def ^:private sidebar-width 320)
844-
845858 ;; What the people panel asks for, and what the conversation beside it has to
846859 ;; be told to leave. A column with `:fill-height` and no width takes the whole
847860 ;; row — so the panel is only ever on screen if the message list is given a
@@ -160,6 +160,21 @@
160 [:dim-label {:label (s/last-preview buffer)}]160 [:dim-label {:label (s/last-preview buffer)}]
161 [:button {:label "Open" :kind :primary :on-click #(s/open-channel! name)}]]))161 [:button {:label "Open" :kind :primary :on-click #(s/open-channel! name)}]]))
162 162
163+(def ^:private sidebar-width 320)
164+
165+(defn- control-entry-width
166+ "How wide the join and search boxes ask to be.
167+
168+ A fixed 380 is right on a window that holds the list alone, and too wide for
169+ the list as a split view's left column: the row it sits on is only
170+ `sidebar-width` across, and an entry that asks for more than remains pushes
171+ the button beside it onto a row of its own — Join under the box rather than
172+ next to it. Beside the entry go the button and the gap, and around the row
173+ the card's and the page's padding, so the column's share is what is left of
174+ the sidebar after those."
175+ []
176+ (if (s/wide?) (- sidebar-width 130) 380))
177+
163 (defn chats-screen []178 (defn chats-screen []
164 (let [buffers (s/channel-list)]179 (let [buffers (s/channel-list)]
165 [:page {:max-width 620}180 [:page {:max-width 620}
@@ -179,7 +194,7 @@
179 ;; Both kinds of conversation through one box: `#room` joins a194 ;; Both kinds of conversation through one box: `#room` joins a
180 ;; channel, `@nick` opens a message to a person.195 ;; channel, `@nick` opens a message to a person.
181 [:entry {:text @s/join-input196 [:entry {:text @s/join-input
182- :width-request 380197+ :width-request (control-entry-width)
183 :placeholder "#channel or @nick"198 :placeholder "#channel or @nick"
184 :on-change #(reset! s/join-input %)199 :on-change #(reset! s/join-input %)
185 :on-activate #(do (s/join! @s/join-input) (reset! s/join-input ""))}]200 :on-activate #(do (s/join! @s/join-input) (reset! s/join-input ""))}]
@@ -191,7 +206,7 @@
191 ;; one that stopped working.206 ;; one that stopped working.
192 [:hbox {:spacing 8}207 [:hbox {:spacing 8}
193 [:entry {:text @s/search208 [:entry {:text @s/search
194- :width-request 380209+ :width-request (control-entry-width)
195 :placeholder "Search channels"210 :placeholder "Search channels"
196 :on-change #(reset! s/search %)}]211 :on-change #(reset! s/search %)}]
197 (when (seq @s/search)212 (when (seq @s/search)
@@ -840,8 +855,6 @@
840 (when (and (empty? dirs) (empty? files))855 (when (and (empty? dirs) (empty? files))
841 [:dim-label {:label "No pictures here that this app can read."}])]]]]))856 [:dim-label {:label "No pictures here that this app can read."}])]]]]))
842 857
843-(def ^:private sidebar-width 320)
844-
845 ;; What the people panel asks for, and what the conversation beside it has to858 ;; What the people panel asks for, and what the conversation beside it has to
846 ;; be told to leave. A column with `:fill-height` and no width takes the whole859 ;; be told to leave. A column with `:fill-height` and no width takes the whole
847 ;; row — so the panel is only ever on screen if the message list is given a860 ;; row — so the panel is only ever on screen if the message list is given a