activity: add the Latest activity strip under the home page's news cards - #292
Conversation
Show the three newest Activity rows (site.data.activity_view.strip) under the home page's news cards, each row one link: to the release, the live site or, for a merged row, its day on /activity/. The strip is written inline in _layouts/home.html with the shared Activity includes (meta.html and title.html), inside mathjax_ignore, with every field escaped. Without data there is no strip. Below 1200px it is a stacked list with 44px rows. From 1200px it is one line: each row gets an equal share of it, capped at its content width, and a row's minimum is its icon, date, tag and one letter of its title. So only titles are cut, and a translation's language or a group's label always shows whole. The news cards' dates now read "Jul 17, 2026", as on /news/, and "View all news" goes full width below 768px. README's News and Activity section adds the home page to where Activity appears. Part of #279. 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
Correctness rests on responsive CSS behavior (-webkit-line-clamp, max-content flex sizing) that the author explicitly asks be verified visually in iOS Safari and Firefox, which automated review cannot confirm.
Review effort: Balanced
Findings: None
What changed in this PR
This PR adds a compact "Latest activity" strip beneath the home page's three "Latest News" cards, fulfilling decision c1 from #266 and the amendment in #279. The strip renders the three newest rows from the build-time site.data.activity_view.strip, each as a single link, inside a mathjax_ignore wrapper with every field HTML-escaped. It is a stacked list below 1200px and a single capped-width flex line from 1200px, with a "View all activity →" link; it renders nothing when there is no Activity data. The change also modernizes the news-card date format and makes "View all news" full-width on small screens.
Changes:
- Add the inline "Latest activity" strip markup to
_layouts/home.html, reusing the shared activity includes withtag=falseand rendering the tag separately. - Add
.activity-strip*styles toassets/main.scss(stacked below 1200px, one line from 1200px), placed after.featuredto stay clear of #278's rail styles. - Switch the news-card date to
%b %-d, %Y(matching/news/) and make "View all news" full-width below 768px; document the home-page Activity placement inREADME.md.
| File | Description |
|---|---|
_layouts/home.html |
Adds the escaped, mathjax_ignore-wrapped strip built from activity/meta.html/activity/title.html; updates the card date format and the "View all news" button width. |
assets/main.scss |
Adds responsive .activity-strip styles with a stacked mobile layout and a content-capped single-line desktop layout, plus focus-visible ring. |
README.md |
Notes that Activity's three newest rows now also appear on the home page. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
What changes
The home page's "Latest News" section gets a compact "Latest activity" strip under its three cards, as decided in #266 (option c1) and amended on #279.
<h3>"Latest activity", the view's three newest rows (site.data.activity_view.strip), each row one link, and "View all activity →" to/activity/. A row links to its release, its live site or, for an editions row or a release group, its day on/activity/(/activity/#activity-2026-08-03)._layouts/home.html(it's used once), built from the sharedactivity/meta.html(withtag=false) andactivity/title.html, insidemathjax_ignore, with every field escaped, attributes included. No JavaScript. With no Activity data, no strip shows.%b %-d, %Y), as on/news/. Only the format changes: each card keeps its day.d-block d-md-inline-block), and keeps its 46px height and 24px top margin.Files:
_layouts/home.html(+28 −3),assets/main.scss(+151, one block after.featured),README.md(one line).Defaults to review
flex: 1 1 0; max-width: max-content), so short titles show whole and a long one takes the rest. The title can wrap anywhere and is clamped to one line, so it is the only part of a row that shrinks. With today's rows at 1200–1399px, the long title reads "Intermediate Quantitative Eco…" (29 of 47 characters; the handoff's equal shares gave 23), and QuantEcon.py v0.12.0 and GameTheory.jl v0.7.2 show whole. From 1400px everything shows whole. The alternative, sizing in proportion to content (flex: 0 1 auto), would show 38 characters of that title but cut both release versions to "v0…".#666). The stacked strip, the rail and the log show tags the same way. The handoff's one-line drawing had "(French)", in bold as part of the title.bi-bookand the visually hidden type word "Book update:", which the view already provides, like every other row. This reads the decision's "the label" as that type word. A visible "· Book update" tag would be a small change.#eef4fb, with#dbe8f5lines); from 1200px it is the light one-line strip (#f8f9fc). Its top margin is 24px at every width, to match the gap between the cards; the handoff's phone drawing has 16px. "View all news" keeps its 24px top margin (the handoff has 20px below 768px).titleattribute on the title itself, not on the link, so screen readers don't hear them a second time as the link's description.#174867and underlined, in both layouts. The date and tag keep their colour.<time>element is added..featuredrules, not in the Activity section, to stay clear of Add the Activity rail and mobile panel to /news/ #278's rail styles.How it was tested, and on which data
The preview builds this branch, cut from 88beeef, so until main is merged in it shows the frozen rows (Sep 27, 24 and 23). Use it to judge the layout. The three expected rows were checked on a build of #276's frozen data (a config overlay with
data_dir: .github/scripts/fixtures). Everything below was measured in headless Chrome 154.2026-08-02-software.ymlplus the four Aug 3 entries of2026-08-09-lectures.yml: its strip is the Aug 3 lecture row, "· 3 editions" and "· 4 releases · same day". P2 is P1 without the Aug 3 lecture entry and with the Simplified Chinese entry re-dated to Aug 4: "· Simplified Chinese", "· 2 editions" and "· 4 releases · same day". In both, at every width, every tag and date lies inside its row and is one line high, the strip is one line and 48px tall, and nothing scrolls sideways.#0072bcon#eef4fb("View all activity →" below 1200px); on the one line the lowest is 4.83:1, and the date, tag and label are 5.45:1.2px solid #0072bcring at a 2px offset, at 1440, 1200 and 390px. From 1200px the links are 19.6px tall and 41px apart, within WCAG 2.5.8's spacing exception./activity/, below the header and the sponsor bar, at 1440 and 390px.",&,<b>and$5 to $10, with the URL query?a=1&b="2", comes out escaped in the text, thehrefand thetitleattribute, and MathJax typesets nothing in the strip. A control copy withoutmathjax_ignoretypesets it ("5to10"). The book row showsbi-bookand "Book update:".?v=stamps, the feed's lastBuildDate and the sitemap's lastmod masked: onlyindex.html,README.mdandmain.css(with its map) change.--baseat the merge base,test-check-activity-data.rb(38 runs, 0 failures),test-activity.rb(51 runs, 0 failures) andJEKYLL_ENV=production bundle exec jekyll build, with no new warnings.When to merge
After the Activity feed's first live PR has merged on main (the go-live of QuantEcon/reports-activity#91), as decided on #279, so the strip never launches on the frozen rows.
Please look in iOS Safari and Firefox
The one-line layout rests on a one-line
-webkit-line-clampwithword-break: break-all, onmax-width: max-contenton the rows, and on how flex items size to their content. It was measured in Chrome only. In a browser that ignoresmax-content, the rows fall back to the handoff's equal shares. Please also check the stacked strip at 390px.Pre-existing, not changed here
.row.gx-5and the footer.Notes for #278
.featured, away from the Activity section..activity-meta__icon's colour is scoped per view (under.activity-logon/activity/, and under.activity-strip__linkhere). If Add the Activity rail and mobile panel to /news/ #278 adds a shared rule, the strip's copy becomes redundant.Closes #279.
Part of #271.
🤖 Generated with Claude Code