Dashboard fixes: staleness, toner, layout
This commit is contained in:
@@ -75,6 +75,20 @@ export function mapLink(card, item) {
|
||||
return missing ? null : href
|
||||
}
|
||||
|
||||
// How many rows a card shows before collapsing the rest behind a count. A card
|
||||
// listing forty PCs is a report someone has to read, not a board someone can
|
||||
// scan - and it pushes every card below it off the screen. Five is enough to
|
||||
// see the shape of the problem; the link goes to the full list.
|
||||
export const MAXROWS = 5
|
||||
|
||||
export function visibleRows(card) {
|
||||
return cardRows(card).slice(0, MAXROWS)
|
||||
}
|
||||
|
||||
export function overflowCount(card) {
|
||||
return Math.max(0, rows(card).length - MAXROWS)
|
||||
}
|
||||
|
||||
export function cardRows(card) {
|
||||
return rows(card).map((item) => ({
|
||||
title: mapTitle(card, item),
|
||||
|
||||
Reference in New Issue
Block a user