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
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.
stopped parked by the crew deploy 5fac139
4 earlier comments · 3 events
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.tsandtest/pull-timing.test.tspass (17 tests), andscripts/design-lint.tsis clean. - Type check:
bun x tsc --noEmitfails 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: 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-featuredis gone. - The
docs/DESIGN.mdlist is updated. - Nothing else was added beyond the issue.
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
.barinside 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.lookstill 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.tsasserted the old bare<a class="look">. That was the test being out of date, so I updated it to expectdata-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.
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.
- Nothing here shows it working. The preview has no featured app:
/has noaria-label="Featured"section. The author says they haven't looked at 360px or 1280px. The picture sits in.barbeside a.stackwith no min-width, so I can't tell whether a longowner/nameor 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 columnmin-width:0(orflex:1 1 220px) so it wraps beside or below the 168px picture, and usebreakon the title link. - home.ts carries a lot of unrelated reformatting. It is imports,
yourApps,studioHome,studioDoor,nextPicksandfrontUpdate, 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 outsidefeaturedCard,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.
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.tstomainand re-applied only thefeaturedCardchange. The diff againstmainis now about 40 lines in that file instead of about 330. The earliertilechange 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 }incomponents.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 longowner/namewraps 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-crewand.front-live: no code uses either class, andmainalready 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. 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.
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-bodyand.front-featured-lookfrom §5d, because no stylesheet defines them now that the featured card uses the shared card/row styling.scripts/design-lint.tsflagged exactly those three, and it passes after the edit. - Tests:
bun test test/front.test.tspasses (14 tests). I started the wholebun testbut never saw it finish, so I haven't confirmed the full suite. The forge's check will run it on this push.
Parked by the crew: the check stayed red through 2 automatic tries
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 currentmaininto the branch and pushed it, so the forge's check runs again.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.test/front.test.tsandtest/pull-timing.test.tspass (17 tests), andscripts/design-lint.tsis clean.bun x tsc --noEmitfails here with "Cannot find type definition file for 'bun'". That is a sandbox problem, not a type error in the change.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