Skip to content

Phase 2 polish: 6 design-review fixes (fonts, a11y, tree layout, keywords) - #9

Merged
neuromechanist merged 11 commits into
feature/issue-1-epic-nemar-redesignfrom
feature/issue-3-phase2-design-polish
May 15, 2026
Merged

neuromechanist merged 11 commits into
feature/issue-1-epic-nemar-redesignfrom
feature/issue-3-phase2-design-polish

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

Summary

Post-merge design-review polish on the Phase 2 detail page. Six concrete defects found via /browse extraction + user spot-check, all fixed atomically.

Cut off the just-merged epic branch feature/issue-1-epic-nemar-redesign. Targets back to it; should land before Phase 3 starts.

Findings + commits

Finding Impact What broke Commit
001 HIGH <html> had no font-family → top-layer dialog rendered in Times New Roman 22fc8e4
006 HIGH Neuroschema 0.3.0 keywords are {term, value_uri} objects, rail rendered [object Object] 0527cad
005 HIGH Astro scopes <style> per component; BidsDirChildren lost the flex row layout, so nested directory rows broke into 5 lines (ses-1597766237/, 1 dirs, 5 files, 200 MB each on their own line) 5cfa0c7
002 HIGH DOI badge tap targets: default 36px, copy button 28×28, value link 18px tall 9ecacb7
003 HIGH .prov__btn rendered at 39px tall instead of 44 c5f0167
004 MED .brand header anchor sized to the 36px logo image 0242c88

The user's screenshot caught FINDING-005 + FINDING-006 directly — the nested tree was visibly broken, and keywords were [object Object]. Those two are the biggest visible improvements; the others are touch-target hygiene that mostly matters on mobile and accessibility audits.

Verification

  • bun run typecheck — 0 errors across 46 files
  • bun run test — 69/69 unit tests passing (no test changes needed; all CSS or normalization)
  • Re-captured screenshots in ~/.gstack/projects/nemar-website/designs/design-audit-p2-20260515-1447/screenshots/ for on005262, nm000104, nm000103
  • Tree rows now render on single lines
  • Keyword chips on nm000104 resolve to real MeSH terms with linked value_uri (e.g., Electromyography → https://id.nlm.nih.gov/mesh/D004576)

Notes for Phase 3

  • BidsTree.astro and BidsDirChildren.astro now share row layout CSS in two places. If we touch either, sync the other. A :global() selector or moving tree styles into a global stylesheet would be cleaner; deferred.
  • Sub-44 ORCID icon links and DOI value link pass via the pair-target rule (they're inside larger 44px+ containers). Documented in the audit report.
  • AI-slop score moved B+ → A- by closing the Times New Roman font leak.

Squash-merge this into the epic, then continue to Phase 3 (QA + HED visualization).

…es New Roman fallback

Top-layer elements (dialog) and any element where the cascade from body
breaks were falling back to the UA serif default because <html> itself
had no font-family rule. Setting it on the root fixes it everywhere at
once.

Also adds color-scheme: light dark on the root so the browser draws form
controls and scrollbars in the right theme without per-element overrides.
…3.0 {term} objects

Keywords on the live data.nemar.org/<id>/metadata.json are {term, subject_scheme,
value_uri} objects, not bare strings. The rail was rendering them as
[object Object]. Updated NeuroschemaDataset.keywords to the union type and
DetailRail to normalize both shapes, linking the chip to value_uri when
present so MeSH-coded keywords resolve to nlm.nih.gov.
…levels

Astro scopes <style> per component, so the .tree__row flex layout declared in
BidsTree.astro never reached BidsDirChildren.astro's summary rows. Without
display:flex, the chevron, icon, name, counts, and size each rendered on
their own line — see the captured screenshot showing 'ses-1597766237/ 1 dirs · 5
files 200 MB' broken across multiple lines.

Duplicates the row styles inside BidsDirChildren.astro. Marked with a comment
to keep both in sync if either file changes.
Three changes to push the copy + value link past 44px without re-skinning
the badge:
- Default badge min-block-size 36px -> 44px
- Compact variant min-block-size 28px -> 36px (still smaller, used inside
  the provenance card where space is tight)
- Value link gets display:inline-flex, align-self:stretch, padding-block,
  so the link's hit area fills the badge height rather than wrapping just
  the 18px text
- Copy button bumped from 28x28 to 36x36

Paired-target rule covers the remaining gap: the whole badge reads as one
control because the label, value, and copy button sit on a shared row.
…h 44px

Two small touch-target bumps:
- ProvenanceCard .prov__btn: min-block-size 36 -> 44, removed redundant
  vertical padding so the button is exactly 44px tall instead of 39px.
- Brand component: min-block-size 44 on the anchor wrapper, padding-block
  to keep the logo visually centered without resizing the SVG.

Both now pass WCAG AAA + iOS HIG touch-target rules without changing the
visual chrome.
The earlier commit only included the Brand fix because the
ProvenanceCard edit didn't persist on the first pass. Re-applying the
min-block-size 36 -> 44 + zero vertical padding so the buttons are
exactly 44px tall.
Two findings from the post-PR-9 spot check:

FINDING-007 (HIGH) — README unavailable on on005262 because manifests carry
git-annex content only, not git-tracked files at root. Added a three-stage
README resolution in pages/dataset/[id].astro:
  1. data.nemar.org manifest README* (preferred; version-locked)
  2. GitHub raw README on the dataset repo (HEAD, main, master across
     README.md/README/README.txt/readme.md); SSR-only so no CORS concerns
  3. neuroschema description (last-resort so the section is never blank)
Readme component renders a small banner explaining the source when the
content didn't come from the manifest. Verified live: on005262 now shows
the GitHub README ('ArEEG: Arabic EEG Dataset...') with a 'README from
GitHub repository' banner above it.

FINDING-008 (MED) — Redundant directory icons. Every tree row had both
the rotating chevron SVG and a static unicode '▸' next to the name. Two
arrows pointing right was confusing. Dropped the static icon; the chevron
alone signals expandability, and directory names already carry a trailing
'/' so the file-vs-dir distinction stays.

Also made data-api jsonFetch resilient to 429 (single retry honoring
Retry-After) + 5xx (return null instead of throwing) so the page renders
an empty state when data.nemar.org rate-limits the dev server instead of
blowing up with a 500.
Replaces the abstract electrode-net SVG with the original wireframe brain
illustration from legacy nemar.org (public/hero-brain.png, 368KB),
composited the way the legacy did — but themed for both light and dark.

How it works:
- Same brain.png used in both themes
- Dark mode: mix-blend-mode: screen so the black background drops out and
  the teal wireframe glows. Matches the legacy hero look pixel-for-pixel.
- Light mode: filter: invert + hue-rotate + multiply blend, turning the
  teal-on-black into a dark-navy-on-light outline. Opacity 0.45 keeps it
  readable as a backdrop without competing with the text.
- Sparkles: pure CSS (12 + 9 radial-gradient dots in two stacked layers
  with offset twinkle animations), no particles.js dep. Reduced-motion
  honored — animation drops out, sparkles stay visible static.

Theme variables (--hero-bg-1/--hero-glow/--hero-spark/...) are declared
on .hero with light defaults, overridden in @media + [data-theme=dark].
Stat tiles and search input get matching glass treatments.

Composition matches the legacy reference screenshot in
website/screenshots/01-landing-page.png. Brain on the right, tagline on
the left, sparkles fill, stat tiles below the search.
The brain was absolutely positioned inside .hero (viewport-bound), so on
1920px+ screens the empty margin beside the .container (1200px max) grew
and shoved the brain way past the right edge of the readable content.

Moved the brain layer inside .hero__grid (which inherits .container's
max-width and centering), so it stays paired with the copy column at any
viewport. Reduced inline-size clamp from clamp(560px, 75%, 1100px) to
clamp(480px, 60%, 820px) — the smaller cap reads better when anchored to
content.

Sparkles stay viewport-wide (still in .hero, not .hero__grid) since the
twinkle field should fill the whole atmospheric backdrop.
- Lede rewritten to call out three sources: NEMAR-native datasets,
  OpenNeuro mirrors, and user uploads. Removes the implicit framing that
  every dataset came through OpenNeuro.
- New CTA pair under the search bar: 'Browse datasets' (primary, dark
  pill) and 'Contribute your dataset' (ghost with arrow, points at
  /contribute). The arrow signals 'goes somewhere new' for the upload
  flow that's coming as a separate epic (researcher dashboard).
- Stub /contribute target lands on a follow-up issue and will resolve
  to the upload-flow landing once the dashboard epic ships.

Verified at 1440x900 light + dark.
Old behavior: 'Compute' button opened a single-paragraph 'coming with
Phase 5' dialog that pointed at nemar-cli and the NSG portal without
specifics.

New behavior: button label is 'Compute instructions' (sets expectation —
this gives you what you need to run compute today, not a launch button).
Modal lays out three concrete routes:

1. NSG portal — link with the dataset's S3 prefix prefilled in the copy
2. nemar-cli — copy-pasteable 3-line shell snippet using {datasetId}
3. Just the files — rclone/aria2c/curl against data.nemar.org/{id}/

Below the steps, a styled note: 'Direct compute access is coming soon.
One-click NSG submission from this page is scoped for a follow-up
phase. Tracked on #6.'

Verified the dialog opens with all three steps + the coming-soon note.
@neuromechanist
neuromechanist merged commit 7953145 into feature/issue-1-epic-nemar-redesign May 15, 2026
@neuromechanist
neuromechanist deleted the feature/issue-3-phase2-design-polish branch May 15, 2026 23:09
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.

1 participant