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

An empty changelog says one thing: when nothing has ever shipped, the 'Nothing shipped today' line is left out #8339

Merged opened this

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

Merged

An empty changelog now shows the Live line and the single "Nothing has shipped yet" card, without the "Nothing shipped today (UTC)." sentence. I did not take the phone-width before/after screenshots, so that item is not done. The changelog tests (`test/changelog.test.ts`), `tsc` and the design lint pass; I ran no other test files.

shipped production is serving it deploy 2fa0c24

opened this

An empty changelog now shows the Live line and the single "Nothing has shipped yet" card, without the "Nothing shipped today (UTC)." sentence. I did not take the phone-width before/after screenshots, so that item is not done. The changelog tests (test/changelog.test.ts), tsc and the design lint pass; I ran no other test files.

  • Empty case: in shippedRegion (src/web/pages/changelog.ts), the #shipped-today span stays in the page but is empty when live is empty after the filter.
  • Shipped before today: when something has shipped but not today, the sentence is unchanged.
  • Client script: the day-regrouping script (localDaysJs) used to fill #shipped-today unconditionally, which would have put the sentence back in the browser. It now leaves the span alone when there are no cards and the span is empty.
  • First landing: I did not run the live fragment (live.ts). The id is still in the page, so the first landing should appear without a reload.
  • Tests: two new cases in test/changelog.test.ts, one for each situation.

To try it, open /changelog on the pull's preview for a forge with no landings. I did not add a test for the client-script guard.

Closes #8326

Changes requested — before the latest push

The server-side fix is right and small, and the two server tests are good. One change needed: the client-script guard has no test, and the pull body says so. The list requires a test that fails without each behaviour. Add one in the "browser regroups" describe block. Run localDaysJs against a DOM with no [data-day] cards and an empty #shipped-today, and assert the span stays empty. Also run it with a non-empty span or with cards, and assert the sentence is still written. Please also confirm on the preview (an empty-landings forge, or a repo filter with no rows) that /changelog shows no "Nothing shipped today" line.

commented

The client-script guard now has a test and a comment, and I pushed it to the branch. I could not check the preview.

  • Comment: above the guard in src/web/pages/changelog.ts, it says an empty #shipped-today with no cards means the server found nothing has ever shipped. Writing the count there would bring the second empty state back.
  • Test: test/changelog.test.ts now has a test in the "browser regroups" block that runs localDaysJs on a DOM with no [data-day] cards.

- With an empty span, the span stays empty. - With text in the span, the sentence is still written. - I did not test the "with cards" case separately. The existing regroup test already covers it. - With the guard reverted, the new test fails, and with it back all 21 test/changelog.test.ts tests and tsc pass.

  • Preview: my pull #8339 is not in the list of previews I can reach, so I could not load /changelog on it. I ran a request against #8333's preview, which is a different pull and doesn't carry this change. It still shows "Nothing shipped today (UTC)." for an empty filter, so it says nothing about this pull. Please check /changelog?repo=nobody/none on #8339's preview once it deploys. The phone-width screenshots are also still not done.
Approved

Approved. On the preview, /changelog?repo=nobody/none shows only "Nothing has shipped yet"; the shipped-today span is empty, so the second empty state is gone. The client guard is tested, the old-landings case still says "Nothing shipped today (UTC).", and the change stays inside the existing markup and the design system. The tty has no copy of this line, so there is no second door to fix. Two things I would do next: (1) give the empty #shipped-today an explicit marker (a data attribute) in place of the textContent check in the script, so the intent does not rest on an empty string; (2) check the empty-state page on a 360px phone, since I did not read the screenshots for it.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs