nandi/jolt-nativepublic Fork 0
ae799a2
Commits
Clone
git clone https://git.rickub.com/nandi/jolt-native.git
git clone ssh://git@rickub.com/nandi/jolt-native.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Answer the pointer from the reaction, not from the link

The last commit widened the wrong widget's answer: `link` and `reaction`
ended their bodies with the same line, and it was `link` that started
handing back an interaction map nobody reads while `reaction` went on
answering a bare click. So the pill reported no hover and the card the
commit exists for never appeared.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
nandi committed 2026-09-10T10:46:51-07:00 Browse files
ae799a2 parent: 65272e3
modified jvui/src/jvui/widgets.clj +7 -7
@@ -633,12 +633,7 @@
633633 ([s {:keys [key]}]
634634 (let [id (c/next-id key)
635635 rect (label s {:colour (c/th :accent)})]
636- ;; The whole interaction and not just the click: a reaction is the one
637- ;; chip that answers the pointer resting on it as well as pressing it —
638- ;; who put it there is what the pill's number will not say — so the
639- ;; caller needs `:hover?` too. It also needs the rectangle, to know
640- ;; where to hang the card.
641- (assoc (c/interact! id rect) :rect rect))))
636+ (:clicked? (c/interact! id rect)))))
642637
643638 (defn emoji
644639 "One emoji, drawn as a character and sized to sit level with the words
@@ -726,4 +721,9 @@
726721 (when tally
727722 (c/draw-text! tally (+ x pad (double gw)) (+ y (/ (- h (double ch)) 2.0))
728723 sz (c/th :text)))
729- (:clicked? (c/interact! id rect)))))
724+ ;; The whole interaction and not just the click: a reaction is the one
725+ ;; chip that answers the pointer resting on it as well as pressing it —
726+ ;; who put it there is what the pill's number will not say — so the
727+ ;; caller needs `:hover?` too, and the rectangle, to know where to hang
728+ ;; the card that answers it.
729+ (assoc (c/interact! id rect) :rect rect))))
@@ -633,12 +633,7 @@
633 ([s {:keys [key]}]633 ([s {:keys [key]}]
634 (let [id (c/next-id key)634 (let [id (c/next-id key)
635 rect (label s {:colour (c/th :accent)})]635 rect (label s {:colour (c/th :accent)})]
636- ;; The whole interaction and not just the click: a reaction is the one636+ (:clicked? (c/interact! id rect)))))
637- ;; chip that answers the pointer resting on it as well as pressing it —
638- ;; who put it there is what the pill's number will not say — so the
639- ;; caller needs `:hover?` too. It also needs the rectangle, to know
640- ;; where to hang the card.
641- (assoc (c/interact! id rect) :rect rect))))
642 637
643 (defn emoji638 (defn emoji
644 "One emoji, drawn as a character and sized to sit level with the words639 "One emoji, drawn as a character and sized to sit level with the words
@@ -726,4 +721,9 @@
726 (when tally721 (when tally
727 (c/draw-text! tally (+ x pad (double gw)) (+ y (/ (- h (double ch)) 2.0))722 (c/draw-text! tally (+ x pad (double gw)) (+ y (/ (- h (double ch)) 2.0))
728 sz (c/th :text)))723 sz (c/th :text)))
729- (:clicked? (c/interact! id rect)))))724+ ;; The whole interaction and not just the click: a reaction is the one
725+ ;; chip that answers the pointer resting on it as well as pressing it —
726+ ;; who put it there is what the pill's number will not say — so the
727+ ;; caller needs `:hover?` too, and the rectangle, to know where to hang
728+ ;; the card that answers it.
729+ (assoc (c/interact! id rect) :rect rect))))