Skip to content

[DO NOT MERGE!] Add Open Research Across Disciplines page#736

Open
LukasWallrich wants to merge 19 commits into
mainfrom
disciplines-page
Open

[DO NOT MERGE!] Add Open Research Across Disciplines page#736
LukasWallrich wants to merge 19 commits into
mainfrom
disciplines-page

Conversation

@LukasWallrich

@LukasWallrich LukasWallrich commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a new Open Research Across Disciplines page at /disciplines/, showing open research practices, examples, and resources across 38 disciplines grouped into 11 fields (633 resources total)
  • Data sourced from this Google Sheet via a gws CLI pipeline script (scripts/parse_disciplines_to_json.py)
  • Reuses the clusters page interactive framework (sidebar navigation, search, tab switching, sticky layout, mobile responsive)
  • Resources display color-coded category badges (General, Open Data, Open Methods, Open Outputs, Open Education)
  • Added to the Educational NEXUS navigation menu

Files

  • scripts/parse_disciplines_to_json.py — data pipeline (fetches 3 sheets via gws, generates JSON)
  • data/disciplines.json — generated data file
  • content/disciplines/_index.md — page content with SEO frontmatter
  • layouts/disciplines/single.html — main layout
  • layouts/partials/disciplines/ — 7 partials (all_fields, field_section, sidebar_nav, controls, colors, intro, seo_jsonld)
  • assets/scss/custom.scss — disciplines badge styles
  • config/_default/menus.toml — menu entry
  • layouts/partials/custom_js.html — loads shared JS for disciplines page

Test plan

  • Verify page renders at /disciplines/
  • Check sidebar navigation expands/collapses fields and switches discipline tabs
  • Test search functionality across fields, disciplines, and resources
  • Verify category badges display with correct colors
  • Test mobile responsiveness
  • Refresh data: python3 scripts/parse_disciplines_to_json.py

🤖 Generated with Claude Code

Data-driven page showing open research practices, examples, and resources
across 38 disciplines grouped into 11 fields. Data sourced from Google Sheets
via gws CLI pipeline (scripts/parse_disciplines_to_json.py).

Reuses the clusters page interactive framework (sidebar nav, search, tabs).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@LukasWallrich LukasWallrich requested a review from a team as a code owner April 7, 2026 13:06
@github-actions

github-actions Bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

👍 All image files/references (if any) are in webp format, in line with our policy.

@github-actions

github-actions Bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

📝 Spell Check Results

Found 4 potential spelling issue(s) when checking 17 changed file(s):

📄 static/js/clusters-page.js

Line Issue
87 tabEl ==> table
88 tabEl ==> table
90 tabEl ==> table
92 tabEl ==> table

ℹ️ How to address these issues:

  1. Fix the typo: If it's a genuine typo, please correct it.
  2. Add to whitelist: If it's a valid word (e.g., a name, technical term), add it to .codespell-ignore.txt
  3. False positive: If this is a false positive, please report it in the PR comments.

🤖 This check was performed by codespell

@LukasWallrich LukasWallrich changed the title Add Open Research Across Disciplines page [DO NOT MERGE!] Add Open Research Across Disciplines page Apr 7, 2026
@LukasWallrich

LukasWallrich commented Apr 7, 2026

Copy link
Copy Markdown
Contributor Author

Staging Deployment Status

This PR has been successfully deployed to staging as part of an aggregated deployment.

Deployed at: 2026-07-02 15:06:58 UTC
Staging URL: https://staging.forrt.org

The staging site shows the combined state of all compatible open PRs.

LukasWallrich and others added 3 commits April 7, 2026 14:32
The previous commit had empty (0-byte) files for all templates, content,
data, and script. This happened because `git show stash^3:...` failed
silently during branch switch, overwriting the files with empty output.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update the disciplines workflow with content from the post-hackathon G-Doc
and tooling to keep it reproducible.

- parse_disciplines_gdoc.py: new reusable script to parse the canonical
  .docx (local or via Drive) and optionally rewrite the disciplines
  spreadsheet. One resource per URL even when cells list multiple.
- parse_disciplines_to_json.py: read an optional `Show` column on the
  Fields tab so the page only renders Natural Sciences -> Methodologies.
- export_disciplines_to_md.py: new script to produce an editable
  markdown rendering of the page for editorial review.
- intro.html: drop the "Relevant across multiple disciplines" callout
  now that the cross-cutting field is hidden.
- data/disciplines.json: regenerated from the updated sheet (7 fields,
  40 disciplines, 801 resources).
- .gitignore: exclude scripts/output/.
Covers the source spreadsheet structure, common editing flows, the
re-import from a new G-Doc edition, the Tenzing contributors sheet,
and the most common troubleshooting cases.
LukasWallrich and others added 2 commits May 14, 2026 15:30
Examples cells in the source sheet were rewritten to proper Markdown
(citations and titles become inline links instead of dangling URL-in-parens;
each `Open X:` section becomes a bold paragraph). The template now runs
them through `markdownify`. Also drops the stray "As open as possible..."
quote and adds a `.sc-heading` rule so the discipline title is no longer
larger than the field title above it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@richarddushime

Copy link
Copy Markdown
Contributor
  • the sidebar nav and search are not working as expected

LukasWallrich and others added 10 commits July 1, 2026 17:40
The sheet's Show column hides 4 cross-cutting fields, leaving 7 visible
fields with 40 disciplines - frontmatter still said 38/11 from before
that filter existed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…eholders

- Removed 4 literal "Resources required - please complete the Google
  form..." placeholder rows that were rendering as fake resources on
  Veterinary Science, Leisure/Hospitality and Tourism, Cultural and
  Media Studies, and Architecture/Built Environment.
- Removed 7 exact duplicate resource rows.
- Fixed 2 truncated DOI links (verified against Crossref metadata).
- Reclassified 221 resources with non-standard/empty/multi-value
  categories into the 5 recognised badges, based on what each resource
  actually is rather than the stale label. Original values preserved
  in a new "Category (pre-cleanup backup)" column in the sheet.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Root cause: disciplines' field sections render each discipline as a
Bootstrap tab-pane (clicking the in-content tab labels directly works
fine, confirmed via browser testing). But the shared sidebar sub-link
and inline-search-result click handlers were written for the clusters
page's accordion sections (always in the DOM), so they never activated
the target Bootstrap tab before scrolling - they measured a
`display: none` pane and scrolled to (0,0) instead.

Added activateBootstrapTabIfNeeded(), called from the sidebar
.sc-nav-link handler, the search-hit click handler, and the URL-hash
deep-link handler. It only fires when the resolved target element has
the `tab-pane` class, so clusters' accordion sections (which never
carry that class) take the exact same code path as before - verified
both pages' navigation and search in a real browser.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The search-collection code queried .tab-pane and .sc-heading for
sub-cluster/publication matches - selectors from before the clusters
page moved from Bootstrap tabs to always-visible accordion sections
(.acc-section / .acc-header .acc-label). Neither selector matches
anything in the current markup, so a search term that only appears in
a sub-cluster's name, description, or a plain-reference publication
(not a cluster's own title/stats/description, and not an enriched
.fc-card) silently returned 0 results - verified this returns 0 hits
today on the live page for a phrase that's plainly in a sub-cluster
description.

Broadened the selectors to match both `.acc-section` (clusters) and
`.tab-pane` (disciplines, still Bootstrap tabs) via a shared
getSubclusterPaneHeading() helper, and did the same for the
per-card `.closest()` lookup used for featured-resource hits, which
had the same problem (silently fell back to scrolling at the whole
cluster instead of the specific card).

Also extracted the repeated "expand accordion body if collapsed" block
(previously duplicated between the sidebar-nav and hash-deeplink
handlers) into expandAccordionIfCollapsed(), and reused it in the
search-hit click handler, which is a real user-facing gap this
otherwise leaves: a subcluster/publication search hit would scroll to
a still-collapsed section without opening it.

Verified in a real browser: sub-cluster and publication search hits
now appear and correctly expand + scroll on click.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…ayout

Structurally aligns disciplines with the clusters page it was built to
reuse: field_section.html and sidebar_nav.html now emit the same
.acc-section/.acc-header/.acc-body markup as cluster_section.html,
with stable name-derived slug anchors (f1-chemistry) instead of
index-based ones (f1-d0), matching clusters' slug scheme. Discipline
sections get the same "Expand all" and per-section copy-link controls
clusters has.

This also closes a real gap: the accordion click-to-expand handler
(initAccordion) lived in featured-resources.js, which disciplines
never loaded and which is gated behind cluster-specific
FORRT_FEATURED/FORRT_PUB_CARDS data anyway. Extracted it into
clusters-page.js (already shared by both pages) as
initAccordionToggle(), called unconditionally, and removed the
duplicate from featured-resources.js so clusters doesn't double-bind
the same click handler.

Verified in a real browser on both pages: direct header click,
sidebar-link click, search-result click, "Expand all", and copy-link
all correctly expand/scroll/toggle on disciplines; clusters'
accordion, voting, and reading-list features are unaffected.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Links to the DOI (10.31219/osf.io/3r8hb), verified against Crossref
(matching authors and date) and the live OSF record (matching the
"2026 edition" title exactly - Crossref's cached title lags an edition
behind).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Reuses the same .cite-us-item card styling (and copy-to-clipboard
button) as the site-wide "Cite us" page, so the source attribution
reads consistently with how FORRT presents citations elsewhere.
Moved it after the first intro paragraph so readers get page context
before the citation, rather than leading with it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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