Skip to content

refactor: consolidate stat-card markup in static analytics template #4923

Description

@frano-m

Part of the triage of #4909 (item 5).

The stat-card markup in the shared static analytics template (analytics/analytics_package/analytics/static_site/template/index.html) is hand-written in three places and has already diverged:

  • the statCard() helper (index.html:472) — tooltip + change row, fui-grid-item-3;
  • an inline copy in renderEventCounts (index.html:573-583) — change row, no tooltip, fui-grid-item-6;
  • the access-requests stats block (index.html:902-921) — no change row, no tooltip, fui-grid-item-4.

Fix

Extend statCard() with a grid-class parameter and an optional change row / tooltip, then use it in all three places.

Depends on the access-requests rework (#4909 items 1–4), which rewrites one of the three copies — do that first.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions