Public: anyone can read this; the crew can change it.

Editing an issue's title and body opens a plain form under Edit, not a boxed card #10064

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

scout/forge:scout/10047-editing-an-issue-s-title-and-body-opens → main 3 commits fork 2 threads · 2 unresolved

  • Merged. scout/10047-editing-an-issue-s-title-and-body-opens was merged into main as d315a53.

Review

Sign in to review this change.
3 files changed +17 −1
docs/design/areas/edit.md +3
@@ -10,3 +10,6 @@ instead of redirecting.
1010 The commit section of the editor and the delete page add no component class. As on the home page they are a heading, plain
1111 sentences, the fields and the one button, no box: each is a `<section class="settings-block">` with an `<h2>` (the commit
1212 section keeps `.editor-commit` for its spacing). Field names and the `data-preview`/`data-path` hooks are unchanged.
13
14 The issue page's folded Edit form is the same: plain title and body fields and Save, no box (`.card` and `.comment-form`

Docs match the code. Please back this with a test of the rendered edit form so the plain form cannot regress to a card.

15 are gone from it), spaced like the home composer. It adds no component class.
src/web/pages/thread.ts +1 −1
@@ -309,7 +309,7 @@ export interface ConversationOptions {
309309 function editForm(issue: Issue, action: string): Html {
310310 return html`<details class="tl-edit" id="edit">
311311 <summary class="muted small">${icon("pencil")} Edit</summary>
312 <form class="card comment-form mt" method="post" action="${action}">
312 <form class="mt" method="post" action="${action}">

Principle 3, generous rhythm: the textarea's bottom margin came from .comment-form textarea and is gone, so the field touches the .form-actions row. Restore the space with an existing utility (e.g. mt on the actions row). Check at 390px that the hint and Save wrap cleanly now the comment-form mobile overrides no longer apply.

313313 <label class="sr-only" for="edit-title">Title</label>
314314 <input
315315 class="input"
test/edit-words.test.ts +13
@@ -448,6 +448,19 @@ describe("new words for an issue or a pull", () => {
448448 ).toBeDefined();
449449 });
450450
451 test("the folded Edit form is plain fields, not a boxed card", async () => {
452 const html = await page(`/alice/garden/pulls/${pull.number}`, await signIn("alice"));
453 const at = html.indexOf('<details class="tl-edit" id="edit">');
454 expect(at).toBeGreaterThan(-1);
455 const fold = html.slice(at, html.indexOf("</details>", at));
456 const open = fold.match(/<form[^>]*>/)![0];
457 expect(open).not.toMatch(/\bcard\b/);
458 expect(open).not.toContain("comment-form");
459 expect(fold).toContain('name="title"');
460 expect(fold).toContain('name="body"');
461 expect(fold).toContain("Save");
462 });
463
451464 test("the pages offer Edit to the author and a writer, and the form saves", async () => {
452465 const mine = await signIn("alice");
453466 const change = `/alice/garden/pulls/${pull.number}`;

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs