Skip to content

Scroll every breaking story, not just the newest - #107

Merged
ssavutu merged 1 commit into
mainfrom
feat/multiple-breaking-stories
Sep 3, 2026
Merged

Scroll every breaking story, not just the newest#107
ssavutu merged 1 commit into
mainfrom
feat/multiple-breaking-stories

Conversation

@ssavutu

@ssavutu ssavutu commented Sep 3, 2026

Copy link
Copy Markdown
Member

The public half of DrexelTriangle/triangle-cms#230. The CMS can now raise
several breaking stories and pin several to the top of the homepage; this makes
that visible.

Banner

Reads breaking_news.items and scrolls all of them:

BREAKING NEWS: Academy closes after inspection • BREAKING NEWS: DragonFly launches on campus • …

The marquee loops by translating the strip from -50% to 0, which is seamless
only while its two halves are identical, so the strip is one half rendered
twice. Three slots per half fills a wide screen with one story; more stories
take fewer repeats to cover the same width, which keeps the wait for any one
headline to come back around roughly constant. One story still renders six
copies, exactly as before.

Links

One overlay cannot serve several stories, so each headline links itself and the
marquee pauses on :hover / :focus-within. A link that slides out from under
the cursor is what the overlay was avoiding; stopping it under the pointer
avoids the same thing while still reaching story 2. A single story keeps the
overlay, which is a bigger and steadier target than the text.

Deploy order does not matter

A CMS that predates items sends only text / article_slug, and
index.astro falls back to that pair. Either repo can ship first without an
empty red band in between.

Second pinned story

Section-3-6-3 now passes breaking to the two cards in column 1. The second
pin lands in that slot, and without the kicker it read as an ordinary story
sitting next to a breaking one.

Verified by measurement, not by reading classes

Stub CMS + astro dev + headless Chromium over CDP:

two stories one story (legacy payload)
banner height 48px 48px
animation running, paused on hover same
elementFromPoint at band centre that story's <a href="/article/academy"> the overlay anchor
anchors in strip / overlays 8 / 0 0 / 1

Plus npm run lint, npm run check (0 errors), and npm run build.

🤖 Generated with Claude Code

https://claude.ai/code/session_01L4qBhBdQto1yNp1zP7VLYc

The CMS can raise more than one now (triangle-cms#230), and the banner was
built for exactly one: six copies of a single headline, with one still
overlay linking the whole band to its article.

Read `items` and scroll all of them. The marquee loops by translating the
strip from -50% to 0, which is seamless only while its two halves are
identical, so the strip is built as one half rendered twice. Three slots
per half fills a wide screen with one story; more stories take fewer
repeats to cover the same width, which keeps the wait for any one headline
to come back around roughly constant as stories are added. One story still
renders six copies, exactly as before.

Links had to change with it. One overlay cannot serve several stories, so
each headline links itself and the marquee pauses on hover and
focus-within: a link that slides out from under the cursor is the problem
the overlay was avoiding, and stopping it under the pointer avoids the same
thing while still reaching every story. A single story keeps the overlay,
which is a bigger and steadier target than the text.

A CMS that predates `items` sends only `text`/`article_slug`, so index.astro
falls back to that pair. The two repos deploy independently and an empty red
band during the gap is the failure worth avoiding.

Also pass `breaking` to the two cards in column 1 of the 3-6-3 block. The
second pinned story lands in that slot, and without the kicker it read as an
ordinary story sitting beside a breaking one.

Measured in headless Chromium over CDP rather than reasoned from classes:
banner box still 48px, animation running then `paused` under the cursor, and
`elementFromPoint` at the band's centre returns the story's own anchor with
8 anchors and no overlay for two stories, and the overlay with no strip
anchors for one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L4qBhBdQto1yNp1zP7VLYc
@ssavutu
ssavutu merged commit 96597d1 into main Sep 3, 2026
1 check passed
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