Skip to content

The logic panel's rules become cards, and every word gets to finish - #28

Merged
AllTerrainDeveloper merged 1 commit into
mainfrom
feature/logic-rule-cards
Aug 21, 2026
Merged

AllTerrainDeveloper merged 1 commit into
mainfrom
feature/logic-rule-cards

Conversation

@AllTerrainDeveloper

Copy link
Copy Markdown
Owner

Redesign of the inspector's Conditional logic section, from Daniel's report: three dropdowns sharing one ~250px line truncated every label to its first two letters ("Op…", "is l…").

The new shape

[✓] Only show this field sometimes
[Show ▾] this field when [all ▾] of these match:

┌──────────────────────────────┐
│ [Opinion scale           ▾] 🗑│  ← question, full width, remove on its line
│ [is greater than          ▾] │  ← comparison, full width
│ [5                         ] │  ← answer, full width
└──────────────────────────────┘
            ( and )               ← clickable chip on the seam between cards
┌── second rule … ──────────────┘
[+ Add rule]
  • Every part gets the whole column — nothing truncates at any inspector width.
  • The answer control earns its shape from the rule: hidden entirely for self-contained operators ("is empty" / "has any answer"), a select of the source question's own choices where it has them, free text otherwise — the same reading the canvas row gives. It was a bare text box in every case, which let you type an answer a radio group can never produce.
  • Switching the source question clears the stored answer — a value picked from one field's choices means nothing against another's.
  • "and"/"or" is a chip between the cards, clickable like its twin on the canvas; one setting governs every joint and the head's all/any select stays in sync.
  • Every write repaints the canvas card too. Previously a rule edited in the inspector went stale on the canvas until something else happened to redraw it.

QA (8889, live)

Card layout reads in full at inspector width; add rule → joiner appears; joiner click flips canvas "and"→"or" and the head select; "is not empty" collapses the card to two controls with the canvas reading "has any answer"; delete restores; demo form left in its original state.

Tests: 337 vitest pass, typecheck clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_0119U4sRRWGcTQdwYreTwpAp

Three dropdowns sharing one 250px line truncated every label to its
first two letters — "Op…", "is l…" — which turned the sentence a rule
is into a ransom note. Each rule is now a small card with its three
parts stacked at full width: the question (carrying the card's remove
button on its line), the comparison, the answer.

The answer control also earns its shape from the rule instead of
always being a bare text box: gone entirely for an operator that is a
complete statement on its own ("is empty", "has any answer"), the
source question's own choices where it has them, free text otherwise
— the same reading the canvas row gives. Switching the source
question clears the stored answer, because a value picked from one
field's choices means nothing against another's.

Between two cards sits the "and"/"or" as a chip on the seam, clickable
like its twin on the canvas; one setting governs every joint. And
every write from this panel now repaints the canvas card too — before
this, a rule edited here went stale on the card until something else
happened to redraw it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0119U4sRRWGcTQdwYreTwpAp
@AllTerrainDeveloper
AllTerrainDeveloper merged commit 39fd9cc into main Aug 21, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant