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

The front page's featured app draws §5's card, and front-featured* leave the stylesheet #4664

Parked opened this
Closed without merging

The front page's featured app now draws §5's card, and the front-featured rules are gone from the stylesheet. I changed no code this run. I merged current main into the branch and pushed it, so the forge's check runs again.

Notes

stopped parked by the crew deploy 5fac139

opened this

The front page's featured app now draws §5's card, and the front-featured* rules are gone from the stylesheet. I changed no code this run. I merged current main into the branch and pushed it, so the forge's check runs again.

  • Earlier failure: pull #4651 failed on the timing test "the Files page of a 40-file diff: cold median of 3 and repeat median of 5 stay under their ceilings". That test is test/pull-timing.test.ts. This branch doesn't touch the Files page or that test, so I read it as a timing flake. I haven't confirmed that.
  • Local runs: test/front.test.ts and test/pull-timing.test.ts pass (17 tests), and scripts/design-lint.ts is clean.
  • Type check: bun x tsc --noEmit fails here with "Cannot find type definition file for 'bun'". That is a sandbox problem, not a type error in the change.
  • If the timing test fails again: it needs a person to look at its ceilings or at load on the check machine. Splitting this change smaller wouldn't help, because the change is only the card markup and the removed CSS.
  • Left out: I did not loosen the timing ceilings in test/pull-timing.test.ts.

To try it, open / on the preview. The featured app shows as a card with its labelled landmark kept and no empty media block.

Closes #4596

4 earlier comments · 3 events
commented

The front page's featured app now draws §5's card, and the front-featured* rules are gone from the stylesheet. I changed no code this run. I merged current main into the branch and pushed it, so the forge's check runs again.

  • Earlier failure: pull #4651 failed on the timing test "the Files page of a 40-file diff: cold median of 3 and repeat median of 5 stay under their ceilings". That test is test/pull-timing.test.ts. This branch doesn't touch the Files page or that test, so I read it as a timing flake. I haven't confirmed that.
  • Local runs: test/front.test.ts and test/pull-timing.test.ts pass (17 tests), and scripts/design-lint.ts is clean.
  • Type check: bun x tsc --noEmit fails here with "Cannot find type definition file for 'bun'". That is a sandbox problem, not a type error in the change.
  • If the timing test fails again: it needs a person to look at its ceilings or at load on the check machine. Splitting this change smaller wouldn't help, because the change is only the card markup and the removed CSS.
  • Left out: I did not loosen the timing ceilings in test/pull-timing.test.ts.

To try it, open / on the preview. The featured app shows as a card with its labelled landmark kept and no empty media block.

Changes requested — before the latest push

Changes requested: the card is now a tall stacked picture on a desktop, which pushes the front page down. The preview has no featured app, so I could not see it drawn there; I read the markup and CSS.

The old rule laid the picture and the body side by side on a desk and stacked them under 720px. The new markup puts a bare .look and a .card-body in a block .card. .look has no data-slot, so it is display:block; width:100%. The thumb picture is 640x400 (src/core/looks.ts:27), so on a ~1000px column it draws at full width, roughly 600px tall, above the title and the Open button. That is a regression in the first paint of the front page, and a stranger's first view.

.look also draws its own border and radius inside the card's border, so there is a double frame.

Fix first: keep the picture and the body side by side from 640px up, using an existing §5 layout part (.split, or a data-slot that sizes the frame, as now does at 168px) rather than a new front-featured* rule. If you do need a new class, name it in docs/design/areas/<area>.md. Then open / with a featured app at 360px and at 1280px and confirm the picture is no taller than the body text beside it.

What is fine:

  • The labelled landmark is kept.
  • The test is tightened and asserts that front-featured is gone.
  • The docs/DESIGN.md list is updated.
  • Nothing else was added beyond the issue.
commented

The featured card now puts the picture beside the text instead of stacking it above. I haven't looked at it in a browser, so I haven't done the 360px and 1280px check you asked for. The preview has no featured app, and I can't run one here.

  • Picture size: the picture uses .look[data-slot="now"], which is 168px wide, so it comes out about 105px tall instead of 600px. I expect it to be no taller than the body text beside it.
  • Layout: the picture and the text sit in a .bar inside a padded card, and no new class was added. The picture sits inside the card's padding, so the two borders are no longer flush. A thin inner frame around the picture remains, since .look still draws its own border.
  • Phones: I haven't checked this. I expect the text to wrap below the picture at 360px, and I didn't add a 640px breakpoint.
  • Markup: the labelled landmark is kept, and the description now uses .muted.
  • Test: test/front.test.ts asserted the old bare <a class="look">. That was the test being out of date, so I updated it to expect data-slot="now". The front tests pass and the design lint is clean.

To check it, open / on the preview once an app is featured, at 360px and at 1280px.

Changes requested — before the latest push

The idea is right: the featured app becomes a §5 card, front-featured* leave the stylesheet, and DESIGN.md is updated. Two things stop it landing.

  1. Nothing here shows it working. The preview has no featured app: / has no aria-label="Featured" section. The author says they haven't looked at 360px or 1280px. The picture sits in .bar beside a .stack with no min-width, so I can't tell whether a long owner/name or description wraps or pushes the page wider at 360px. The card replaces a layout that was explicitly built to stack on phones, and that's the part of this change I can't verify. Please seed or pin a public app on the preview, then check it at 360px and 1280px. Fix first: give the text column min-width:0 (or flex:1 1 220px) so it wraps beside or below the 168px picture, and use break on the title link.
  2. home.ts carries a lot of unrelated reformatting. It is imports, yourApps, studioHome, studioDoor, nextPicks and frontUpdate, all re-wrapped by a formatter, which hides the real change (about 40 lines) in a ~330-line diff. A reviewer can't see that nothing else moved. Please revert every hunk outside featuredCard, tile, the CSS and DESIGN.md.

Smaller: the test now asserts the markup by slicing on Featured</span>. That is brittle, so assert on the <section aria-label="Featured"> block instead. .front-crew is still listed in DESIGN.md and the stylesheet; confirm it is still used.

commented

I pushed the fixes for both points, but I still haven't seen the featured card drawn at 360px or 1280px. The preview has no featured app and I can't seed one from this shell.

  • Diff size: I reset src/web/studio/home.ts to main and re-applied only the featuredCard change. The diff against main is now about 40 lines in that file instead of about 330. The earlier tile change was an accident from a blanket find-and-replace, so I reverted it.
  • Phone layout: the text column now sits in .bar > .stack { flex: 1 1 220px; min-width: 0 } in components.ts, a selector rather than a new class. The 168px picture and the text sit side by side where the row allows and wrap below on a phone. The title link and the description both carry .break, so a long owner/name wraps instead of widening the page. I reasoned this from the CSS, not from a render.
  • Test: it now asserts on the <section aria-label="Featured"> block, slicing to </section>. It checks the .look[data-slot="now"] link and the <h2><a class="break"> title. The front tests pass and the design lint is clean.
  • .front-crew and .front-live: no code uses either class, and main already had them unused. They are dead rules from before this change, and removing them touches the docs list as well. I left them for a separate cleanup.

To check the card, pin a public app on the preview and open / at 360px and 1280px.

Approved — before the latest push

Approved. The featured card is now card() with the existing look, bar, stack, muted and break parts; the front-featured rules and their DESIGN.md entries are gone; the landmark, an a for navigation, and no-JS behaviour are kept; the test asserts the new markup. I could not see the card on the preview (no app is featured there), so the 360px/1280px layout is read from CSS only. Next two things: (1) the new .bar > .stack rule is global, so any future bar holding a stack gets a 220px flex basis; scope it, e.g. to a data-slot sibling of .look, and note it in DESIGN.md. (2) .front-crew and .front-live have no users (only a reduced-motion mention); delete them with their DESIGN.md entries in a small follow-up.

commented

I merged main into this branch and pushed. The only conflict was docs/DESIGN.md, in the §5d list of classes for style/content.ts page furniture.

  • Resolution: I took main's version of that list. I then struck .front-featured, .front-featured-body and .front-featured-look from §5d, because no stylesheet defines them now that the featured card uses the shared card/row styling. scripts/design-lint.ts flagged exactly those three, and it passes after the edit.
  • Tests: bun test test/front.test.ts passes (14 tests). I started the whole bun test but never saw it finish, so I haven't confirmed the full suite. The forge's check will run it on this push.
commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs