nandi/frqpublic Fork 0
ce82425
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 people-panel nick wrap rather than end

The panel is `users-width` wide and every row in it is a 14-point mode slot
and a nick, so a domain-shaped handle ran past what was left and came out as
"chadfowler.c…" — two people with the same first eleven letters are the same
person to a reader. A button label still ellipsises by default, since a label
broken across two lines inside a lozenge is not a button; `:wrap-label` says
this one is the exception and lets it run onto the next line.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
nandi committed 2026-09-12T09:25:51-07:00 Browse files
ce82425 parent: 8229078
modified common/frq/screens/chat.cljc +6 -1
@@ -1126,7 +1126,12 @@
11261126 ;; the names line up whatever mode is in front of them.
11271127 [:vbox {:key :mode :width-request 14}
11281128 [:dim-label {:label (if (seq prefix) prefix " ")}]]
1129- [:button {:label nick :on-click #(actions/open-dm! nick)}]])
1129+ ;; `:wrap-label`, because a nick is the whole point of this row: the panel
1130+ ;; is `users-width` wide and a domain-shaped handle is wider than what is
1131+ ;; left of it beside the mode slot, so ending it at the edge leaves two
1132+ ;; people looking like the same person. It runs onto a second line instead.
1133+ [:button {:label nick :wrap-label true
1134+ :on-click #(actions/open-dm! nick)}]])
11301135
11311136 (defn users-panel
11321137 "Who is in the channel, beside the conversation.
@@ -1126,7 +1126,12 @@
1126 ;; the names line up whatever mode is in front of them.1126 ;; the names line up whatever mode is in front of them.
1127 [:vbox {:key :mode :width-request 14}1127 [:vbox {:key :mode :width-request 14}
1128 [:dim-label {:label (if (seq prefix) prefix " ")}]]1128 [:dim-label {:label (if (seq prefix) prefix " ")}]]
1129- [:button {:label nick :on-click #(actions/open-dm! nick)}]])1129+ ;; `:wrap-label`, because a nick is the whole point of this row: the panel
1130+ ;; is `users-width` wide and a domain-shaped handle is wider than what is
1131+ ;; left of it beside the mode slot, so ending it at the edge leaves two
1132+ ;; people looking like the same person. It runs onto a second line instead.
1133+ [:button {:label nick :wrap-label true
1134+ :on-click #(actions/open-dm! nick)}]])
1130 1135
1131 (defn users-panel1136 (defn users-panel
1132 "Who is in the channel, beside the conversation.1137 "Who is in the channel, beside the conversation.
modified flutter/src/frq/hiccup.cljd +21 -9
@@ -560,15 +560,27 @@
560560 ;; It only ever comes up because `flexed` below hands a
561561 ;; button a bounded width — unbounded, this changes
562562 ;; nothing.
563- .child (m/Text (str (:label p ""))
564- .maxLines 1
565- .softWrap false
566- .overflow m/TextOverflow.ellipsis
567- .style (m/TextStyle
568- .fontSize t/text-body
569- .color fg
570- .height 1.35
571- .fontWeight m/FontWeight.w500)))))))
563+ ;;
564+ ;; Unless the caller says the whole label is the point.
565+ ;; The people panel is where that is true: a column of
566+ ;; nicks in which "chadfowler.c…" and "chadfowler.co…"
567+ ;; are the same word is a column you cannot read, and a
568+ ;; lozenge two lines tall is a smaller price than not
569+ ;; knowing who is in the channel. So `:wrap-label` lets
570+ ;; it run onto the next line instead of ending.
571+ .child (let [lbl (str (:label p ""))
572+ st (m/TextStyle
573+ .fontSize t/text-body
574+ .color fg
575+ .height 1.35
576+ .fontWeight m/FontWeight.w500)]
577+ (if (:wrap-label p)
578+ (m/Text lbl .softWrap true .style st)
579+ (m/Text lbl
580+ .maxLines 1
581+ .softWrap false
582+ .overflow m/TextOverflow.ellipsis
583+ .style st))))))))
572584
573585 ;; ----------------------------------------------------------------- widget
574586
@@ -560,15 +560,27 @@
560 ;; It only ever comes up because `flexed` below hands a560 ;; It only ever comes up because `flexed` below hands a
561 ;; button a bounded width — unbounded, this changes561 ;; button a bounded width — unbounded, this changes
562 ;; nothing.562 ;; nothing.
563- .child (m/Text (str (:label p ""))563+ ;;
564- .maxLines 1564+ ;; Unless the caller says the whole label is the point.
565- .softWrap false565+ ;; The people panel is where that is true: a column of
566- .overflow m/TextOverflow.ellipsis566+ ;; nicks in which "chadfowler.c…" and "chadfowler.co…"
567- .style (m/TextStyle567+ ;; are the same word is a column you cannot read, and a
568- .fontSize t/text-body568+ ;; lozenge two lines tall is a smaller price than not
569- .color fg569+ ;; knowing who is in the channel. So `:wrap-label` lets
570- .height 1.35570+ ;; it run onto the next line instead of ending.
571- .fontWeight m/FontWeight.w500)))))))571+ .child (let [lbl (str (:label p ""))
572+ st (m/TextStyle
573+ .fontSize t/text-body
574+ .color fg
575+ .height 1.35
576+ .fontWeight m/FontWeight.w500)]
577+ (if (:wrap-label p)
578+ (m/Text lbl .softWrap true .style st)
579+ (m/Text lbl
580+ .maxLines 1
581+ .softWrap false
582+ .overflow m/TextOverflow.ellipsis
583+ .style st))))))))
572 584
573 ;; ----------------------------------------------------------------- widget585 ;; ----------------------------------------------------------------- widget
574 586