From 615d4498b1949444f82794191c6854ae4f603f84 Mon Sep 17 00:00:00 2001 From: Tim Disney Date: Fri, 31 Jul 2026 14:40:30 -0700 Subject: [PATCH] clean up desgin and lock other controls for non-members --- packages/ui/src/app.css | 18 ++++++-- .../ui/src/lib/components/AskReview.svelte | 8 +++- .../ui/src/lib/components/Community.svelte | 6 ++- .../ui/src/lib/components/Composer.svelte | 26 ++++++++--- packages/ui/src/lib/components/NewGoal.svelte | 8 +++- .../ui/src/lib/components/NewRequest.svelte | 8 +++- .../ui/src/lib/components/PlusMenu.svelte | 19 +++++++- .../ui/src/lib/components/RequestBar.svelte | 14 ++++-- packages/ui/src/lib/components/Thread.svelte | 7 ++- .../ui/src/lib/components/UnitDetail.svelte | 24 +++++++--- packages/ui/test/member-controls.test.mjs | 46 +++++++++++++++++++ packages/ui/test/thread-grid.test.mjs | 8 ++++ 12 files changed, 162 insertions(+), 30 deletions(-) create mode 100644 packages/ui/test/member-controls.test.mjs diff --git a/packages/ui/src/app.css b/packages/ui/src/app.css index 7c6b60a..b886934 100644 --- a/packages/ui/src/app.css +++ b/packages/ui/src/app.css @@ -656,11 +656,11 @@ a.btn { text-decoration: none; color: var(--ink); display: inline-block; } behind its own rail and reads a shade quieter, so the difference between "somebody here said this" and "a stranger said this" is visible before any badge is read. */ .community { margin-left: 2px; padding-left: 14px; border-left: 2px solid var(--line-soft); } -/* One column, not the thread's disc-plus-body two: a guest has no disc, because a coloured identity - token beside a stranger's words is the one piece of furniture that would make them look like - somebody the space knows. */ -.community .guest { grid-template-columns: 1fr; color: var(--ink-2); } -.community .guest .msg-acts { grid-column: 1; flex-wrap: wrap; align-items: baseline; } +/* Profile resolution gives a guest the same disc-and-prose geometry as a thread message. Keeping + the body in column two makes it begin under the author's name, never under their avatar. */ +.community .guest { color: var(--ink-2); } +.community .guest .mb { grid-column: 2; } +.community .guest .msg-acts { flex-wrap: wrap; align-items: baseline; } /* Blessed: this one is in every turn bundle on the goal, which is worth the accent rail. */ .community .guest.blessed { border-left: 2px solid var(--accent); margin-left: -16px; padding-left: 14px; } .community .guest .hint { font-size: 12.5px; color: var(--warn); } @@ -747,6 +747,12 @@ select.sl { resize: none; cursor: pointer; padding-right: 8px; } transition: border-color 130ms ease, box-shadow 130ms ease; } .compose:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); } +/* A guest signs outside the space, so the composer says which public identity will author the + record. Keep that identity on the field's own inset, then tighten the editor below it: its normal + top padding is for a composer where the editor is the first child. */ +.compose-who { padding: 8px 10px 0; font-size: 12.5px; color: var(--ink); } +.compose-who + .md-flush .cm-content { padding-top: 2px; } +.compose-who + .md-flush textarea.md-plain { padding-top: 2px; } /* The field inside carries none of that: one ring around the pair, not two nested ones. */ .compose textarea.ta { border: 0; border-radius: 10px 10px 0 0; background: transparent; @@ -934,6 +940,8 @@ select.sl { resize: none; cursor: pointer; padding-right: 8px; } transition: transform 200ms var(--ease-out), background 160ms ease, box-shadow 200ms var(--ease-out); } .plus:hover { background: var(--accent-deep); transform: translateY(-1.5px); box-shadow: 0 3px 6px oklch(0.25 0.03 262 / 0.22), 0 16px 30px -8px oklch(0.35 0.12 264 / 0.5); } +.plus:disabled { background: var(--sunk); color: var(--ink-2); cursor: default; box-shadow: none; } +.plus:disabled:hover { background: var(--sunk); transform: none; box-shadow: none; } .plus[hidden] { display: none; } .plus svg { transition: transform 300ms var(--ease-out); } .plus[aria-expanded="true"] svg { transform: rotate(135deg); } diff --git a/packages/ui/src/lib/components/AskReview.svelte b/packages/ui/src/lib/components/AskReview.svelte index 4752a90..7e28a80 100644 --- a/packages/ui/src/lib/components/AskReview.svelte +++ b/packages/ui/src/lib/components/AskReview.svelte @@ -1,5 +1,6 @@ - + {#if offered.length > 0}
Ask an agent for @@ -47,11 +52,12 @@ bind:this={buttons[name]} class="btn askbtn" type="button" + disabled={barred} aria-haspopup="dialog" aria-controls={requestDialogId} aria-expanded={ownsRequestDraft(buttons[name])} aria-label="Request {typeLabel(name)}" - title={value.outputSpec.description} + title={barred ? 'Only active members can request artifacts in this space' : value.outputSpec.description} onclick={(event) => { const trigger = event.currentTarget openDraft({ kind: 'request', target, scope, type: name }, trigger, trigger) diff --git a/packages/ui/src/lib/components/Thread.svelte b/packages/ui/src/lib/components/Thread.svelte index e643d24..065a206 100644 --- a/packages/ui/src/lib/components/Thread.svelte +++ b/packages/ui/src/lib/components/Thread.svelte @@ -1,5 +1,6 @@