Skip to content

fix: give the landing columns one shared height - #394

Merged
neuromechanist merged 5 commits into
stagingfrom
fix/landing-equal-columns
Sep 30, 2026
Merged

neuromechanist merged 5 commits into
stagingfrom
fix/landing-equal-columns

Conversation

@neuromechanist

@neuromechanist neuromechanist commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Refs #392 and #393 (neither closes automatically: the PR merges into staging, not the default branch).

What

  1. The three landing columns share one height (Landing highlights: give the three columns one shared height #392). The news, most cited and latest datasets columns were sized by item count: each list showed a fixed five rows, while the news column (banner, lead, two briefs) ran about 650 px, so the columns ended at different heights and the three links at the bottom sat at three different positions. Now, side by side (720 px and up), they share one grid row, the two lists take the height they are given and show as many whole rows as fit, and the links are pinned to the bottom so they line up.
  2. The footer links the observability dashboard (Footer: link the observability dashboard under Explore #393). "Observability" under Explore, after Citations, as an ExternalLink (new tab, rel="noopener noreferrer external", "opens in a new tab") to https://dashboard.nemar.org/observability/, which is public and answers 200.

How the height works (Highlights.astro, index.astro)

  • The columns already sit in one grid row, so they already stretch to the tallest one (the news column unless it is short). The lists used to add their own length to that; now they do not.
  • Side by side, each list is a column-wrap flex container with flex: 1 1 0 (its basis is zero, so its length does not make the column taller), a minimum of 26rem (five of the taller "latest" rows, so a short or missing news column still leaves the lists a body), and overflow: clip. It fills the height the row gives it, and rows with no room wrap into a second flex column outside its right edge and are clipped, so a row is shown whole or not at all.
  • .col__more gets margin-block-start: auto, pinning each column's link to the bottom.
  • Stacked on a phone (under 720 px) there is no row to share: each list keeps the first five, as before.
  • index.astro fetches up to 10 rows per list (HIGHLIGHT_ROWS; 12 catalog rows for "latest" before the ds* pointers are filtered out). No extra requests; the newest-datasets response is about 9 KB larger (about 27 KB instead of 18 KB).
  • Clipped rows are still in the DOM, so a small script (with the pure, tested helper src/lib/highlight-fit.ts) marks them inert: out of the tab order and the accessibility tree. It watches the list and its rows with a ResizeObserver, and works in either text direction. Without script the layout is the same; only a keyboard user could tab to an unseen link. (Issue Landing highlights: give the three columns one shared height #392 said CSS only; the script is the one addition, for that accessibility reason.)
  • The keyboard focus ring is drawn inside the rows (outline-offset: -2px), because the list's clipping would cut a ring drawn outside them.
  • Datasets tied on citations are ordered by id, so which of several tied datasets shows does not depend on catalog order (rows 7 to 9 of the live card are all at 99).

Review

One Sonnet review round, verdict GO, run against the branch in Chrome, Firefox and WebKit (the Safari engine): the wrap trick works identically in all three (within 1 px), lists never scroll or grow, and the variants (no news, one list, no banner, large root font) all keep the columns equal. Its findings, all fixed: the focus ring was clipped by the list (important); the minimum was 22rem, which gave the latest list four rows on a tablet instead of five (now 26rem); the clipped-row test only worked left to right; the observer only watched the list, not the rows; the ordered list lacked role="list" (the unordered one had it); ties in the ranking; guard tests that depended on exact whitespace; and survivors of its mutation run (list or rows no longer observed, the clipped test inverted, latestDatasets(…, 5), the newest limit back to 8), which now fail. A small follow-up of mine: rows hidden by display: none on a phone are no longer flagged inert.

Measured (production data, Chrome, same-origin iframes per width, after the fixes)

Width Layout Result
1440 three columns all 659 px; links on one line; 8 cited and 6 latest rows shown
1024 three columns all 624 px; links on one line
900, 720 news on top, lists side by side the two lists equal height (534 and 555 px); links aligned; latest shows 5 rows
390 stacked unchanged: five rows per list, nothing flagged inert

The reviewer measured the same layout in Firefox and WebKit (for example 1100 px at 641 px and 1024 px at 627 px, within a few pixels of Chrome, from font differences).

Tested

  • bun run lint, bun run typecheck (0 errors), bun run test (2691 passed, 118 files).
  • Source guards for the layout (test/highlights-layout.test.ts, tolerant of formatting) and the footer (test/footer-explore-links.test.ts), unit tests for the clipped-row helper and the tie-break; mutations of each fail a test.
  • After promotion: on nemar.org the three links line up at desktop and tablet widths, and the footer shows Observability under Explore.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Deploying nemar-website with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1a53708
Status: ✅  Deploy successful!
Preview URL: https://1823b777.nemar-website.pages.dev
Branch Preview URL: https://fix-landing-equal-columns.nemar-website.pages.dev

View logs

@neuromechanist
neuromechanist merged commit 845e270 into staging Sep 30, 2026
5 checks passed
@neuromechanist
neuromechanist deleted the fix/landing-equal-columns branch September 30, 2026 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant