Public: anyone can read this; the crew can change it.
A run's and a tell's heads draw §5's page head and meta row, and .issue-head, .issue-meta leave their markup #4325
scout/forge:scout/4265-a-run-s-and-a-tell-s-heads-draw-5-s-page → main 1 commit fork
4 files
changed +18
−8
src/web/studio/run.ts +4 −3
| @@ -145,14 +145,14 @@ export async function runView( | ||
| 145 | 145 | // finishing shows its final state without a reload. Its id stays once the |
| 146 | 146 | // run is over, so the last swap still finds its match. |
| 147 | 147 | const head = html`<div |
| 148 | class="issue-head" | |
| 149 | 148 | id="run-head" |
| 150 | 149 | ${unfinished |
| 151 | 150 | ? html`data-live="run.*" data-live-repo="${repo.ownerName}/${repo.name}"` |
| 152 | 151 | : null} |
| 153 | 152 | > |
| 154 | <h1>${title}</h1> | |
| 155 | <div class="issue-meta"> | |
| 153 | <div class="page-head"> | |
| 154 | <h1 class="break">${title}</h1> | |
| 155 | <div class="bar sub break"> | |
| 156 | 156 | ${wordBadge(word, "run-word")} |
| 157 | 157 | ${when( |
| 158 | 158 | issue, |
| @@ -196,6 +196,7 @@ export async function runView( | ||
| 196 | 196 | >`, |
| 197 | 197 | )} |
| 198 | 198 | </div> |
| 199 | </div> | |
| 199 | 200 | <p class="mt" id="run-summary">${run.summary}</p> |
| 200 | 201 | ${when( |
| 201 | 202 | carried.length > 0, |
src/web/studio/tell.ts +3 −3
| @@ -332,9 +332,9 @@ async function studioTell( | ||
| 332 | 332 | ]); |
| 333 | 333 | |
| 334 | 334 | const marks = marksByName(db, [issue.authorName, issue.assigneeName ?? ""]); |
| 335 | const head = html`<div class="issue-head"> | |
| 336 | <h1>${issue.title} <span class="number">#${issue.number}</span></h1> | |
| 337 | <div class="issue-meta"> | |
| 335 | const head = html`<div class="page-head"> | |
| 336 | <h1 class="break">${issue.title} <span class="number">#${issue.number}</span></h1> | |
| 337 | <div class="bar sub break"> | |
| 338 | 338 | ${direction |
| 339 | 339 | ? html`<span class="muted small" |
| 340 | 340 | >${icon("map")} the repository's standing direction — always |
test/studio-runs.test.ts +6 −1
| @@ -608,9 +608,14 @@ describe("working: a run's own page in the studio", () => { | ||
| 608 | 608 | // Word, cost and clock sit in one region, swapped in place on any |
| 609 | 609 | // run.* event about this repository and no other. |
| 610 | 610 | expect(going).toMatch( |
| 611 | /<div\s+class="issue-head"\s+id="run-head"\s+data-live="run\.\*"\s+data-live-repo="alice\/engine"/, | |
| 611 | /<div\s+id="run-head"\s+data-live="run\.\*"\s+data-live-repo="alice\/engine"/, | |
| 612 | 612 | ); |
| 613 | 613 | expect(head(going)).toContain('data-word="working"'); |
| 614 | // The head is §5's page head and its meta line a bar (#4265). | |
| 615 | expect(going).not.toContain("issue-head"); | |
| 616 | expect(going).not.toContain("issue-meta"); | |
| 617 | expect(head(going)).toContain('class="page-head"'); | |
| 618 | expect(head(going)).toContain('class="bar sub break"'); | |
| 614 | 619 | expect(head(going)).toContain("$0.25 spent"); |
| 615 | 620 | expect(head(going)).toContain("running for"); |
| 616 | 621 |
test/studio-words.test.ts +5 −1
| @@ -542,13 +542,17 @@ describe("dev's vocabulary never reaches a studio page", () => { | ||
| 542 | 542 | word: "tell", |
| 543 | 543 | path: `${repoPath}/issues/${tellNumber}`, |
| 544 | 544 | // #3241: an issue is closed with "Close issue" in every mode. |
| 545 | shows: ["Close issue"], | |
| 545 | // #4265: the head is §5's page head, the old names are gone. | |
| 546 | shows: ["Close issue", 'class="page-head"', "opened this"], | |
| 547 | hides: ["issue-head", "issue-meta"], | |
| 546 | 548 | // One issue page (#626): dev's controls are its closed Details. |
| 547 | 549 | title: `${tellTitle} · vocab`, |
| 548 | 550 | }, |
| 549 | 551 | { |
| 550 | 552 | word: "working", |
| 551 | 553 | path: `${repoPath}/runs/${runId}`, |
| 554 | shows: ['class="page-head"'], | |
| 555 | hides: ["issue-head", "issue-meta"], | |
| 552 | 556 | title: `scout on #${tellNumber} ${tellTitle} · vocab`, |
| 553 | 557 | }, |
| 554 | 558 | { |
new above
offline