No description
- JavaScript 87.2%
- HTML 8.3%
- CSS 3.1%
- PHP 1.4%
V1 surfaced marriage / partnership date ranges inline; V2 was dropping
the qualifier data when building buckets. Add it back without changing
the bucket shape (so the existing equality-based bucket tests stay
stable):
util/person-relations.js
- export SYMMETRIC_PROPS — predicates whose reciprocal claim lives
under the same predicate on the other item (P26, P451, P3373,
P1038, P3342). Asymmetric predicates (P22 / P25 / P3448 / P40)
need a different reciprocal.
- findClaim(item, prop, targetQid): pure helper that returns the
full claim object (with qualifiers) when the mainsnak target
matches, else null.
- extractTimeQualifiers(claim): returns a {P580, P582, P585} map
containing only the present, well-formed time qualifiers
(novalue / somevalue / missing-time snaks are dropped).
components/person-relations.js
- relationshipDates(prop, qid): try the forward claim on main first
(main.prop = qid), then fall back to the reciprocal claim on the
other item — same predicate for symmetric kinship, P40 for parent
rows, P22/P25/P3448 for child rows.
- formatRelationshipDates: compact display:
"1991-11-25–2001-05-11" both start and end
"since 1991" only start
"until 2001" only end
"1995" only a point in time
"" no time qualifiers
Template renders the result inline next to each linked person,
wrapped so it doesn't break mid-range.
Tests: 14 new assertions for findClaim (target match, no match,
missing prop/item, malformed mainsnak) and extractTimeQualifiers
(each qualifier in isolation, both, P585 point in time, ignoring
non-time qualifiers, empty / null inputs, novalue / missing-time
snaks dropped, first-of-multiple selected). The bucket-shape tests
were left untouched because the bucket return value is unchanged —
qualifier rendering is purely a presentation-layer concern.
|
||
|---|---|---|
| public_html | ||
| tests/v2 | ||
| .gitignore | ||
| CLAUDE.md | ||
| composer.json | ||
| COPYING | ||
| LICENSE | ||
| package.json | ||
