Skip to content

Lyndsay's User Guide Implementation#813

Draft
SeanDuHare wants to merge 9 commits into
AllenInstitute:mainfrom
lynwilhelm:user-guide
Draft

Lyndsay's User Guide Implementation#813
SeanDuHare wants to merge 9 commits into
AllenInstitute:mainfrom
lynwilhelm:user-guide

Conversation

@SeanDuHare
Copy link
Copy Markdown
Contributor

@SeanDuHare SeanDuHare commented May 21, 2026

This is a large PR. Sean will be reviewing all of the content. Everything else I am requesting review on, but only after Sean please:)...sorry this is a learning experience and work in progress!!! THX!!!

User Guide Purpose
Adds a full in-app User Guide to BioFile Finder, accessible at /user-guide. The guide covers what BFF is, feature highlights, real-world use cases, getting started instructions, and supplementary resources.

Rationale
Users — particularly those new to BFF — lacked a discoverable, structured reference for how to use the app. External documentation (READMEs, wikis) is easily missed and hard to keep in sync with the app. Embedding the guide in the app ensures it travels with every deployment and can link directly to live data views.

Architectural decisions
Data-driven content
Page content is defined as structured data (content/*.tsx) rather than as routed page components. This keeps the rendering logic (DocPage.tsx) simple and consistent — one component handles all pages — and makes it easy to add or edit content without touching any component code.

Content split by nav section
The content directory is split into one file per nav section (about.tsx, getting-started.tsx, etc.) so that editing a single page only touches a focused, manageable file. All sections are merged in content/index.ts.

CSS Module + ug- convention*
Component-level styles use CSS Modules as the rest of the app does. Content styles (images, scroll tables, icons) use :global(.ug-*) classes scoped inside .sectionBody — necessary because content files are data, not components, and cannot import CSS modules directly. This is documented in DocPage.module.css. Extracting these into small wrapper components is a noted follow-up.

Routing
The guide uses React Router's /:sectionSlug/:pageSlug pattern, matching the two-level hierarchy of the sidebar nav. Unknown routes redirect to the overview page.

Other Notes

  • ug-* global classes vs CSS Modules — content-in-data-files can't import CSS modules. The current approach works and is scoped, but is inconsistent with the rest of the app. A follow-up PR will extract ScrollTable and FeatureGrid wrapper components to fully align.
  • PAGE_CONTENT and NAV are parallel structures — adding a new page requires an entry in both. There is no compile-time enforcement of this. A comment in content/index.ts documents the expectation.
  • Heading sizes scoped to User Guide — H2 and H3 sizes in the User Guide differ from the global design system defaults. These are scoped to .root in DocPage.module.css with a TODO to revisit when the design system heading sizes are updated globally.
  • Screenshots of the filter panel, file list, grouping hierarchy, sharing URL, and thumbnail grid are included in content/assets/ and rendered inline on the Feature Highlights page.
  • Passed all unit tests

Optimized for:

  • readability
  • scalability
  • accessibility
  • reviewability
  • consistency with existing patterns
  • low cognitive overhead for future engineers

Avoided:

  • unnecessary abstraction
  • cleverness
  • duplicated logic
  • oversized components
  • tightly coupled state
  • giant PRs
  • one-off styling patterns

Testing performed

  • Manually tested all pages and nav links at localhost:9001/user-guide
  • Verified mobile nav opens, closes on backdrop click and Escape key
  • Verified prev/next pagination across all pages
  • Verified horizontal scroll on comparison tables
  • TypeScript compiles with no errors (tsc --noEmit)
  • 562 core tests passing (npm run test:core)
  • 52 web tests passing (npm run test:web)
  • Known follow-ups
  • Replace href="#" placeholder links with real URLs (dataset examples, publication links, video links)
  • Extract ScrollTable and FeatureGrid as proper CSS Module components
  • Wire headings in nav.ts to an in-page anchor TOC in the sidebar (data is already structured for this)

lynwilhelm and others added 9 commits May 20, 2026 11:55
Adds a new User Guide section to the BFF web app including sidebar navigation, multi-page doc layout, and all initial content covering app overview, specifications, real-world use cases, getting started, metadata guidance, provenance, and storage options.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add Feature highlights page with 8 sections
- Merge BFF comparison table into 'What makes BFF unique' section
- Add 2x2 feature card grid with responsive stacking below 769px
- Add flag icons to all placeholder links
- Comment out unpublished links (Nature Methods, social video, ISAS publication)
- Replace AMBIOM at ISAS lorem ipsum with content coming soon
- Update all page intros to use 'BioFile Finder (BFF)' on first mention
- Remove Learn nav link and page
- Remove How BFF works section (redundant)
- Add code generation placeholder section

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add screenshots: querying-filters, querying-results, grouping-panel,
  grouping-hierarchy, sharing-url, thumbnails
- Restructure content: move rows/columns/required/optional sections to
  'Creating a dataset'; trim 'Metadata guidance' to recommendations,
  column descriptions, and provenance
- Reinstate BFF comparison table as its own nav section
- Restructure storage options into H2/H3 hierarchy
- Remove annotations and serverless sections from Feature highlights
- Rename 'Solution using BFF' headings to 'How BFF helps'
- Fix Vol-E spelling throughout
- Update global.css H2/H3 sizes and weights
- Fix web tsconfig.json (was empty, causing TS errors)
- Table styling: restore scroll shadow, add min-width for scrollable tables,
  font size updates across User Guide CSS
- Add PNG module declaration to custom.d.ts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Split content.tsx (2579 lines) into per-section files under content/
- Extract PageSection and PageContent into content/types.ts
- Replace React.createElement heading pattern with typed HeadingTag variable
- Move inline styles to CSS classes (ug-image, ug-icon-sm, ug-icon-md, ug-feature-grid--wide)
- Add Escape key handler to mobile menu for accessibility
- Add tabIndex and aria-label to scrollable tables for keyboard accessibility
- Add TODO comments in place of commented-out JSX blocks
- Remove leftover empty intro: '' fields now that field is optional
- Revert global.css h2/h3 changes; scope heading sizes to User Guide via DocPage.module.css
- Document ug-* global class convention in DocPage.module.css
- Document headings field intent in nav.ts
- All 562 core and 52 web tests passing

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