Space a message from its sender, and close it up with its reactions
Two gaps were the wrong way round: seven points between the sender's row and the line under it, twenty between that line and the reactions on it — so a message ran into the name above it while its own pills drifted toward the next message. The twenty was not a margin anyone set. The pills sat outside the row holding the text, and that row is as tall as the ↩ and ☺ buttons at its right edge, so half a line of the button's height fell between the words and the pills. They go in the text's own column now, which is where they belong anyway: a reaction is on the message, not under the row the message happens to share. The gap is the column's own two points. And the sender's row has real air under it — it is a heading for what follows, and a heading that touches its text is not one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
a7c88eb parent: 07da0eb modified
src/frq/app.jolt +12 -10 | @@ -405,7 +405,9 @@ | ||
| 405 | 405 | ;; laid out from the right so the action sits at the edge and the text |
| 406 | 406 | ;; takes the width that is left. The text keeps a column of its own: |
| 407 | 407 | ;; a wrapping label directly in a row wraps against the row. |
| 408 | - [:hbox {:key :line :align :end :spacing 6} | |
| 408 | + ;; A little air under the sender's row: the name and face are a heading | |
| 409 | + ;; for what follows, and a heading that touches its text is not one. | |
| 410 | + [:hbox {:key :line :align :end :spacing 6 :margin-top 10} | |
| 409 | 411 | ;; Answering and reacting sit together because they are the same kind |
| 410 | 412 | ;; of thing: what you do to a message rather than what it says. Both |
| 411 | 413 | ;; are in the row itself rather than in a box of their own — a box with |
| @@ -419,17 +421,17 @@ | ||
| 419 | 421 | (if (:id m) |
| 420 | 422 | [:button {:key :reply :label "↩" :on-click #(s/reply-to! m)}] |
| 421 | 423 | [:spacer {:key :reply :size 0}]) |
| 424 | + ;; The text column carries the pills as well as the words: put them | |
| 425 | + ;; outside this row and they sit below it, and the row is as tall as | |
| 426 | + ;; the buttons at its right edge — which is half a line of air between | |
| 427 | + ;; a message and the reactions on it, coming from nothing anyone asked | |
| 428 | + ;; for. | |
| 422 | 429 | [:vbox {:key :text :spacing 2} |
| 423 | 430 | (map-indexed (fn [j run] (run-node j run (:system? m))) |
| 424 | - (text-runs (:text m)))]] | |
| 425 | - ;; Reactions under the message they are about, and only where there is a | |
| 426 | - ;; message to name: a line this client wrote itself, or one from before | |
| 427 | - ;; the server started stamping ids, cannot be pointed at. | |
| 428 | - ;; Room above them: a pill sitting tight under the last line reads as | |
| 429 | - ;; part of the sentence rather than as something added to it. | |
| 430 | - [:vbox {:key :reactions-row :margin-top 6 :margin-bottom 2} | |
| 431 | - (when (and (:id m) (not (:system? m)) (seq (:reactions m))) | |
| 432 | - [reaction-row @s/current m])] | |
| 431 | + (text-runs (:text m))) | |
| 432 | + [:vbox {:key :reactions-row} | |
| 433 | + (when (and (:id m) (not (:system? m)) (seq (:reactions m))) | |
| 434 | + [reaction-row @s/current m])]]] | |
| 433 | 435 | ;; And the picker, when this is the message it was opened on: under the |
| 434 | 436 | ;; line it is about, where the reader is already looking. |
| 435 | 437 | [:vbox {:key :picker :margin-bottom 4} |
| @@ -405,7 +405,9 @@ | |||
| 405 | ;; laid out from the right so the action sits at the edge and the text | 405 | ;; laid out from the right so the action sits at the edge and the text |
| 406 | ;; takes the width that is left. The text keeps a column of its own: | 406 | ;; takes the width that is left. The text keeps a column of its own: |
| 407 | ;; a wrapping label directly in a row wraps against the row. | 407 | ;; a wrapping label directly in a row wraps against the row. |
| 408 | - [:hbox {:key :line :align :end :spacing 6} | 408 | + ;; A little air under the sender's row: the name and face are a heading |
| 409 | + ;; for what follows, and a heading that touches its text is not one. | ||
| 410 | + [:hbox {:key :line :align :end :spacing 6 :margin-top 10} | ||
| 409 | ;; Answering and reacting sit together because they are the same kind | 411 | ;; Answering and reacting sit together because they are the same kind |
| 410 | ;; of thing: what you do to a message rather than what it says. Both | 412 | ;; of thing: what you do to a message rather than what it says. Both |
| 411 | ;; are in the row itself rather than in a box of their own — a box with | 413 | ;; are in the row itself rather than in a box of their own — a box with |
| @@ -419,17 +421,17 @@ | |||
| 419 | (if (:id m) | 421 | (if (:id m) |
| 420 | [:button {:key :reply :label "↩" :on-click #(s/reply-to! m)}] | 422 | [:button {:key :reply :label "↩" :on-click #(s/reply-to! m)}] |
| 421 | [:spacer {:key :reply :size 0}]) | 423 | [:spacer {:key :reply :size 0}]) |
| 424 | + ;; The text column carries the pills as well as the words: put them | ||
| 425 | + ;; outside this row and they sit below it, and the row is as tall as | ||
| 426 | + ;; the buttons at its right edge — which is half a line of air between | ||
| 427 | + ;; a message and the reactions on it, coming from nothing anyone asked | ||
| 428 | + ;; for. | ||
| 422 | [:vbox {:key :text :spacing 2} | 429 | [:vbox {:key :text :spacing 2} |
| 423 | (map-indexed (fn [j run] (run-node j run (:system? m))) | 430 | (map-indexed (fn [j run] (run-node j run (:system? m))) |
| 424 | - (text-runs (:text m)))]] | 431 | + (text-runs (:text m))) |
| 425 | - ;; Reactions under the message they are about, and only where there is a | 432 | + [:vbox {:key :reactions-row} |
| 426 | - ;; message to name: a line this client wrote itself, or one from before | 433 | + (when (and (:id m) (not (:system? m)) (seq (:reactions m))) |
| 427 | - ;; the server started stamping ids, cannot be pointed at. | 434 | + [reaction-row @s/current m])]]] |
| 428 | - ;; Room above them: a pill sitting tight under the last line reads as | ||
| 429 | - ;; part of the sentence rather than as something added to it. | ||
| 430 | - [:vbox {:key :reactions-row :margin-top 6 :margin-bottom 2} | ||
| 431 | - (when (and (:id m) (not (:system? m)) (seq (:reactions m))) | ||
| 432 | - [reaction-row @s/current m])] | ||
| 433 | ;; And the picker, when this is the message it was opened on: under the | 435 | ;; And the picker, when this is the message it was opened on: under the |
| 434 | ;; line it is about, where the reader is already looking. | 436 | ;; line it is about, where the reader is already looking. |
| 435 | [:vbox {:key :picker :margin-bottom 4} | 437 | [:vbox {:key :picker :margin-bottom 4} |