Card refinements

This commit is contained in:
2026-08-11 15:58:15 -04:00
parent 793dfab5c8
commit 721828b5cb
9 changed files with 134 additions and 38 deletions

View File

@@ -43,6 +43,14 @@ export function mapDetail(card, item) {
return key ? item[key] : ''
}
// The untruncated text behind a shortened detail. Same rule as elsewhere: the
// tooltip explains, it never carries the only copy of something essential.
export function mapDetailTip(card, item) {
const key = card.map && card.map.detailtooltip
const full = key ? (item[key] || '') : ''
return full && full !== mapDetail(card, item) ? full : ''
}
export function mapMeta(card, item) {
const meta = (card.map && card.map.meta) || []
return meta
@@ -115,6 +123,7 @@ export function cardRows(card) {
title: mapTitle(card, item),
titletip: mapTitleTip(card, item),
detail: mapDetail(card, item),
detailtip: mapDetailTip(card, item),
meta: mapMeta(card, item),
chips: mapChips(card, item),
link: mapLink(card, item),