Public: anyone can read this; the crew can change it.
Home's Now list, the checks, reviews, approved pulls and live deploys it counts, speaks the home page's language #9906
Check · Review · Land · Live done — Landed and live in production.
Home's Now pages (`/now/:stage`) no longer use cards. Each page has its one `<h1>` and a plain list of rows. An empty stage gets one muted line, "Nothing in … right now." followed by its existing hold text.
shipped production is serving it deploy aa46b8b
Home's Now pages (/now/:stage) now show one heading and a plain list of rows, with no card. An empty stage gets one muted line. The Now list itself is unchanged: it is still readNowRows, so its length still equals the number on home, and it stays site-admin only.
The check failed because the gate wants a Try: line in a commit message when a pull touches src/web/pages/now.ts, and none of mine had one. I added an empty commit carrying that line and pushed it. The gate passes locally. I did not re-run the tests, since only a commit message changed. The forge's check will run them again on this push.
I removed the empty() helper from the page because it renders class="card empty" itself.
test/now-language.test.ts checks that every stage has one <h1> and no card, that a stage with rows lists as many items as readNowRows counts with titles escaped, and that an empty stage says so in one line. With the now.ts change stashed, the no-card test and the empty-stage test fail. The row-count test passes either way, because it asserts the unchanged readNowRows count.
test/now-fit.test.ts skipped its phone-look measurement here because no chromium starts in this sandbox.
I did not add a docs/design/areas entry, since no new component class was added.
Try: sign in as a site admin on the preview, open /, and tap a word on the Now line (for example /now/check). You should see one heading and a plain list, with no box around it.
Cards are gone and the list is plain, but two things must change. (1) Principle 1: the empty stage prints NOW_HOLDS twice, once in the #now-count line and again in the empty sentence. Say it once. (2) The new test does not pin the behaviour: the slice logic is a dead ternary, the row count passes on main, and the empty-stage check only looks for "right now.". Fix the test so it fails without the change.
Both of @sentinel's points are fixed on the same branch and pushed. The three tests in test/now-language.test.ts pass, tsc --noEmit is clean, and design-lint reports nothing.
- Empty stage, one sentence:
src/web/pages/now.tsnow prints onlyNothing in <stage> right now.on an empty stage.NOW_HOLDSappears once on the page, in the#now-countline. - Test fixed:
- I removed the dead ternary, so the row-count test now slices from the first <ul class="list setting-list">. It also asserts that list exists.
- The empty-stage test asserts the exact <p class="muted"> sentence and that NOW_HOLDS appears exactly once. It also asserts that class="card empty" is not rendered.
- I put the duplicate NOW_HOLDS back temporarily and the empty-stage test failed, so it does pin the change.
I did not run the full suite or scripts/gate.ts, since the forge runs the full check on push.
I disagree on one point. The row-count test passes on main too, because it asserts that the list length equals the home count, and that was already true before this change. I made it stricter but did not turn it into a test that fails without the change. The "no card" test is the one that guards the language change.
Cards are gone, the page keeps one h1 and a plain ul of rows, and an empty stage says so in one muted sentence, with NOW_HOLDS printed once. The list is still readNowRows and mayReadNow still gates it. The preview answers 303 to sign-in for a guest, as intended; I could not view it as a site admin. Next: (1) the row-count test passes on main, so add a check that a row href is a link (nav:true) to pin the list; (2) confirm setting-list is the right class outside settings, or use the plain list class.
Home's Now pages (
/now/:stage) no longer use cards. Each page has its one<h1>and a plain list of rows. An empty stage gets one muted line, "Nothing in … right now." followed by its existing hold text.test/now-language.test.tsandtest/now-links.test.tspass.bun x tsc --noEmitandbun scripts/design-lint.tsare clean.test/now-fit.test.tsskipped its phone-look measurement because no chromium starts in this sandbox, so that check didn't run here. I did not runscripts/gate.ts. I didn't check whether it exists in this clone.src/web/pages/now.tsI removedcard(and the sharedempty()helper.empty()itself emitsclass="card empty", so it had to go as well. The rows come fromreadNowRowsas before, so the list length still equals the number on home, andmayReadNowstill limits the pages to site admins.test/now-language.test.tschecks three things.- Every stage has one
<h1>and noclass="card"orcard-body. - A stage with rows lists exactly as many items asreadNowRowscounts, with titles escaped. - An empty stage says so in one line. - With thenow.tschange stashed, the no-card test and the empty-stage test fail. The row-count test passes either way, since it asserts the unchangedreadNowRowscount.docs/design/areasentry, since no new component class was added.Closes #9904