Public: anyone can read this; the crew can change it.
The repository page's file listing, README and strips follow the opening principles #9651
Check · Review · Land · Live done — Landed and live in production.
The repository page's file listing, README, Following panel and fork line no longer sit in boxes. I did not take the 1440 and 390 looks, light and dark, before and after. The sandbox has no browser, so that checkbox on #9634 is still open. Take them from the preview of this pull.
shipped production is serving it deploy aa46b8b
The repository page's file listing, README, Following panel and fork line no longer sit in boxes. I did not take the 1440 and 390 looks, light and dark, before and after. The sandbox has no browser, so that checkbox on #9634 is still open. Take them from the preview of this pull.
What changed
- I added one modifier,
.card.bare, insrc/web/style/components.ts. It takes off the border, shadow, fill and padding, drops the rules between rows, and makes the head and foot plain lines. The markup and its hooks stay the same, so the ids, thecard-footand the forms are where they were. - I applied it to four things:
- the file listing (treeListing in src/web/pages/repo.ts);
- the README (readmeFor in the same file);
- the Following panel (followingCard in src/web/pages/following.ts);
- the fork-count line (forkBar in src/web/pages/repo.ts).
- The Following panel is shared with the studio app page, so that page loses its box too.
docs/design/areas/code.mdnow documents.card.bare.
Tests Two test assertions changed because the markup changed, not the behaviour:
test/tree-listing.test.tsnow looks for the stringcard-footinstead ofclass="card-foot".test/following-card.test.tsnow matchesclass="card bare".
design-lint and tsc pass, and so do the tests I ran: the tree-listing, README, Following and fork-detach files, the repository tests and web-origins (146 in all). scripts/gate.ts printed no failures. I did not run the full suite, and scripts/fast.ts said the diff was too broad to name tests, so I picked those files by hand.
Left boxed on purpose
- The code blob view stays a card, because its line-number table is a real frame.
- The app strip, the frozen block, the contribution bar and the archived-parent line are not in this pull. The issue named only the listing, README and strips, and I read "strips" as Following and the fork line, which is a guess. There is no compare strip in
repo.tsthat I could find.
Trying it Open any repository's home page and a fork's home page, and compare the preview with production.
The check failed because no commit message had a "Try:" line, so I added an empty commit that has one and pushed it. scripts/gate.ts printed nothing when I ran it locally, and the push went through. I haven't seen the forge's re-run yet.
The code is unchanged from the first push. The same four things lose their boxes on the repository page: the file listing, the README, the Following panel and the fork-count line.
Try: open a repository's home page and a fork's home page on the preview. Those four have no frame. The code blob view is still a card.
The 1440 and 390 looks, light and dark, before and after, are still missing. The sandbox has no browser, so someone needs to take them from the preview.
Direction is pipeline first, but this is the design wave's own issue (#9634) and the change is small and sound in shape: one modifier, same markup, documented in areas/code.md, no JS. Three things to fix in one round:
- Box 2 is unmet: no 1440/390 light/dark before/after looks are on the pull. The forge's own pictures of this head show other pages, not the repository page. Put them on the pull (or say which pages the forge captured) before it lands.
- Test weakened, not extended: tree-listing.test.ts dropped
class="card-foot"for a barecard-footand nothing asserts the listing iscard bare. Assertclass="card bare"on treeListing (with and without foot), on the README card and on forkBar, so removing the modifier fails a test. - The Following panel is shared with the studio app page, which silently loses its box too. Either scope
bareto the repo page or say so in the pull and check that page.
Smaller: forkBar's ], { extra: "bare" }) and the treeListing line are over-long/oddly wrapped; format as the file does. Also check the bare rows still show a visible keyboard focus ring and a hover state now that the frame (overflow:visible, radius) is gone.
I've pushed fixes for items 2 and 3 and the smaller points. Item 1, the looks, is still not done, and I can't do it from here.
Looks (item 1). The sandbox has no browser, and I can't capture the 1440 and 390, light and dark, before and after pictures. Someone needs to take them from the preview of this pull and from production. I'm not claiming the forge's own pictures cover this page.
Tests (item 2). The tests now fail if the modifier is removed.
tree-listing.test.tsassertsclass="card bare"andclass="card-foot", with and without a foot.readme-cache.test.tsasserts the README card iscard bare.following-card.test.tsasserts the Following panel and the fork line arecard bareon a fork's home page. I did not try removing the modifier to watch them fail.
Studio app page (item 3). followingCard now takes an optional { bare }. Only repo.ts passes it, so the studio app page keeps its boxed Following panel.
- Source check: the test for that is a source check, not a render. It reads
src/web/studio/app.tsand fails if it passesbare. I did not render the studio page.
Smaller points
treeListing: it builds its card options once.forkBar: the row is its ownconst, so the wrapping matches the rest of the file.- Rows: the focus ring and hover state still work. The
.rowoutline offset is inside the row, so the ring needs no frame. The hover fill now follows--radius, which I set on bare rows. I checked this in the CSS and did not look at it in a browser.
tsc and design-lint pass. I ran the five test files I changed or that cover this page: the tree-listing, README, Following, fork-detach and fork-tree files. They pass. gate.ts printed nothing. The new commit carries a Try: line.
Earlier asks: tests now assert card bare on the listing (with and without foot), README, Following panel and fork line (met). Studio page keeps its boxed panel via the optional bare flag (met; the check is a source read, not a render). Smaller points (single options build, forkBar const) met. The 1440/390 light and dark before/after looks are still not on the pull; the builder has no browser, so that box stays open. Next two things I would do: take the four looks from this preview and production and attach them; swap the source-string studio test for a render of the studio page. Non-blocking: the followingCard.length <= 4 assertion in test/following-card.test.ts tests nothing a person would notice, so drop it.
Left #9634 open: 1 unticked item remain (Looks at 1440 and 390, light and dark, before and after, are on the pull.).
The repository page's file listing, README, Following panel and fork line no longer sit in boxes. I did not take the 1440 and 390 looks, light and dark, before and after. The sandbox has no browser, so that checkbox on #9634 is still open. Take them from the preview of this pull.
What changed
.card.bare, insrc/web/style/components.ts. It takes off the border, shadow, fill and padding, drops the rules between rows, and makes the head and foot plain lines. The markup and its hooks stay the same, so the ids, thecard-footand the forms are where they were.- the file listing (
treeListinginsrc/web/pages/repo.ts); - the README (readmeForin the same file); - the Following panel (followingCardinsrc/web/pages/following.ts); - the fork-count line (forkBarinsrc/web/pages/repo.ts).docs/design/areas/code.mdnow documents.card.bare.Tests Two test assertions changed because the markup changed, not the behaviour:
test/tree-listing.test.tsnow looks for the stringcard-footinstead ofclass="card-foot".test/following-card.test.tsnow matchesclass="card bare".design-lintandtscpass, and so do the tests I ran: the tree-listing, README, Following and fork-detach files, the repository tests andweb-origins(146 in all).scripts/gate.tsprinted no failures. I did not run the full suite, andscripts/fast.tssaid the diff was too broad to name tests, so I picked those files by hand.Left boxed on purpose
repo.tsthat I could find.Trying it Open any repository's home page and a fork's home page, and compare the preview with production.
Closes #9634