Skip to content

Needs Attention Panel

NeedsAttentionPanel is the content of the right panel on a list page: sections of one-line items that need someone to act. The Page shell owns the panel chrome. A screen decides what needs attention; it never builds its own section header or row.

Live demo

The sections show a ready list, a list whose items have one or several issue types, an empty one, one still loading and one that failed.

Open RFIs2
Vendors needing action2
Change orders awaiting approval0

No change orders awaiting approval.

Notices going out
Loading…
Safety issues

Could not load safety issues.

Behavior

  • Each section has a heading and a count. The count is left out while the section loads or fails.
  • Each section owns its own state (ready, loading, error, empty), so one list failing never blanks another.
  • A row is a title, a detail line and an optional accessory such as a status badge. Pass as to render it as a router Link or a button; a link or a button gets a hover and a focus ring.
  • An item with several kinds of issue gets a dropdown. Pass issues; with two or more, a native select under the title lists each issue’s label, and picking one swaps only the detail line and the accessory. The link or button target does not change. The select is the link’s sibling, never inside it, so the clickable area is the title block. Zero or one issue shows no dropdown and the row is unchanged; a single issue’s detail and accessory override the item’s own. The first issue is selected unless issueKey (controlled) or defaultIssueKey is set. Issue keys must be unique and labels non-empty; a mistake throws outside production.
  • The section count counts items, not issues.
  • Aggregates only. The panel shows what needs attention across records, not one record’s own data.

Usage

import {
NeedsAttentionPanel,
NeedsAttentionSection,
NeedsAttentionItem,
} from "@beacon/design-system";
<NeedsAttentionPanel>
<NeedsAttentionSection heading="Open RFIs" count={total} state={state} emptyText="No open RFIs.">
{rows.map((r) => (
<NeedsAttentionItem key={r.id} as={Link} to={r.href} title={r.title} detail={r.detail} />
))}
</NeedsAttentionSection>
</NeedsAttentionPanel>

Props

ComponentProps
NeedsAttentionSectionheading, count, state, emptyText, errorText, children.
NeedsAttentionItemtitle, detail, accessory, as, issues, issueKey, defaultIssueKey, onIssueChange, issueLabel (default “Issue type”), plus any prop of the element named by as.
NeedsAttentionIssuekey, label, detail, accessory.

Several issue types

<NeedsAttentionItem
as={Link}
to={vendor.href}
title={vendor.name}
issues={[
{ key: "coi", label: "Insurance expired", detail: "Expired Sep 30", accessory: <StatusBadge tone="danger">Expired</StatusBadge> },
{ key: "w9", label: "W-9 missing", detail: "No W-9 on file" },
]}
onIssueChange={(key) => track(key)}
/>

Adopting the dropdown on a page is a separate story for each page; this component change migrates no page.