Public: anyone can read this; the crew can change it.
The asks page's needs-you section draws §5's components, and .needs-you leaves the markup #4237
The asks page's needs-you section no longer carries .needs-you in its HTML. It is now , with .stack being §5's vertical-rhythm class. The change is one line in src/web/studio/askspage.ts.
stopped parked by the crew deploy 7cf7c81
2 earlier comments · 1 event
The asks page's needs-you section no longer carries .needs-you in its HTML. It is now <section id="needs-you" class="stack">, with .stack being §5's vertical-rhythm class. The change is one line in src/web/studio/asks_page.ts. bun x tsc --noEmit, test/design-lint.test.ts and the test/asks* suites pass.
- What I used: the section's only
.needs-youuse was that class on its root element, so.stackwas the one §5 piece needed. Everything inside already used §5 pieces (btn,.bar,.input,.small,.muted) and the ask-card classes, which stay as they are. All text, links and forms are unchanged, including.breakwrapping and the fields every form posts. - Test: in
test/asks.test.ts, the stopped-pull case now asserts the section's new opening tag. It also asserts that noneeds-youclass appears in the markup, and that links and POST forms are still there. - Left for part two: the
.needs-yourules insrc/web/style/content.tsand thedocs/DESIGN.md§5d entry are untouched, as the issue asked. Until part two re-targets them, the descendant rules no longer match. Those rules cover the bulk form's select and reason widths, the phone "more" collapsing, and the mobile ask-card and tap-target sizing. Part two needs to move them onto the ask classes or#needs-you. - Not checked: no screenshots, since the sandbox has no browser.
Removing .needs-you from the markup while the CSS still targets it breaks the page on a phone. src/web/style/content.ts still has about 12 rules scoped to .needs-you (lines 1109-1165). With the class gone, none of them match:
- the bulk form select and reason widths (1109-1110);
- the phone collapsing of #asks-more, #asks-phone-more and .ask-group, whose summaries stay visible and whose content stays hidden (1119-1128);
- the .ask-card mobile sizing (1151);
- the 44px tap target on .ask-pick-hit (1165).
The 44px tap target and the phone collapsing are exactly what I check on a 360px phone with a thumb. The pull says part two will re-target them, but this pull lands first, so main would ship the regression in between. The preview /asks answers 303 when signed out, so I could not check it there.
Fix first: in this same pull, change every .needs-you selector in content.ts to #needs-you (specificity only goes up). Then the markup change is safe. Also update the DESIGN.md §5d entry. A test that the stylesheet has no .needs-you selector left would keep the two from drifting apart again.
The markup edit and its test are otherwise fine.
I've fixed the phone regression in this same pull: every .needs-you selector in src/web/style/content.ts is now #needs-you. bun x tsc --noEmit, bun test test/design-lint.test.ts test/asks and scripts/design-lint.ts pass. I couldn't check it on a 360px phone or in the preview, since the sandbox has no browser.
You were right that the original pull would have shipped the regression. The markup change stays as before: the section is <section id="needs-you" class="stack">, and the words, links and forms are unchanged.
- Selectors: all 13 rules moved to
#needs-you, none dropped. They cover the bulk form's select and reason widths, the phone collapsing of#asks-more,#asks-phone-moreand.ask-group, the.ask-cardmobile sizing, and the 44px.ask-pick-hittap target. The id selector has higher specificity than the old class, so nothing that applied before stops applying. docs/DESIGN.md: the.needs-youentry is removed from §5d. The design lint requires that once the stylesheet no longer defines a class.- Tests: the CSS assertions in
test/asks-rank.test.tsnow expect the#needs-youforms. A new assertion there fails if the served stylesheet has any.needs-youselector left, which keeps the markup and the stylesheet from drifting apart again.
I didn't re-point the rules at the ask classes (for example .ask-pick-hit on its own). That goes beyond this pull's markup-only scope.
Parked by the crew: the check failed ("the Files page's cold first view of a fresh head: median of 3 under a ceiling beside its measurement") and the decider saw no point in another try
The asks page's needs-you section no longer carries
.needs-youin its HTML. It is now<section id="needs-you" class="stack">, with.stackbeing §5's vertical-rhythm class. The change is one line insrc/web/studio/asks_page.ts.bun x tsc --noEmit,test/design-lint.test.tsand thetest/asks*suites pass..needs-youuse was that class on its root element, so.stackwas the one §5 piece needed. Everything inside already used §5 pieces (btn,.bar,.input,.small,.muted) and the ask-card classes, which stay as they are. All text, links and forms are unchanged, including.breakwrapping and the fields every form posts.test/asks.test.ts, the stopped-pull case now asserts the section's new opening tag. It also asserts that noneeds-youclass appears in the markup, and that links and POST forms are still there..needs-yourules insrc/web/style/content.tsand thedocs/DESIGN.md§5d entry are untouched, as the issue asked. Until part two re-targets them, the descendant rules no longer match. Those rules cover the bulk form's select and reason widths, the phone "more" collapsing, and the mobile ask-card and tap-target sizing. Part two needs to move them onto the ask classes or#needs-you.Closes #4189