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

The apps and origins pages' filters draw §5's filters, and .filters leaves their markup #4344

opened this

Merged 43d 21h ago, live in production

The All/Live filter on /apps and the repository filter form on the origin picker (/settings/origins/:id/repos) are now drawn with §5's .bar, and .filters no longer appears in either page's HTML. Apps: became in src/web/pages/apps.ts.

Notes

opened this

The All/Live filter on /apps and the repository filter form on the origin picker (/settings/origins/:id/repos) are now drawn with §5's .bar, and .filters no longer appears in either page's HTML.

  • Apps: <div class="filters mb"> became <div class="bar mb"> in src/web/pages/apps.ts. It still holds seg(), so the "All" and "Live" links and the current-filter mark are unchanged.
  • Origins: <form class="filters"> became <form class="bar mb"> in src/web/pages/origins.ts. It still submits by GET with q, and the "Filter" button and "Refresh from origin" link are untouched. I added mb because .filters had supplied the bottom margin.
  • Tests: test/apps-archived.test.ts and test/web-origins.test.ts now assert that filters is absent. They also assert that the bar markup, the /apps?live=1 link, the current mark, the q field and the refresh button are present.
  • Checks: bun x tsc --noEmit, bun scripts/design-lint.ts and the three test files (test/design-lint.test.ts plus the two above) pass. I did not run the rest of the suite.
  • Left alone, as the issue asks: the .filters rules in the stylesheet and docs/DESIGN.md are for part two. The .search class on the origins input stays, because it gives the field its width.

Closes #4295

3 earlier comments
commented

The All/Live filter on /apps and the repository filter form on the origin picker (/settings/origins/:id/repos) are now drawn with §5's .bar, and .filters no longer appears in either page's HTML.

  • Apps: <div class="filters mb"> became <div class="bar mb"> in src/web/pages/apps.ts. It still holds seg(), so the "All" and "Live" links and the current-filter mark are unchanged.
  • Origins: <form class="filters"> became <form class="bar mb"> in src/web/pages/origins.ts. It still submits by GET with q, and the "Filter" button and "Refresh from origin" link are untouched. I added mb because .filters had supplied the bottom margin.
  • Tests: test/apps-archived.test.ts and test/web-origins.test.ts now assert that filters is absent. They also assert that the bar markup, the /apps?live=1 link, the current mark, the q field and the refresh button are present.
  • Checks: bun x tsc --noEmit, bun scripts/design-lint.ts and the three test files (test/design-lint.test.ts plus the two above) pass. I did not run the rest of the suite.
  • Left alone, as the issue asks: the .filters rules in the stylesheet and docs/DESIGN.md are for part two. The .search class on the origins input stays, because it gives the field its width.
commented

I added the sizing rules to .bar, so the origins field and the apps toggle keep their phone layout. I haven't re-checked at 360px, because the sandbox has no browser. The change only copies the old .filters rules, so the layout should match what it was.

  • Origins field: .bar .search now carries min-width: 180px; flex: 1; max-width: 320px, the same sizing the old .filters .search gave it.
  • Apps toggle: .bar .seg now carries max-width: 100%; overflow-x: auto; scrollbar-width: none, and under 420px .bar .seg > a gets padding: 0 8px. These are the old .filters .seg rules.
  • Old rules kept: I left the .filters rules in place, because other pages (browse, search, org, studio) still use that class. Part two removes them once nothing does.
  • Test: test/apps-archived.test.ts now asserts the stylesheet has .bar .search and .bar .seg rules and the 420px padding rule. None of them is nested under .filters.

bun x tsc --noEmit, bun scripts/design-lint.ts and the design-lint, apps-archived and web-origins tests pass.

commented

I merged main into the branch and pushed it. The merge had one conflict, in test/web-origins.test.ts, and it's resolved.

  • The conflict: this pull changed the repo-picker test to expect the new bar markup, while main renamed the mirror form's class to row-fields. I kept both: the picker assertions follow this pull's filter form (class="bar mb"), and the mirror form is matched as row-fields, as src/web/pages/origins.ts now emits.
  • Checks run: bun test test/web-origins.test.ts test/web-apps.test.ts passes (53 tests), and bun x tsc --noEmit is clean.
  • Not run: I didn't run the full bun test here; it timed out after 120 seconds and was moved to the background. I left it to the forge's check.
commented

The conflict markers in src/web/style/content.ts are gone, and a new test checks that none come back. The branch is merged with the latest main and pushed.

  • Cause: when I merged main into the branch, I committed src/web/style/content.ts with the conflict markers still in it. A second conflict in the same spot appeared once main moved again.
  • Fix: I deleted the three marker lines and kept the comment "The same three reaches for a filter bar drawn with §5's .bar." above the .bar rules. The .filters rules and their comment are untouched, for part two as agreed.
  • Test: test/apps-archived.test.ts now fails if any line of the stylesheet starts with <<<<<<<, ======= or >>>>>>>. It also asserts that the comment is there.
  • Checks run: bun x tsc --noEmit and bun scripts/design-lint.ts are clean. bun test passes on the three touched files: test/apps-archived.test.ts, test/web-origins.test.ts and test/web-apps.test.ts (59 tests). I did not run the full suite here, so the forge's check will be the first full run.

I didn't change the apps and origins markup.

Sign in to join this conversation.

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

Keyboard shortcuts

Docs