mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-05-22 14:03:46 -05:00
[PR #1537] [MERGED] fix(tinytorch/site): site-wide dark-mode coverage + framework version chip #9201
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/harvard-edge/cs249r_book/pull/1537
Author: @profvjreddi
Created: 4/25/2026
Status: ✅ Merged
Merged: 4/25/2026
Merged by: @profvjreddi
Base:
dev← Head:fix/tinytorch-tito-dark-mode📝 Commits (3)
4c2996efix(tinytorch/ux): restore dark-mode contrast on tito/milestones page2707c05fix(tinytorch/ux): site-wide dark-mode coverage for sidebar + inline-fill panels72d2163feat(tinytorch/site): persistent framework version chip in sidebar📊 Changes
3 files changed (+173 additions, -23 deletions)
View changed files
📝
tinytorch/quarto/assets/scripts/sidebar-subtitle.html(+70 -8)📝
tinytorch/quarto/assets/styles/dark-mode.scss(+84 -0)📝
tinytorch/quarto/tito/milestones.qmd(+19 -15)📄 Description
Summary
Three commits on this branch addressing the dark-mode follow-ups from #1529 and adding a persistent framework version indicator. Site-only change — no Python package code touched, no version bump, no PyPI release.
4c2996e0dtito/milestones.qmdinline-style panels to.who-card/.callout-note(follows the pattern #1529 established forpreface.qmd)2707c0546.who-cardborder72d2163a7Why
After #1529 fixed
preface.qmd, three structural gaps remained on every other TinyTorch site page:dark-mode.scssdeclared\$sidebar-bg-darkbut never applied it to a selector. White sidebar on every page..qmdfiles (`background: #f8f9fa` etc. beats class specificity).config/announcement.ymlheader).How
tito/milestones.qmd) following the #1529 pattern — establishes the pattern, reduces inline styles 14 → 10 (the 10 remaining are intentional mode-invariant accents).dark-mode.scss—[style*=\"background: #X\"]attribute selectors for the 14 light-fill hex values used inline across the corpus, plus 8 dark-grey text colors. Catches every page in dark mode without touching individual.qmdfiles. `!important` is required because inlinestyle=beats class specificity.#D4740Clight /#F59E0Bdark) below the existing subtitle, prefixed with `🔥 TinyTorch` so it cannot be mis-read as the textbook's version. Clicks open GitHub Releases filtered for `tinytorch` tags. Source: hardcoded with aTINYTORCH_VERSION_CHIPsed marker for future bumps.Verification (Playwright, full-page screenshots, computed-style assertions)
indexbig-picturetito/milestonestito/overviewtito/troubleshootingSidebar version chip verified on
index+tito/milestones:color: rgb(212, 116, 12)=#D4740C✓color: rgb(245, 158, 11)=#F59E0B✓href=https://github.com/harvard-edge/cs249r_book/releases?q=tinytorch✓target=\"_blank\" rel=\"noopener\"✓🔥 TinyTorchprefix)Deployment
Site-only deploy via existing
tinytorch-publish-liveworkflow withsite_only: true— skips version bump, tag, PDF build, GitHub release. Just renders Quarto and pushes togh-pages/tinytorch/.Known follow-ups (deferred, not blocking)
tito/overview/data/modules/troubleshooting.qmd(~140 inline styles total) — code-cleanliness improvement, safety net mitigates user-visible bug now.\$accentSCSS cascade question from #1529 — static analysis suggests it's fine; render-time verification deferred.sidebar-subtitle.htmlto the publish workflow'sUPDATE_VERSIONstep's sed list so the chip auto-bumps withsettings.inion each future release.Test plan
quarto rendersucceeds across rendered pages (index, big-picture, tito/milestones, tito/overview, tito/troubleshooting)tinytorch-publish-livewithsite_only: trueto deploy🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.