Skip to content

Review-cleanup sweep: vendor d3, PaCMAP relabel, footer, data tables, markers, discussions dark mode#150

Merged
realmarcin merged 1 commit into
mainfrom
chore/review-cleanup
Jul 5, 2026
Merged

Review-cleanup sweep: vendor d3, PaCMAP relabel, footer, data tables, markers, discussions dark mode#150
realmarcin merged 1 commit into
mainfrom
chore/review-cleanup

Conversation

@realmarcin

Copy link
Copy Markdown
Contributor

Stacks on feat/dark-mode-toggle (do not merge before that branch). Additive dataviz/artifact-design review cleanup — light and dark themes both preserved. Templates edited + pages regenerated via just gen-pages (477/477 traits).

Changes

  • R1 — Vendor d3 (drop CDN): added pages/d3.v7.min.js (v7.9.0, byte-identical to the shared CommunityMech copy). Pointed umap.html, graph.html, and trait.html script src at {{ root }}d3.v7.min.js. No d3js.org refs remain (355 trait/scatter pages now load the local file).
  • R2 — PaCMAP relabel: index.html embedding card body "Interactive UMAP" → "Interactive PaCMAP" (umap.html header already said PaCMAP; data keys umap_x/umap_y and file names left unchanged).
  • R4 — Footer: fixed base.html's stale footer (4 → 5 Mechs incl. ProteinTraitsMech; METPO w3id → BioPortal) to match index.html; rendered the current Mech (TraitMech) as plain <span> text (no self-link) in both base.html and index.html.
  • R5 — Data-table fallback: keyboard-reachable <details> "View data as table" + Download-CSV link directly below the plot on umap.html and graph.html, built from the same points the scatter renders (label, CURIE, category, x, y), theme-tokenized.
  • R6 — Marker size: scatter radius r=4r=5 in umap.html and graph.html.
  • Discussions dark mode: app/discussions/index.html gets a vendored theme-toggle.js, a dark palette (OS default + data-theme override), and a reduced-motion block.

Preserves the HREF_BY_ID click-through fix already on the base branch.

Verification

  • grep d3js.org over src/ + pages/: 0 code refs remain.
  • User-facing "UMAP" left where projection is PaCMAP: 0.
  • Footer TraitMech self-link: 0 (plain <span> everywhere).
  • <details>/table + r=5 present on both scatter pages.
  • Light + dark token blocks untouched (additive edits only).

🤖 Generated with Claude Code

…les, marker size, discussions dark mode

Stacks on feat/dark-mode-toggle. Additive dataviz/artifact-design cleanup;
light and dark themes both preserved. Templates + regenerated pages (477/477).

- R1 Vendor d3 locally (drop d3js.org CDN): add pages/d3.v7.min.js (v7.9.0,
  byte-identical to the shared copy); point umap.html, graph.html, and
  trait.html script src at {{ root }}d3.v7.min.js. No CDN refs remain.
- R2 PaCMAP relabel: index.html embedding card body "Interactive UMAP" ->
  "Interactive PaCMAP" (umap.html header already said PaCMAP).
- R4 Footer: fix base.html stale footer (4 -> 5 Mechs incl. ProteinTraitsMech;
  METPO w3id -> BioPortal) to match index.html; render current Mech (TraitMech)
  as plain <span> text in both base.html and index.html (no self-link).
- R5 Data-table fallback: keyboard-reachable <details> "View data as table" +
  Download CSV below the plot on umap.html and graph.html, built from the same
  points the scatter renders (label, CURIE, category, x, y), theme-tokenized.
- R6 Marker size: scatter radius r=4 -> r=5 in umap.html and graph.html.
- Dark + toggle for app/discussions/index.html: vendored theme-toggle.js,
  dark palette (OS default + data-theme override), reduced-motion block.

Preserves the HREF_BY_ID click-through fix on the base branch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 4, 2026 22:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

@realmarcin

Copy link
Copy Markdown
Contributor Author

Reviewed the PR's own diff (base feat/dark-mode-toggle): base.html, index.html, trait.html, umap.html, graph.html, style.css, discussions.

Clean — no blocking issues. All claims verified:

  • Vendored d3 at pages/d3.v7.min.js (v7.9.0); {{ root }}d3.v7.min.js resolves correctly at every depth (rendered trait pages → ../../d3.v7.min.js, umap/graph → d3.v7.min.js). No d3js.org <script src> refs remain in rendered pages (only the vendored file's own header comment matches).
  • Footer now 5 Mechs incl. ProteinTraitsMech, METPO → BioPortal, TraitMech as plain <span> (no self-link) — base.html matches index.html. The proteintraitsmech lowercase URL is correct (repo is lowercase; lowercase Pages URL returns 200, CamelCase 404).
  • Data table: builds from the same points; label/CURIE/category/x/y with HTML-escaped cells, linked labels via HREF_BY_ID, and a data-URI CSV with proper RFC-4180 quoting. r=5 markers on both plots. PaCMAP relabel on the index card.
  • Render consistent: 477/477 trait pages, r=5 and vendored d3 present in rendered umap/graph.

Minor, non-blocking (out of stated scope): trait.html's causal-graph section still loads dagre from cdn.jsdelivr.net, so those pages retain one CDN dependency even though d3 is now local. Fine for this PR (scope was d3), but worth a follow-up if the goal is fully offline pages.

@realmarcin realmarcin changed the base branch from feat/dark-mode-toggle to main July 5, 2026 07:26
@realmarcin realmarcin merged commit 050896b into main Jul 5, 2026
1 check passed
@realmarcin realmarcin deleted the chore/review-cleanup branch July 5, 2026 07:26
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.

2 participants