From 499bba129c842c00c1a28d85bc044ab609aee44e Mon Sep 17 00:00:00 2001 From: Joe Mou Date: Mon, 21 Sep 2026 17:55:06 -0400 Subject: Add discussions Discussions are served from GitHub's older server-rendered HTML, with no embeddedData JSON to read, so the scraper walks the DOM the way the pull request and wiki code does. A discussion's timeline opens with its own post and continues with its comments, each carrying its replies nested inside it, which is where the recursion in _discussionComment.eta comes from. Categories, upvotes, and the answer a Q&A discussion is marked with all come along. Only what GitHub renders up front is shown: neither the next page of discussions nor the replies it hides behind a "Show N previous replies" button are fetched, so a comment says how many replies it is missing. Co-Authored-By: Claude Opus 5 --- public/static/style.css | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) (limited to 'public/static') diff --git a/public/static/style.css b/public/static/style.css index ad61fca..e9b43ed 100644 --- a/public/static/style.css +++ b/public/static/style.css @@ -27,6 +27,11 @@ oklch(60% 0.15 250) ); + --success-color: light-dark( + oklch(45% 0.15 150), + oklch(70% 0.15 150) + ); + --pl-c: light-dark(#6e7781, #8b949e); --pl-c1: light-dark(#0550ae, #79c0ff); --pl-e: light-dark(#6639ba, #d2a8ff); @@ -310,7 +315,17 @@ pre.box { } } -.overview, .release, .wiki { +.pill { + margin-left: .2rem; + padding: 0 .4rem; + border: 1px solid var(--border-color); + border-radius: 1rem; + font-size: .8rem; + font-weight: normal; + white-space: nowrap; +} + +.overview, .release, .wiki, .comment { overflow-wrap: break-word; /* This is a bit convoluted: we want the effect of padding but using margins @@ -354,7 +369,7 @@ pre.box { font-weight: bold; } -.release > header, .wiki > header { +.release > header, .wiki > header, .comment > header { display: flex; align-items: baseline; > :first-child { @@ -385,6 +400,23 @@ pre.box { font-size: .8rem; } +.answered { + color: var(--success-color); +} + +.comment.answer { + outline: 2px solid var(--success-color); + outline-offset: -1px; +} + +.box:has(+ .reply) { + margin-bottom: 0; +} + +.reply { + margin-top: -1px; +} + .commit { display: flex; justify-content: space-between; -- cgit v1.3.1