Repository navigation
Phase 1: Foundation + Discover page - #7
Merged
neuromechanist merged 5 commits intoMay 15, 2026
Merged
neuromechanist merged 5 commits into
neuromechanist merged 5 commits into
Conversation
- design tokens (colors, type, spacing, radii) with light/dark via prefers-color-scheme + manual override persisted to localStorage - Base.astro layout with inline FOUC-prevention bootstrap, preconnect to api/data.nemar.org - Brand component using the legacy NEMAR logo SVG (text + brain + electrodes) extracted from the Joomla home - Nav with sticky header, primary links, theme toggle, login modal stub - Footer with funding line and section nav - placeholder hero on / pointing to /discover Part of #2.
- typed api client for api.nemar.org/datasets list + get - DatasetQuery / SortOption / ModalityCode types - filter state library: URL serialize/deserialize, modality AND/OR, reserved-keyword auto-flip (EEG/MEG/iEEG/EMG/HED), client-side multi-modality + participant-range filtering - format helpers: bytes, count, date, relative time, modality split - vitest coverage: 22 filter tests + 15 format tests, all green Part of #2.
- Hero (/): gradient orb, two-line search input, three stat tiles (datasets/participants/total size) populated from api.nemar.org with graceful legacy-figure fallback when the API is unreachable - Discover (/discover): SSR fetch with server-side search + sort + single- modality filter, client-side multi-modality AND/OR and participant range, URL-bound state via filterStateFromURL/toURL - DatasetCard with modality badges, BIDS-aware ID/title pair, facts table (participants, size, version, updated), OpenNeuro cross-link - FilterSidebar with chip selector, AND/OR pill, range inputs, soon-pills on Phase-3 toggles (has-QA, has-10-20) - Pagination with ellipses, focusable nav links - Stub pages: /about /support /community /citation-dashboard /docs /404 - Renders ≥10 cards from live api.nemar.org/datasets; typecheck clean across 26 files Part of #2.
DatasetCard: when participants/file_size/version/updated are null or 0, omit the corresponding fact instead of rendering '—' placeholders. With the OpenNeuro catalog imports returning sparse metadata, the old layout made every card look broken (four dashes in a row). Also pull the OpenNeuro source link out of the body into a footer band so the card has a clear two-zone layout (content + provenance), and constrain the external-link arrow SVG to 12x12. The reset.css 'display: block; max-width: 100%' on svg was letting the icon stretch to 126x126 because the scoped logical-property width on .ds-card__ext didn't apply to the SVG's intrinsic size — fixed by adding explicit width/height attributes and switching CSS to physical width/height. FINDING-001 (HIGH), FINDING-002 (HIGH)
Contributor
Author
Design review (run on local preview)Ran Headline: Design score C → B, AI-slop score C- → B+ after 7 fixes. Findings fixed (commit 8eb0c3c)
Findings deferred to Phase 2
Goodwill scoreStarted at 70/100. Cards-look-broken drained 10. After fixes, finished at 81/100 (healthy). AI Slop blacklist sweep11 of 11 anti-patterns clean. The one Verification:
|
This was referenced May 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 1 of #1. Stands up the Astro on Cloudflare Pages site, defines the design system, ships the landing hero and the Discover page wired to the live
api.nemar.org/datasetsendpoint.Closes #2.
What landed
output: \"server\", biome lint/format, vitest unit tests, playwright e2e harness, wrangler config (nemar-website, env vars forPUBLIC_API_BASE_URL/PUBLIC_DATA_BASE_URL)src/styles/tokens.css): brand navy/teal/purple, semantic neutrals, type scale (Rubik display + Inter body + JetBrains Mono code), spacing, radii, shadows. Light + dark themes viaprefers-color-scheme+ manual override persisted to localStorage. FOUC-prevention inline boot script inBase.astro.src/layouts/Base.astro) with stickyNav.astro(Login dialog stub),Footer.astro(funding line + section nav),ThemeToggle.astro,Brand.astro(legacy NEMAR logo SVG inlined as a static asset withcurrentColortheming)src/lib/api.ts) forlistDatasets/getDatasetagainstapi.nemar.org; CORS already open for*.nemar.org(verified innemar-cli/backend/src/index.ts:42-65)src/lib/filters.ts): URL serialize/deserialize, modality AND/OR, reserved-keyword auto-flip (EEG/MEG/iEEG/EMG/HED), single-modality server-side + multi-modality client-side, participant range. Mirrors the legacydataexplorer.jsAND/OR semanticssrc/lib/format.ts): bytes, count, date, relative time, modality normalization (handles BIDS-aware casing foriEEG,fMRI,ECoG)/): gradient hero with brand-colored orb, search input, three stat tiles (Datasets / Participants / Total size) sourced fromapi.nemar.org/datasetswith graceful legacy-figure fallback when the API is down/discover): server-rendered, filter sidebar + dataset cards + pagination; URL-bound state means filter combinations are bookmarkable/about,/support,/community,/citation-dashboard,/docs,/404— each cross-links to its Phase-N issue so users see where the redesign is goingTests
bun run test— 37 tests acrossfilters.test.tsandformat.test.ts, all greenbun run typecheck— 0 errors across 26 filesbun run dev— both/and/discoverrender against liveapi.nemar.org(verified by/browsescreenshots, see images inscreenshots/peer/new-*.pngonce deployed)Test plan
/discover?modality=EEG&modality_op=ORnarrows results/discover?q=motortriggers searchOut of scope (intentional)
has_qa/has_1020filter toggles are rendered disabled with a "Phase 3" pill until the API exposes those flagsFollow-ups before merge
nemar-websiteCloudflare Pages project (bunx wrangler pages project create nemar-website --production-branch main)PUBLIC_API_BASE_URL/PUBLIC_DATA_BASE_URL(set tohttps://api.nemar.org/https://data.nemar.org)/design-reviewagainst the preview URL once it's up — design choices in this PR are functional but deserve a polish pass before Phase 2 builds on top