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

The subscriptions page's headroom form draws §5's field and row, and .headroom leaves its markup #4408

Merged opened this

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

Merged

The headroom form and the budget form beside it on `/settings/subscriptions` no longer carry the `headroom` class, and `headroom` no longer appears as a class in the page's HTML. `bun x tsc --noEmit` and `bun scripts/design-lint.ts` are clean. `bun test test/subscriptions.test.ts test/settings-visible.test.ts test/design-lint.test.ts` passes, 37 tests. I had no browser, so the 5em width and the 39…

shipped production is serving it deploy c82665e

opened this

The headroom form and the budget form beside it on /settings/subscriptions no longer carry the headroom class, and headroom no longer appears as a class in the page's HTML. bun x tsc --noEmit and bun scripts/design-lint.ts are clean. bun test test/subscriptions.test.ts test/settings-visible.test.ts test/design-lint.test.ts passes, 37 tests. I had no browser, so the 5em width and the 390 px wrapping are untested.

§5 classes used

  • Forms: both forms keep §5's .row-fields (flex, wraps, gap 8px).
  • Inputs and buttons: they keep .input and btn(... size: "sm").
  • Wrapping: the subscriptions list card now takes extra: "setting-list". .setting-list .row and .setting-list .row-trail in components.ts give the wrap at 640 px and below, so the row-trail drops under the text. That replaces .row:has(.headroom).

The 5em input width

  • §5 had no narrow-number rule, and .input is width: 100%. I added one rule in components.ts, .row-fields .input[type="number"] { width: 5em; }, a selector on existing classes with no new class name.

Left alone

  • docs/DESIGN.md is untouched.
  • The .headroom rules in content.ts (lines ~272–278) are still there, as asked. They match nothing now and can go in a later pull.
  • The budget form's class is dropped too, since it shared the headroom class.
  • Both forms still post to the same actions, and the headroom field name is unchanged.

Test

  • A new test in test/subscriptions.test.ts asserts class="headroom is absent and that the form action, the row-fields form and the headroom input are present.
  • The existing tests at lines 606–664 and test/settings-visible.test.ts:120 pass unchanged.

To try it, open /settings/subscriptions as an admin with a subscription added, then narrow the window to 390 px.

🤖 Generated with Claude Code

Closes #4404

commented

The headroom form and the budget form beside it on /settings/subscriptions no longer carry the headroom class, and headroom no longer appears as a class in the page's HTML. bun x tsc --noEmit and bun scripts/design-lint.ts are clean. bun test test/subscriptions.test.ts test/settings-visible.test.ts test/design-lint.test.ts passes, 37 tests. I had no browser, so the 5em width and the 390 px wrapping are untested.

§5 classes used

  • Forms: both forms keep §5's .row-fields (flex, wraps, gap 8px).
  • Inputs and buttons: they keep .input and btn(... size: "sm").
  • Wrapping: the subscriptions list card now takes extra: "setting-list". .setting-list .row and .setting-list .row-trail in components.ts give the wrap at 640 px and below, so the row-trail drops under the text. That replaces .row:has(.headroom).

The 5em input width

  • §5 had no narrow-number rule, and .input is width: 100%. I added one rule in components.ts, .row-fields .input[type="number"] { width: 5em; }, a selector on existing classes with no new class name.

Left alone

  • docs/DESIGN.md is untouched.
  • The .headroom rules in content.ts (lines ~272–278) are still there, as asked. They match nothing now and can go in a later pull.
  • The budget form's class is dropped too, since it shared the headroom class.
  • Both forms still post to the same actions, and the headroom field name is unchanged.

Test

  • A new test in test/subscriptions.test.ts asserts class="headroom is absent and that the form action, the row-fields form and the headroom input are present.
  • The existing tests at lines 606–664 and test/settings-visible.test.ts:120 pass unchanged.

To try it, open /settings/subscriptions as an admin with a subscription added, then narrow the window to 390 px.

🤖 Generated with Claude Code

Approved

Approved. Both forms are now §5 .row-fields, the card takes setting-list so rows wrap under 640px, the number input keeps its 5em width through a selector on existing classes, and the test would fail without the change. The preview answers 303 to a guest on /settings/subscriptions, so I could not see the admin view. I judged the wrapping from the CSS only.

Next, in order:

  1. Delete the now-dead .headroom rules (src/web/style/content.ts:272-278) and the .headroom entry in docs/DESIGN.md §5d (line 397), in a follow-up pull.
  2. Check the 390px layout once as an admin: the label, the 5em input and the Keep/Set button should wrap cleanly, and the second form should not leave a lone orphaned button.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs