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

Settings › Accounts, who is on the forge, speaks the home page's language #9882

opened this

Merged 25d 10h ago, live in production

Settings › Accounts now has no card( left in accounts.ts. The test/accounts.test.ts files pass, bun x tsc --noEmit is clean and design-lint is clean. I did not run the full suite; the forge's check does that on the push.

Notes

opened this

Settings › Accounts now has no card( left in accounts.ts. The test/accounts*.test.ts files pass, bun x tsc --noEmit is clean and design-lint is clean. I did not run the full suite; the forge's check does that on the push.

  • Already on main: the accounts list was already a <section class="settings-block" id="accounts"> with rows in .list, so the new list assertions pass on main today and do not show the page changed. Only the sign-ins sub-page, /settings/accounts/:username, still used card().
  • Changed: I replaced that card() with a settings-block (id="tokens") holding an <h2>, a muted note, an <h3> for access tokens, and the tokens as row() items in .list setting-list. The Revoke confirm is unchanged, and I dropped the card import. No new class.
  • Confirms and 404: Suspend and Remove still go through /-/confirm, and a non-admin still gets the forge's one 404. test/accounts-language.test.ts asserts both.
  • Still boxed: the grant and sessions sections on the sign-ins page (grantCard and sessionsCard) are defined in model.ts and account.ts, outside this issue's files. They still render as cards, so the sign-ins page is not fully card-free.
  • Other tests: test/accounts-language.test.ts is new. It covers the list (the settings-block, no class="card, the suspend confirm link), the sign-ins block, the non-admin 404, and that accounts.ts holds no card(. No existing test was changed, and accounts-rows.test.ts passes as is.
  • Doc: I added a one-line entry for Accounts to docs/design/areas/settings.md.

To try it, sign in as an admin and open /settings/accounts, then click Sign-ins on a row.

Closes #9870

5 earlier comments
commented

Settings › Accounts now has no card( left in accounts.ts. The test/accounts*.test.ts files pass, bun x tsc --noEmit is clean and design-lint is clean. I did not run the full suite; the forge's check does that on the push.

  • Already on main: the accounts list was already a <section class="settings-block" id="accounts"> with rows in .list, so the new list assertions pass on main today and do not show the page changed. Only the sign-ins sub-page, /settings/accounts/:username, still used card().
  • Changed: I replaced that card() with a settings-block (id="tokens") holding an <h2>, a muted note, an <h3> for access tokens, and the tokens as row() items in .list setting-list. The Revoke confirm is unchanged, and I dropped the card import. No new class.
  • Confirms and 404: Suspend and Remove still go through /-/confirm, and a non-admin still gets the forge's one 404. test/accounts-language.test.ts asserts both.
  • Still boxed: the grant and sessions sections on the sign-ins page (grantCard and sessionsCard) are defined in model.ts and account.ts, outside this issue's files. They still render as cards, so the sign-ins page is not fully card-free.
  • Other tests: test/accounts-language.test.ts is new. It covers the list (the settings-block, no class="card, the suspend confirm link), the sign-ins block, the non-admin 404, and that accounts.ts holds no card(. No existing test was changed, and accounts-rows.test.ts passes as is.
  • Doc: I added a one-line entry for Accounts to docs/design/areas/settings.md.

To try it, sign in as an admin and open /settings/accounts, then click Sign-ins on a row.

commented

Settings › Accounts has no card( left in src/web/pages/accounts.ts. This push adds only the missing "Try:" line the check asked for. I haven't seen the check's verdict on it. The gate passes locally and the earlier tests, tsc and design-lint were green.

  • List: the accounts list was already a <section class="settings-block" id="accounts"> with rows in .list, so nothing changed there. Suspend and remove still go through /-/confirm, and a non-admin still gets the forge's one 404.
  • Sign-ins page: /settings/accounts/:username was the one remaining use of card(). It is now a settings-block with an <h2>, a muted note, an <h3> for access tokens, and the tokens as row() items. No new class.
  • Still boxed: the grant and sessions sections on that page (grantCard and sessionsCard) live in model.ts and account.ts, outside this issue's files, so they still render as cards. I left them.
  • Tests and doc: test/accounts-language.test.ts is new and covers the list, the sign-ins block, the non-admin 404 and that accounts.ts holds no card(. The list assertions already pass on main, so it only fails there on the sign-ins block. No existing test was changed. docs/design/areas/settings.md has a one-line entry.

To try it, sign in as an admin on the preview, open /settings/accounts, then click Sign-ins on a person's row.

commented

I merged main into this branch and pushed it, so the pull should merge cleanly again.

The only conflict was in docs/design/areas/settings.md. Both sides had added a paragraph at the same spot: mine for Settings › Accounts (#9870) and main's for Settings › General (#9853). I kept both paragraphs.

After the merge I ran bun scripts/gate.ts, bun x tsc --noEmit and bun scripts/design-lint.ts. I also ran the two tests that cover this change, test/accounts-language.test.ts and test/settings.test.ts (10 pass, 0 fail). I did not run the full suite; the forge's check does that on this push.

Nothing else about the pull changed. Settings › Accounts still drops its card: who is on the forge and a person's sign-ins page use plain sections, with no new component class. test/accounts-language.test.ts pins that.

To try it, open /settings and go to Accounts, or fetch the preview: curl -H "authorization: Bearer $FORGE_TOKEN" https://lab--9882--forge-trevato-apps.open-platform.sh.

commented

The sign-ins page /settings/accounts/:username now renders with no class="card, and I've pushed the fix.

  • Cards removed:
    • grantCard in src/web/pages/model.ts is now two <section class="settings-block"> blocks, each with its <h2>, and the grant and ceiling forms keep their actions and ids.
    • ceilingCard gained an optional plain flag, which grantCard sets. The organization page calls ceilingCard without it and still gets its card, so that caller is unchanged.
  • Where I differ from your note: sessionsCard was already a settings-block with rows in .list setting-list, so I left it alone. The page's only cards were the grant form and the ceiling form.
  • Tests:
    • The sign-ins test now asserts the whole page has no class="card. It also checks that the tokens block, the grant and ceiling forms and "Signed-in browsers" are still there, and that there are at least four settings-blocks. The no-card assertion would have failed before this change.
    • I dropped the accounts-list assertions that already passed on main, keeping only the suspend confirm link.
    • I removed the source-grep test on accounts.ts.
    • The non-admin 404 test stays.
  • Checks: tsc, scripts/gate.ts and design-lint are clean. The accounts-language, account-rows, model-grant, model-page-shape and accounts tests all pass (41 across the five model and accounts files, plus 3 in accounts-language and 8 across accounts-language and account-rows). One test run logged "Cannot use a closed database" from the checks push handler during teardown, and the tests still passed.
commented

I merged main into the branch again and pushed it, so the pull should merge cleanly.

The only conflict was in docs/design/areas/settings.md, where both sides had added entries at the same spot. I kept both and left the rest of the pull as it was.

After the merge, scripts/gate.ts, tsc --noEmit and design-lint were clean. I ran only test/accounts-language.test.ts and test/settings.test.ts, and both passed (9 tests). I did not run the full suite; the forge's check does that on this push.

commented

Left #9870 open: 1 unticked item remain (A test (e.g. test/accounts-language.test.ts) GETs the page as an admin and asserts no class="card and the settings-block; it fails on main today.).

Sign in to join this conversation.

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

Keyboard shortcuts

Docs