Skip to content

Add corpus card components for DraCor and sibling projects#65

Merged
cmil merged 4 commits into
mainfrom
corpus-card
Jul 5, 2026
Merged

Add corpus card components for DraCor and sibling projects#65
cmil merged 4 commits into
mainfrom
corpus-card

Conversation

@cmil

@cmil cmil commented Jul 5, 2026

Copy link
Copy Markdown
Member
  • Adds a new DraCor-branded CorpusCard for use in the (upcoming) dracor-frontend migration off Bootstrap. Exposed as DracorCorpusCard from @dracor/react.
  • Adds a generic composition-based CorpusCard (+ CorpusCardRow primitive) intended as the shared base for eltec-frontend and ecocor-frontend, both of which currently ship near-duplicate local implementations. Numeric values auto-format via toLocaleString; an optional popoverContent turns a row's value into a native popover trigger (using useId, no nanoid dependency needed). "Git commit" and "last update" rows render automatically when the corresponding props are set.

cmil added 3 commits July 5, 2026 11:04
Ports the dracor-frontend CorpusCard to Tailwind CSS + TypeScript.
Reuses the existing Commit component and uses TanStack Router's
Link for navigation via a consumer-supplied `to` prop.

The font-sizes are slightly larger than in dracor-frontend because there
Bootstrap sets `:root { font-size: 0.85rem }` making its effective base 13.6px,
while Tailwind leaves the root at the browser default of 16px. I will leave it like
this for now. When actually migrating dracor-front to use dracor-react
components we could decide to either adjust the base font size or stick with
the new default.
Introduces a composition-based CorpusCard with a CorpusCardRow primitive
so eltec-frontend and ecocor-frontend can drop their near-duplicate
local implementations. Values passed as numbers are auto-formatted via
toLocaleString; an optional popoverContent turns a row's value into a
native popover trigger (using useId, no nanoid dep needed). Built-in
"Git commit" and "last update" rows render when the corresponding
props are set.
@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.58%. Comparing base (3c7156f) to head (2de2b47).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #65      +/-   ##
==========================================
+ Coverage   94.09%   94.58%   +0.48%     
==========================================
  Files          31       33       +2     
  Lines         288      314      +26     
  Branches       85      101      +16     
==========================================
+ Hits          271      297      +26     
  Misses          4        4              
  Partials       13       13              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cmil cmil changed the title Add corpus card component for DraCor and sibling projects Add corpus card components for DraCor and sibling projects Jul 5, 2026
@cmil cmil merged commit 19ff008 into main Jul 5, 2026
5 checks passed
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