feat: capture bodies from every feed, rename to Read More, anchor the button - #6
Merged
Conversation
… button Most feeds already ship far more than the card showed, and the pipeline was reading it and throwing it away. The Tech Community boards and CISA put the whole post in <summary> (up to 52k characters), and the Microsoft blogs put it in <content:encoded> (up to 62k), which was never read at all. Bodies are now captured from content:encoded where present, falling back to the summary, so Read More works on 100 of 150 articles rather than the 12 Message Center posts. MSRC, NCSC and Azure updates still get no button: their feeds carry barely more than a headline, and MIN_BODY_LENGTH keeps the button off anything that would open to the same text the card already shows. Capped at 2500 characters, which takes feeds.json from 205 KB to 431 KB. Message Center keeps a 6000 cap because it is the only source whose link does not work for a reader, so anything cut there is unreachable rather than one click away. The button now reads Read More everywhere, including Message Center. It is also anchored to the bottom left of every card. Cards in a grid row already stretch to equal height, so making the card a column flexbox and giving the button margin-top:auto lands every button on the same baseline instead of floating wherever the summary happened to end. align-self keeps it left rather than stretched, and the summary carries an explicit margin so a full card still keeps the text clear of the button. Bodies remain plain text and links keep their scheme check at both ends. Verified under jsdom against the real files: 19 checks, including the button text, that it is the card's last child, the three layout rules that produce the anchoring, and the existing hostile-markup and javascript: URL cases.
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three changes: bodies for every source, the button renamed, and the button pinned to the bottom left of the card.
Bodies from every feed
Answering the question behind this: nothing else had a Read More button because RSS articles carried no body field at all, not because a body was being truncated. The 300 character cap applies to
summary, which is a different field.Which turned out to be a missed opportunity, because the pipeline was already reading far more than it kept:
Bodies now come from
content:encodedwhere the feed populates it, falling back to the summary.Result: 100 of 150 articles get a Read More button, up from 12.
The three zeroes are correct:
MIN_BODY_LENGTHkeeps the button off anything whose feed carries barely more than a headline, so Read More never opens to the same text the card already shows.Size
feeds.jsongoes from 205 KB to 431 KB at a 2500 character cap, roughly 470 KB once Message Center is included. Acceptable in one file for now; if it becomes uncomfortable the next step is splitting bodies into a second JSON the dialog fetches lazily on expand.Message Center keeps a 6000 cap, because it is the only source whose link does not work for a reader. Anything cut there is unreachable, whereas every RSS article keeps a working link to its full text.
Read More
Renamed everywhere, including Message Center, per the request.
Button anchoring
The buttons floated at different heights because the card was a plain block, so the button sat wherever the summary happened to end.
Cards in a grid row already stretch to equal height, so the fix is to make the card a column flexbox and give the button
margin-top: auto. That eats the leftover space and lands every button on the same baseline.align-self: flex-startkeeps it bottom left rather than stretched to the card width, and.article-summarygets an explicitmargin-bottomso a full card (whereautoresolves to zero) still keeps the text clear of the button.Verification
Bodies stay plain text and links keep their scheme check at both ends, unchanged from the previous PR.
jsdom against the real
index.html,app.jsandstyles.css, 19 checks passing. New ones:jsdom does not do layout, so the three layout assertions check the CSS rules that produce the anchoring rather than the rendered geometry. Worth an eyeball on the deployed site.