Revert "Let a people-panel nick wrap rather than end"
Nicks in the people panel ellipsise again, as every other button label does. This reverts commit ce824252aa511f0e1d68bf8fbf6be9419ab4dfd1; the `:wrap-label` escape hatch had no other caller, so it goes too. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
c67777a parent: 5fcc566 modified
common/frq/screens/chat.cljc +1 -6 | @@ -1126,12 +1126,7 @@ | ||
| 1126 | 1126 | ;; the names line up whatever mode is in front of them. |
| 1127 | 1127 | [:vbox {:key :mode :width-request 14} |
| 1128 | 1128 | [:dim-label {:label (if (seq prefix) prefix " ")}]] |
| 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)}]]) | |
| 1129 | + [:button {:label nick :on-click #(actions/open-dm! nick)}]]) | |
| 1135 | 1130 | |
| 1136 | 1131 | (defn users-panel |
| 1137 | 1132 | "Who is in the channel, beside the conversation. |
| @@ -1126,12 +1126,7 @@ | |||
| 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 | - ;; `:wrap-label`, because a nick is the whole point of this row: the panel | 1129 | + [:button {:label nick :on-click #(actions/open-dm! nick)}]]) |
| 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)}]]) | ||
| 1135 | 1130 | ||
| 1136 | (defn users-panel | 1131 | (defn users-panel |
| 1137 | "Who is in the channel, beside the conversation. | 1132 | "Who is in the channel, beside the conversation. |
modified
flutter/src/frq/hiccup.cljd +9 -21 | @@ -560,27 +560,15 @@ | ||
| 560 | 560 | ;; It only ever comes up because `flexed` below hands a |
| 561 | 561 | ;; button a bounded width — unbounded, this changes |
| 562 | 562 | ;; nothing. |
| 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)))))))) | |
| 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))))))) | |
| 584 | 572 | |
| 585 | 573 | ;; ----------------------------------------------------------------- widget |
| 586 | 574 | |
| @@ -560,27 +560,15 @@ | |||
| 560 | ;; It only ever comes up because `flexed` below hands a | 560 | ;; It only ever comes up because `flexed` below hands a |
| 561 | ;; button a bounded width — unbounded, this changes | 561 | ;; button a bounded width — unbounded, this changes |
| 562 | ;; nothing. | 562 | ;; nothing. |
| 563 | - ;; | 563 | + .child (m/Text (str (:label p "")) |
| 564 | - ;; Unless the caller says the whole label is the point. | 564 | + .maxLines 1 |
| 565 | - ;; The people panel is where that is true: a column of | 565 | + .softWrap false |
| 566 | - ;; nicks in which "chadfowler.c…" and "chadfowler.co…" | 566 | + .overflow m/TextOverflow.ellipsis |
| 567 | - ;; are the same word is a column you cannot read, and a | 567 | + .style (m/TextStyle |
| 568 | - ;; lozenge two lines tall is a smaller price than not | 568 | + .fontSize t/text-body |
| 569 | - ;; knowing who is in the channel. So `:wrap-label` lets | 569 | + .color fg |
| 570 | - ;; it run onto the next line instead of ending. | 570 | + .height 1.35 |
| 571 | - .child (let [lbl (str (:label p "")) | 571 | + .fontWeight m/FontWeight.w500))))))) |
| 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)))))))) | ||
| 584 | 572 | ||
| 585 | ;; ----------------------------------------------------------------- widget | 573 | ;; ----------------------------------------------------------------- widget |
| 586 | 574 | ||