nandi/frqpublic Fork 0
3343b8e
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 the channel search be undone

The search box had no way out but the keyboard: a filter you can only
leave by selecting and deleting what you typed. The button says the
list is filtered as much as it clears it, so it only stands there while
there is something to clear.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
nandi committed 2026-08-30T18:17:53-07:00 Browse files
3343b8e parent: a477f70
modified src/frq/app.jolt +10 -3
@@ -165,9 +165,16 @@
165165 [:button {:label "Join"
166166 :kind :primary
167167 :on-click #(do (s/join! @s/join-input) (reset! s/join-input ""))}]]]
168- [:entry {:text @s/search
169- :placeholder "Search channels"
170- :on-change #(reset! s/search %)}]
168+ ;; The clear button only shows while there is something to clear: an
169+ ;; empty box has nothing to undo, and a dead button beside it reads as
170+ ;; one that stopped working.
171+ [:hbox {:spacing 6}
172+ [:entry {:text @s/search
173+ :width-request 380
174+ :placeholder "Search channels"
175+ :on-change #(reset! s/search %)}]
176+ (when (seq @s/search)
177+ [:button {:label "✕" :on-click #(reset! s/search "")}])]
171178 (if (seq buffers)
172179 (for [b buffers] [conversation-row b])
173180 [:card {} [:dim-label {:label "No conversations yet — join a channel."}]])
@@ -165,9 +165,16 @@
165 [:button {:label "Join"165 [:button {:label "Join"
166 :kind :primary166 :kind :primary
167 :on-click #(do (s/join! @s/join-input) (reset! s/join-input ""))}]]]167 :on-click #(do (s/join! @s/join-input) (reset! s/join-input ""))}]]]
168- [:entry {:text @s/search168+ ;; The clear button only shows while there is something to clear: an
169- :placeholder "Search channels"169+ ;; empty box has nothing to undo, and a dead button beside it reads as
170- :on-change #(reset! s/search %)}]170+ ;; one that stopped working.
171+ [:hbox {:spacing 6}
172+ [:entry {:text @s/search
173+ :width-request 380
174+ :placeholder "Search channels"
175+ :on-change #(reset! s/search %)}]
176+ (when (seq @s/search)
177+ [:button {:label "✕" :on-click #(reset! s/search "")}])]
171 (if (seq buffers)178 (if (seq buffers)
172 (for [b buffers] [conversation-row b])179 (for [b buffers] [conversation-row b])
173 [:card {} [:dim-label {:label "No conversations yet — join a channel."}]])180 [:card {} [:dim-label {:label "No conversations yet — join a channel."}]])