~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

Text fields and lists stand the same height, and the rules count as sections do

Merged chadtmiller.com asked to merge into main from chadtmiller.com/group-host:web/form-quirks
harness/e2e/flows.spec.mjs+2−1
@@ -447,7 +447,8 @@ test('adding a rule, and taking it away', async () => {
await expect(page.locator('.rule-rows', { hasText: 'Leave no trace' })).toBeVisible()
// On the group's page, folded under how many there are.
await page.goto(url('/g/hikers.groups.test'))
await page.getByText('Rules (1)').click()
await page.locator('summary', { hasText: 'Rules' }).click()
await expect(page.locator('.rules .count')).toHaveText('1')
await expect(page.getByText('Leave no trace')).toBeVisible()
await page.goto(url('/g/hikers.groups.test/settings/rules'))
await page.getByRole('button', { name: 'Delete “Leave no trace”' }).click()
web/src/lib/molecules/Rules.svelte+1−1
@@ -5,7 +5,7 @@
{#if rules.length}
<details class="rules">
<summary>Rules ({rules.length})</summary>
<summary>Rules<span class="count">{rules.length}</span></summary>
<ol>
{#each rules as r (r.rkey)}
<li><strong>{r.title}</strong>{#if r.text} {r.text}{/if}</li>
web/src/app.css+2−0
@@ -60,6 +60,8 @@ main.wrap{flex:1;padding-top:var(--space-8);padding-bottom:var(--space-16);displ
input,select,textarea,button{font:inherit;font-size:var(--text-field);color:inherit}
input:not([type='checkbox'],[type='radio'],[type='file'],[type='hidden']),select,textarea{min-height:var(--control);padding:var(--space-2) var(--space-3);background:var(--panel);border:1px solid var(--line-strong);border-radius:var(--radius-sm);transition:border-color var(--speed),box-shadow var(--speed)}
/* One line, so a text field and a list stand the same height side by side. */
input:not([type='checkbox'],[type='radio'],[type='file'],[type='hidden']),select{line-height:var(--leading-tight)}
textarea{min-height:calc(var(--control) * 2.5);resize:vertical}
input:focus,select:focus,textarea:focus{outline:0;border-color:var(--primary);box-shadow:0 0 0 var(--ring) var(--primary-soft)}
input[type='checkbox'],input[type='radio']{accent-color:var(--primary);width:1rem;height:1rem;margin:0}