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

The flags page's form draws §5's row-fields, and .flag-form leaves the stylesheet #5184

opened this

Merged 45d 9h ago, live in production

The flags page's form now uses only the shared §5d row-fields class, and .flag-form is gone from the stylesheet and from the design doc. The new test passes along with test/settings-visible.test.ts and test/design-lint.test.ts (29 pass, 0 fail). bun scripts/design-lint.ts and bun x tsc --noEmit are both clean.

Notes

opened this

The flags page's form now uses only the shared §5d row-fields class, and .flag-form is gone from the stylesheet and from the design doc. The new test passes along with test/settings-visible.test.ts and test/design-lint.test.ts (29 pass, 0 fail). bun scripts/design-lint.ts and bun x tsc --noEmit are both clean.

  • src/web/pages/flags.ts: the form was already class="row-fields flag-form" and is now class="row-fields". Inputs and buttons are unchanged.
  • src/web/style/content.ts: the .flag-form block is deleted, including its phone media query and the .row:has(.flag-form) rules. On a phone the controls still wrap under the text, because .setting-list .row-trail already takes the full width under 640px and .row-fields already wraps.
  • One visible change on wide screens: the controls now line up from the left of the trail instead of the right, because the removed justify-content: flex-end was the only thing pushing them right.
  • docs/DESIGN.md: only the ` - .flag-form ` line is removed from §5d.
  • docs/design/baseline.json: left as is, since it has no entry for this class.
  • test/flags-settings.test.ts: a new test fetches /settings/flags as an admin. It checks that the page has no flag-form, that each declared flag has exactly one <form class="row-fields" … action="/settings/flags">, and that the form carries the flag's hidden name plus its forge, users, roles and percent fields and the Clear button. It then posts a value and checks that it is saved, then clears it. On the old markup it fails, because no form matches.

To try it, sign in as an admin on the preview and open /settings/flags, both at full width and narrower than 640px.

🤖 Generated with Claude Code

Closes #4891

commented

The flags page's form now uses only the shared §5d row-fields class, and .flag-form is gone from the stylesheet and from the design doc. The new test passes along with test/settings-visible.test.ts and test/design-lint.test.ts (29 pass, 0 fail). bun scripts/design-lint.ts and bun x tsc --noEmit are both clean.

  • src/web/pages/flags.ts: the form was already class="row-fields flag-form" and is now class="row-fields". Inputs and buttons are unchanged.
  • src/web/style/content.ts: the .flag-form block is deleted, including its phone media query and the .row:has(.flag-form) rules. On a phone the controls still wrap under the text, because .setting-list .row-trail already takes the full width under 640px and .row-fields already wraps.
  • One visible change on wide screens: the controls now line up from the left of the trail instead of the right, because the removed justify-content: flex-end was the only thing pushing them right.
  • docs/DESIGN.md: only the ` - .flag-form ` line is removed from §5d.
  • docs/design/baseline.json: left as is, since it has no entry for this class.
  • test/flags-settings.test.ts: a new test fetches /settings/flags as an admin. It checks that the page has no flag-form, that each declared flag has exactly one <form class="row-fields" … action="/settings/flags">, and that the form carries the flag's hidden name plus its forge, users, roles and percent fields and the Clear button. It then posts a value and checks that it is saved, then clears it. On the old markup it fails, because no form matches.

To try it, sign in as an admin on the preview and open /settings/flags, both at full width and narrower than 640px.

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs