chadtmiller.com/knotless
git that lives in your Atmosphere account
1
10
web: Editing a description opens a box as tall as opening one
web/src/lib/organisms/Composer.svelte+5−3
| @@ -17,7 +17,7 @@ | ||
* when the box empties, or `cancel` closes it. `extra` goes beside the | ||
* button. Its preview resolves relative links inside `repo`. Nothing for | ||
* anyone not `in`. `ready`, it may be sent saying nothing, as a review | ||
* whose line comments say it. | ||
* whose line comments say it. `rows` is how tall its box starts. | ||
*/ | ||
let { | ||
in: logged, | ||
| @@ -29,7 +29,8 @@ | ||
send, | ||
cancel, | ||
extra, | ||
repo | ||
repo, | ||
rows | ||
}: { | ||
in: boolean; | ||
label?: string; | ||
| @@ -41,6 +42,7 @@ | ||
cancel?: () => void; | ||
extra?: Snippet; | ||
repo?: AtUriString; | ||
rows?: number; | ||
} = $props(); | ||
let body = $state(untrack(() => text)); | ||
let verdict = $state<'' | Verdict>(''); | ||
| @@ -64,7 +66,7 @@ | ||
| ||
{#if logged} | ||
<form class="box composer" onsubmit={submit}> | ||
<MarkdownField label={placeholder} {placeholder} {repo} bind:value={body} bind:images /> | ||
<MarkdownField label={placeholder} {placeholder} {rows} {repo} bind:value={body} bind:images /> | ||
{#if review} | ||
<fieldset class="review"> | ||
<legend>Review</legend> | ||
web/src/routes/[authority]/[repo]/[kind=item]/[did]/[rkey]/+page.svelte+1−1
| @@ -231,7 +231,7 @@ | ||
{#if ch}<PullTabs href={itemHref(base, d.uri)} comments={n} files={ch.files.length} added={sum(ch.files, 'added')} removed={sum(ch.files, 'removed')} current="conversation" />{/if} | ||
<div class="timeline"> | ||
{#if editing === 'body'} | ||
<Composer in repo={named} label="Update {noun}" text={t.body ?? ''} placeholder="What it is about" send={(body, _, images) => edit(subject, { body, images })} cancel={() => (editing = '')} /> | ||
<Composer in repo={named} label="Update {noun}" text={t.body ?? ''} placeholder="What it is about" rows={14} send={(body, _, images) => edit(subject, { body, images })} cancel={() => (editing = '')} /> | ||
{:else if t.html !== undefined} | ||
<Comment author={d.author.handle} did={d.author.did} avatar={d.author.avatar} said="opened" createdAt={d.createdAt} updatedAt={d.updatedAt} html={t.html}> | ||
{#snippet menu()}<ActionMenu actions={actions(subject, d.author.did, `this ${noun}`, 'body')} />{/snippet} | ||