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

The issue lists', a change's and the asked page's filters draw §5's filters, and .filters leaves their markup #4306

Merged opened this

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

Merged

scout/forge:scout/4296-the-issue-lists-a-change-s-and-the-asked → main 2 commits fork 1 thread · 1 unresolved

  • Merged. scout/4296-the-issue-lists-a-change-s-and-the-asked was merged into main as c85f5b8.

Review

Sign in to review this change.
7 files changed +22 −3
src/web/studio/asked_page.ts +1 −1
@@ -207,7 +207,7 @@ export function askedPage(ctx: Ctx): Response {
207207 <h1 id="asked-sentence">What you asked for</h1>
208208 <p class="muted">${sentence}</p>
209209 ${thoughts}
210 <div class="filters bar mb mt">
210 <div class="bar mb mt">
211211 ${seg([
212212 {
213213 label: "Not shipped",
src/web/studio/change.ts +1 −1
@@ -238,7 +238,7 @@ export function changeTabs(
238238 current: "change" | "files",
239239 ): Html {
240240 const base = repoBase(repo);
241 return html`<div class="filters mt">
241 return html`<div class="bar mt mb">
242242 ${seg([
243243 {
244244 label: "Conversation",
src/web/studio/lists.ts +1 −1
@@ -132,7 +132,7 @@ function wordFilterBar(
132132 trail?: Html,
133133 words: readonly WordFilter[] = WORD_FILTERS,
134134 ): Html {
135 return html`<div class="filters mb">
135 return html`<div class="bar mb">

Six nowrap, flex:none segments in .bar at 360px overflow. Contain .seg inside .bar (max-width:100%; overflow-x:auto) before dropping .filters.

136136 ${seg([
137137 { label: "Open", href: href(undefined), current: open },
138138 ...words.map((w) => ({
src/web/style/components.ts +2
@@ -540,7 +540,9 @@ details[open] > summary.row > .row-lead { transform: rotate(90deg); }
540540 .seg {
541541 display: inline-flex; align-items: center; gap: 2px; flex: none;
542542 padding: 2px; background: var(--muted); border-radius: var(--radius);
543 max-width: 100%; overflow-x: auto; scrollbar-width: none;
543544 }
545 @media (max-width: 420px) { .seg > a, .seg > label { padding: 0 8px; } }
544546 .seg > a, .seg > label {
545547 display: inline-flex; align-items: center; gap: 6px;
546548 min-height: 28px; padding: 0 10px; border-radius: var(--radius-sm);
test/asked.test.ts +5
@@ -267,6 +267,11 @@ describe("what you asked for", () => {
267267 const page = (await res.text()).replace(/\s+/g, " ");
268268 expect(page).toContain("What you asked for");
269269 expect(page).toContain("Plant tomatoes");
270 // The filter bar is §5's bar: the retired .filters is gone, the words stay.
271 expect(page).not.toMatch(/class="[^"]*\bfilters\b/);
272 expect(page).toContain("Not shipped");
273 expect(page).toContain("Nothing built");
274 expect(page).toContain("Show newest first");
270275 expect(page).toContain("nothing built in 3 days");
271276 expect(page).not.toContain("Refactor the watering module");
272277 // The default view is what has nothing merged yet: the shipped ask waits behind "All".
test/components-palette-focus.test.ts +7
@@ -19,3 +19,10 @@ test("the topbar search input is 16px, so iOS does not zoom and the design lint
1919 test("avatar initials stay mostly --fg so they hold 4.5:1 on the tint in every theme", () => {
2020 expect(components).toContain("var(--av-ink) 28%, var(--fg)");
2121 });
22
23 test("a .seg never outgrows its bar: it scrolls inside max-width 100% and tightens its padding on a phone", () => {
24 const seg = components.match(/\n\.seg \{[^}]*\}/)?.[0] ?? "";
25 expect(seg).toContain("max-width: 100%");
26 expect(seg).toContain("overflow-x: auto");
27 expect(components).toMatch(/max-width: 420px\) \{ \.seg > a, \.seg > label \{ padding: 0 8px/);
28 });
test/studio-changes.test.ts +5
@@ -191,6 +191,8 @@ describe("the studio, continued", () => {
191191 expect(page).not.toContain('name="label"');
192192 expect(page).not.toContain(`>#${told.value.number} opened`);
193193 expect(page).toContain(`href="/alice/notes/issues?word=told"`);
194 expect(page).not.toMatch(/class="[^"]*\bfilters\b/);
195 expect(page).toContain("Not started");
194196
195197 const filtered = await (await get("/alice/notes/issues?word=told")).text();
196198 expect(filtered).toContain("List test: not picked up yet");
@@ -704,6 +706,9 @@ describe("the studio, continued", () => {
704706 expect(changeHtml).toContain(`action="/alice/notes/pulls/${p}/comments"`);
705707 expect(changeHtml).toContain(`href="/alice/notes/pulls/${p}/files"`);
706708 expect(changeHtml).toContain('id="comment-body"');
709 // The tabs are §5's bar, not the retired .filters wrapper.
710 expect(changeHtml).not.toMatch(/class="[^"]*\bfilters\b/);
711 expect(changeHtml).toContain("Conversation");
707712
708713 // The lists, the app page and the search box all hand out the one
709714 // address, so a person is never given two addresses for one thing.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs