Repository navigation
activity: add the Activity rail to /news/, with a collapsed panel below 1200px - #291
Conversation
…ow 1200px /news/ gets the Activity rail from the round-2 design. At 1200px and wider the news and the rail sit in a 2fr/1fr grid: the rail's tinted panel runs the full height of the news column, and the list inside it sticks 24px under the header when it fits, and otherwise by its bottom edge, 24px above the window's. The inline script keeps the list's height in --rail-h with one ResizeObserver for that rule. While keyboard focus is in the list, it scrolls with the page, so the browser can bring a focused row into view. Below 1200px the same <aside> is a panel above the news, collapsed from first paint under the js class: "Activity · 6 updates in September · latest Sep 27", with "Library releases and lecture updates, from GitHub" under it. - The rail reads site.data.activity_view: the latest 6 rows of each type in week groups, with the All view rendered as the state without JavaScript, through the shared meta, title and summary includes. - A five-button type filter (All, Releases, Lectures, Translations, Books) with a live region, and "View all activity". Below 576px the filter's gaps are 10px, so it fits on one line from 390px. - Four --rail-* custom properties on the aside hold the colours that differ between the panel and the rail. The panel's toggle draws its focus ring inside the button, clear of the second line. - mathjax_ignore on the aside; overflow: clip and scroll-padding-top on this page; a visually hidden "Latest news" heading; on phones, each row's title link stretched over the row. - The intro line under the News h1 goes. README and AGENTS.md say where the rail is and that it follows the js-class pattern. Part of #278. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ Deploy Preview for grand-swan-ca5201 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
It is a large, accessibility- and layout-sensitive change relying on :has(), overflow: clip, and sticky behavior that the author explicitly flagged as untested outside Chrome, with merge-ordering dependencies best confirmed by a human on the preview.
Review effort: Balanced
Findings: None
What changed in this PR
This PR implements the Activity rail on /news/ (Phase 4 of #271, closing #278). At ≥1200px the news posts and an Activity rail sit in a 2fr/1fr grid; below that the same <aside> becomes a collapsed panel above the posts. The rail shows the latest 6 updates grouped by Monday–Sunday weeks with a type filter (All/Releases/Lectures/Translations/Books), a "View all activity" button, and a visually hidden live region. Only the rail's list sticks (by its bottom edge when taller than the viewport), driven by a --rail-h value maintained by a ResizeObserver; it degrades gracefully to a static All view without JavaScript. The rail reuses the existing site.data.activity_view data and the _includes/activity/{meta,title,summary}.html partials, mirroring the /activity/ layout's escaping, mathjax_ignore, and js-class conventions.
Changes:
- Add the Activity rail/panel markup and one inline script to
_layouts/news.html, gated onactivity_view.panel. - Add the rail's styles to
assets/main.scss(responsive grid, panel/rail color tokens, sticky list, focus rings) and extend theoverflow: clipandscroll-padding-top:has()selectors to.activity-rail. - Remove the intro line under the News h1 and update
README.md/AGENTS.mddocs.
| File | Description |
|---|---|
_layouts/news.html |
Adds the rail/panel markup (week groups, filter, toggle, live region) and the inline filter/toggle/sticky-height script; wraps the posts in .news-main with a hidden "Latest news" h2. |
assets/main.scss |
Adds the .activity-rail block (responsive panel↔rail, timeline rows, sticky list keyed on --rail-h), and extends the shared overflow: clip and scroll-padding-top rules to .activity-rail. |
pages/archives.md |
Removes the intro paragraph under the # News heading. |
README.md |
Notes that Activity now also appears beside News on /news/. |
AGENTS.md |
Documents the /news/ rail's filter and panel as following the js-class pattern. |
I reviewed the markup, the inline script, the SCSS, and the docs against the activity_view generator, the /activity/ layout, and the .team-toc sticky precedent. Class names are consistent across markup/CSS/JS, every field is escaped, the panel/rail/in_all/has_all/per_edition data shape matches the generator, the no-JS and no-data paths are handled, and the heading hierarchy and :has()/overflow: clip/scroll-padding-top context follow established patterns. I did not find concrete defects to flag.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Merge after the Activity feed's first live PR has merged (the decision on #278), so the rail doesn't launch showing 'latest Sep 27'.
Three calls for you on the preview
main.scss.What changes
/news/gets the Activity rail from the round-2 design. At 1200px and wider the news and the rail sit in a 2fr/1fr grid (832 + 416px at 1440, 712 + 356px at 1280); below that the same<aside>is a panel between the h1 and the news, collapsed from first paint.--rail-hwith oneResizeObserver; the sticky rule reads it.:has(:focus-visible), one rule). Stuck by its bottom edge, a tall list's top rows can't be scrolled into view, so without this a keyboard user who pages down and then tabs could focus a row that stays off-screen or under the header. Mouse clicks don't match:focus-visible, so nothing moves under the pointer. The cost is small: after a click in a stuck list, the next Tab scrolls the page back to the list's own place.jsclass, which gives the same state./news/gets thescroll-padding-topthat/activity/has,section.inner-pagegetsoverflow: clipon this page so sticky works, and a visually hidden "Latest news" h2 keeps the posts from being filed under "Activity"./news/, and AGENTS.md lists the rail with the other controls that follow thejs-class pattern._layouts/news.html(the markup and one inline script, like/activity/'s),assets/main.scss(one block at the end of the Activity section, plus one selector each on theoverflow: clipandscroll-padding-toprules),pages/archives.md,README.mdandAGENTS.md. No include,main.js,default.htmlor shared Activity rule changes.The panel height, your call
The rail is built full height. With the fixture's data the list fills 16% (All) and 12% (Translations) of the tinted column, which is 3,515px tall at 1440 and 3,640px at 1280, so most of the column is empty tint below "View all activity". The fitted fallback makes the column transparent and moves the tint, border and radius onto the sticky list: three declarations. Please judge at 1280×720 and 1440×900 under All and Translations, and record the choice in #266's Decisions table. To see the fitted version on the preview, paste this into the browser console:
Defaults to review on the preview
/activity/. In the rail they need 318.5px with Roboto (334.3px before it loads) of 356 or 416px..qe-btn--outline-dark, 46px tall), white-filled in the panel.<time>.text-wrap: balancekeeps "latest Sep 27" together on phones./activity/feed.xmldoesn't exist onmain. Publish an Activity RSS feed at /activity/feed.xml #280 adds it.How it was tested
The preview builds this branch from 88beeef, whose
_data/activity/equals #276's fixture, so it shows the fixture's numbers. The exact numbers were also checked on a build withdata_dirset to the fixture, and a hostile synthetic set was built for escaping, MathJax and overflow. Headless Chrome 154 at 320, 360, 375, 390, 414, 576, 768, 1024, 1199, 1200, 1280 and 1440px.mainonly in/news/,README.mdandmain.cssaria-expanded="true")Please look in iOS Safari and Firefox
The testing was Chrome only. Sticky needs
:has()andoverflow: clip(Firefox 121+, Safari 16+; older browsers get a static list), and tabbing through a stuck list should bring each focused row into view. Font metrics decide where titles clamp and whether the filter fits, and VoiceOver should still read the rows and weeks as lists. Chrome reads the week headings in capitals ("SEP 21–27") because oftext-transform: uppercase; worth a listen in VoiceOver.Pre-existing, not changed here
main.jsruns, and its height is measured once..qe-btn'stransition: allanimates focus rings, so the ring on "View all activity" settles after 0.2s.Notes for #279 and #280
_layouts/news.html, and no include changed.--rail-*custom properties on the aside (panel values by default, rail values at 1200px). The panel's box, the rail's column, the timeline, the meta text and the dashed box all read them.bi-rss) after "View all activity" when the feed ships.main.scss.Closes #278.
Part of #271.
🤖 Generated with Claude Code