AuditLogList
The log as a list: newest first, as given. For the PR mock's brand page "Recent activity" pass compact and dot={false}.
import { AuditLogList } from '@ergasti/bricks';Examples
Audit log
Who did what and when, with a tone dot and the area it touched; compact is the short form for a side card.
Code
import { AuditLogList, Card } from '@ergasti/bricks';
import { auditEntries } from './pr';
function Log() {
return (
<div style={{ display: 'grid', gap: 16 }}>
<Card><AuditLogList label="Recent activity" entries={auditEntries} /></Card>
<Card><AuditLogList label="Recent activity" entries={auditEntries.slice(0, 2)} compact /></Card>
</div>
);
}One entry and the area pill
Code
import { AuditAreaPill, AuditLogEntry } from '@ergasti/bricks';
import { auditEntries } from './pr';
function Single() {
return (
<div style={{ display: 'grid', gap: 12 }}>
<AuditLogEntry entry={auditEntries[0]} />
<div style={{ display: 'flex', gap: 8 }}>{(['approvals', 'programs', 'owners'] as const).map((area) => <AuditAreaPill key={area} area={area} />)}</div>
</div>
);
}No activity yet
The list draws only its entries; with none, show PrEmpty in its place. compact on a single AuditLogEntry is the short side-card form.
Code
import { AuditLogEntry, AuditLogList, Card, PrEmpty } from '@ergasti/bricks';
import { auditEntries } from './pr';
function Empty() {
const entries: typeof auditEntries = [];
return (
<div style={{ display: 'grid', gap: 16 }}>
<Card>{entries.length ? <AuditLogList label="Recent activity" entries={entries} /> : <PrEmpty title="No activity yet" text="Approvals, edits and payouts show up here as they happen." icon="log" tone="sky" />}</Card>
<Card><AuditLogEntry entry={auditEntries[1]} compact /></Card>
</div>
);
}Without the dot
dot={false} drops the coloured dot so the text starts at the card's edge; with compact the rows take plain 6px padding and the time sits right under the text (the PR brand page's "Recent activity" side card). Keep the dot (default true) on the full Activity log, where the colour helps scan outcomes. Default on the left, no dot on the right.
Code
import { AuditLogList, Card } from '@ergasti/bricks';
import { auditEntries } from './pr';
function NoDot() {
return (
<div style={{ display: 'grid', gap: 16, gridTemplateColumns: 'repeat(auto-fit, minmax(280px, 1fr))' }}>
<Card><AuditLogList label="Recent activity, with dots" entries={auditEntries.slice(0, 3)} compact /></Card>
<Card><AuditLogList label="Recent activity" entries={auditEntries.slice(0, 3)} compact dot={false} /></Card>
</div>
);
}One entry without the dot
AuditLogEntry takes dot too, for a single line in a card of its own.
Code
import { AuditLogEntry, Card } from '@ergasti/bricks';
import { auditEntries } from './pr';
function SingleNoDot() {
return (
<Card>
<ul className="kit-pr-log" aria-label="Last change">
<AuditLogEntry entry={auditEntries[1]} compact dot={false} />
</ul>
</Card>
);
}Props
Prop
Type
Design guidance
How the BRICKS design system uses AuditLogList. Written in docs/content/components/AuditLogList.md; the props above are read from the code, which wins where the two disagree.
The PR audit log as a list: entries newest first, each with an outcome dot, what happened and why, the area, who and when; use it on the Activity log page and, compact, in a brand's "Recent activity" card.
It is the PR mock's log (.logi rows). It draws only the entries you give, in order; with none, show PrEmpty in its place. For a sortable, filterable table of the same entries, use DataTable with auditColumns.
Anatomy
- List (
<ul class="kit-pr-log" aria-label>). - Entries:
AuditLogEntryeach (dot, text, detail, area pill, actor, time).
Variants
| Props | Look | Use when |
|---|---|---|
| default | Full rows with area, actor and time | Activity log page. |
compact | Short rows, time under the text | A side card. |
compact + dot={false} | Plain 6px rows, no dot | Brand page "Recent activity" (the mock). |
States
| State | How |
|---|---|
| Entries | entries. |
| Empty | entries=[] renders an empty list; render PrEmpty instead. |
Usage
// PR Portal › Brand detail › Recent activity
<Card>
<Card.Header title="Recent activity" />
<AuditLogList label="Recent activity" entries={log.slice(0, 3)} compact dot={false} />
</Card>// Activity log with an empty state
<Card>
{entries.length
? <AuditLogList label="Activity log" entries={entries} />
: <PrEmpty title="No activity yet" text="Approvals, edits and payouts show up here as they happen." icon="log" tone="sky" />}
</Card>Where it appears
- PR Portal › Activity log. Screen: PR · Activity log.
- PR Portal › Brand detail › "Recent activity" (compact, no dot). Screen: PR · Brand.
- PR Portal › Tiers › manual changes with reasons. Screen: PR · Tiers.
Guidelines
Do
- Keep the dot on the full log (colour helps scan outcomes); drop it in compact side cards.
- Show 3–5 entries in a side card with a link to the full log.
Don't
- Don't sort client-side; pass entries newest first.
- Don't use it for creator-facing activity; use
ActivityLog(blocks).
RTL and Arabic
- Rows mirror; pass Arabic sentences built with isolated Latin brand names.
Tokens
See AuditLogEntry; --line between rows.
Accessibility
- A
<ul>named bylabel("Activity log", "Recent activity"); each entry is an<li>, so screen readers announce the count and allow item-by-item navigation. - Each entry reads in order: the sentence (bold names stay in the flow), the detail, then (full form) the area word, the actor's name and the time. The outcome dot is
aria-hidden; the sentence must say the outcome ("rejected", "approved"). - The time is a
<time dir="auto">with your preformatted text and nodatetimeattribute; write it in words a listener understands ("Today · 10:12"). - With
entries=[]it renders an empty labelled list ("list, 0 items"); renderPrEmptyinstead so the empty state is said in words. - There is no live region: entries added while the page is open are not announced. Refreshing the list is silent by design; announce important new events through the app's toast region.
Found in the source
- ARIA attributes set:
aria-hidden,aria-label.
Read from the component's source and tests. See Accessibility for the patterns the library follows.
Related
AuditLogEntry,AuditAreaPill.auditColumns+DataTable: the table form.PrEmpty: the empty state.
See also: Avatar · Pill · useBricks · useLanguage · Card
Source
src/pr/AuditLog.tsx (line 77) on GitHub.