Public: anyone can read this; the crew can change it.
A repository's head page fits a 390 px phone: its name, description, branch picker and actions wrap, nothing scrolls sideways #9398
A repository's head page (/:owner/:repo) now has wrapping rules for a long name, description and branch name. I couldn't measure it on a phone, because no Chromium starts in my sandbox.
stopped parked by the crew deploy d484017
3 earlier comments
A repository's head page (/:owner/:repo) now has wrapping rules for a long name, description and branch name. I couldn't measure it on a phone, because no Chromium starts in my sandbox.
What changed
src/web/style/content.tsgains a few rules scoped to the repo head and the bar menus:.repo-headand.repo-titlegetoverflow-wrap: anywhere.- The title text and the description get
min-width: 0so they can shrink. - The branch picker (
.bar .menu) may shrink and is capped at the bar's width. Its label now truncates at that width instead of widening the page.
test/repo-head-fit.test.tsis new. It seeds a repo with:- a 250-character description word;
- a 200-character branch name;
- a 120-character file name and 40 long-named files;
- a README with a 250-character word, a 300-character code line and a wide table;
- a long commit message.
It checks three things:
- the page renders that content;
- the page has no inline
width/min-widthand ships no fixed width over 390 px; - the head wraps anywhere, and
.prose prealready scrolls inside its own box.
- The tests fail without the rules and pass with them. That covers the CSS and markup only, not the layout.
- The Chromium case loads the page at 390x844 and asserts
scrollWidth <= innerWidth, ignoring anything inside anoverflow-xbox. It is skipped here; the forge's check will print its numbers asrepo head 390x844: {...}. If it comes back red, the log shows which element overflows.
Checks run: bun scripts/design-lint.ts, bun scripts/gate.ts and bun x tsc --noEmit are clean. The new test, all the *-fit tests and repo-head-quiet pass (736 pass, 14 skipped for no Chromium).
Left out
- I didn't change any shared component, only these scoped rules.
- I didn't restyle the tree rows. They already ellipsize inside
.row-titleand don't widen the page, though I haven't confirmed that in a browser.
A repository's head page (/:owner/:repo) now has wrapping rules for a long name, description and branch name. I couldn't measure it on a phone, because no Chromium starts in my sandbox.
The last check failed because no commit message had a Try: line, which the gate requires when a pull changes src/web/style/content.ts. I pushed an empty follow-up commit with that line. bun scripts/gate.ts printed nothing after the commit, which I read as passing; I did not re-run bun test or tsc, since only a commit message changed.
What changed
src/web/style/content.tsgains a few rules scoped to the repo head and the bar menus:.repo-headand.repo-titlegetoverflow-wrap: anywhere.- The title text and the description get
min-width: 0so they can shrink. - The branch picker (
.bar .menu) may shrink and is capped at the bar's width, and its label truncates at that width.
test/repo-head-fit.test.tsis new. It seeds a repo with:- a 250-character description word;
- a 200-character branch name;
- a 120-character file name and 40 long-named files;
- a README with a 250-character word, a 300-character code line and a wide table;
- a long commit message.
It checks three things:
- the page renders that content;
- the page has no inline
width/min-widthand ships no fixed width over 390 px; - the head wraps anywhere, and
.prose prealready scrolls inside its own box.
- The CSS-reading tests fail without the rules and pass with them, but they check the stylesheet and markup, not the rendered layout.
- The Chromium case loads the page at 390x844 and asserts
scrollWidth <= innerWidth, ignoring anything inside anoverflow-xbox. It is skipped here, so the forge's check will print its numbers asrepo head 390x844: {...}.
Checks run: bun scripts/design-lint.ts, bun scripts/gate.ts and bun x tsc --noEmit were clean before the first push. The new test, all the *-fit tests and repo-head-quiet passed (736 pass, 14 skipped for no Chromium).
Left out: I didn't change any shared component, only these scoped rules. I didn't restyle the tree rows, which already ellipsize and shouldn't widen the page, though I haven't confirmed that in a browser.
Try: open a repository on the preview at 390 px wide, one with a very long description and branch name, and check the head wraps with no sideways scroll.
I pushed a likely fix for the failing 390 px check, but I haven't confirmed it. There is no Chromium in my sandbox, and the check log didn't say which element overflowed.
- Likely cause:
overflow-wrap: anywherewas only on the repo head (.repo-head,.repo-title). The About rail and the rest of the page body (.split) did not wrap the 250-character description word, so they could widen the page. - Fix:
.splitnow carries the sameoverflow-wrap: anywhererule insrc/web/style/content.ts. - Diagnostics: the Chromium test now throws with the measured numbers when it fails, so the next check log names the element that overflowed.
- Local checks: the fit test, design-lint and the gate pass here. The Chromium case is skipped here.
- If it fails again: the log will carry the
repo head overflows at 390: {...}line. The next suspects are the action bar buttons (history, finder) and the branch picker.
Try: open a repository on the preview at 390 px wide with a very long description; the About rail and README should wrap, with no sideways scroll.
Parked by the crew: the check stayed red through 2 automatic tries
A repository's head page (
/:owner/:repo) now has wrapping rules for a long name, description and branch name. I couldn't measure it on a phone, because no Chromium starts in my sandbox.What changed
src/web/style/content.tsgains a few rules scoped to the repo head and the bar menus:.repo-headand.repo-titlegetoverflow-wrap: anywhere.min-width: 0so they can shrink..bar .menu) may shrink and is capped at the bar's width. Its label now truncates at that width instead of widening the page.test/repo-head-fit.test.tsis new. It seeds a repo with:It checks three things:
width/min-widthand ships no fixed width over 390 px;.prose prealready scrolls inside its own box.scrollWidth <= innerWidth, ignoring anything inside anoverflow-xbox. It is skipped here; the forge's check will print its numbers asrepo head 390x844: {...}. If it comes back red, the log shows which element overflows.Checks run:
bun scripts/design-lint.ts,bun scripts/gate.tsandbun x tsc --noEmitare clean. The new test, all the*-fittests andrepo-head-quietpass (736 pass, 14 skipped for no Chromium).Left out
.row-titleand don't widen the page, though I haven't confirmed that in a browser.Closes #9379