Raft Design System

Components · Inbox

ActivityInbox

The Activity panel — a list of inbox items with its views and filters, where selecting an item opens it beside the list.

StableAlso called Activity
import { ActivityInbox } from "@botiverse/raft-ui";

ActivityInbox lays out Activity: the panel that lists what happened elsewhere and waits for the person, as InboxItem rows. Selecting an item opens it beside the list. The panel has views (Active, Saved, Done) and filters. Activity has no multi-select today; if it gets one, it uses the toolbar for selected items (SelectionToolbar).

activity/compositions/activity-inbox

When to use

SituationUse
Mentions, approvals, hand-offs and replies the person should seeActivityInbox
The state of the whole serverNotificationCenter
The result of an action the person tookToast

Where a product puts the way into Activity is on the product's own page.

Anatomy

  • ActivityInboxPanel: the panel. It holds a Panel header with the title Activity. Required. It is a column of list cells, so it sets the column's margin to its rows' content line: the title, the controls' first button and the rows' leading content start on one line, 20px in on a phone and a touch screen and 16px in with a mouse (Lists).
  • ActivityInboxSidebar: the column of views and filters on the left, as sidebar rows (Sidebar). Hidden on a phone.
  • ActivityInboxControls: the row above the list, padded by the column's margin: the filters (All, Unread and Mentions) and Mark all read. It has no search field: searching is the job of Search, and a field here would be a second way in. It is the toolbar over a list (Component tokens): 8px above and below its controls on a phone and a touch screen (list-toolbar-air), 49px with the seam under it; on a desktop a 44px row.
  • ActivityInboxViewport: the scrolling list of InboxItem rows.
  • ActivityInboxLoadingMore: one line at the end of the list while more items load.

States

StateUse for
LoadingFlat InboxItemSkeleton rows in the shape of the inbox items, in an InboxItemSkeletonList (InboxItem)
Loading moreActivityInboxLoadingMore under the last item
EmptyAn EmptyState that says what will appear here
activity/compositions/loading-activity
activity/compositions/loading-more-activity
activity/compositions/empty-activity

Behavior

  • Open a selected item beside the list, and mark it active on its row.
  • On a phone, replace the sidebar with one button in the panel header that opens the views and filters.
  • Put Mark all read in the panel header as a small ghost button, when the panel offers it.

Accessibility

  • The parts are plain layout elements; raft-ui adds no Base UI primitive. The views and filters are sidebar rows, and the read filter is Tabs.
  • Give the panel title a heading level (render={<h2 />}).
  • Mark the current view with aria-current="page" and a pressed filter with aria-pressed.
  • Set aria-busy on ActivityInboxPanel while it loads.

API

ActivityInboxPanel

PropTypeDefault
edgePanelEdge
renderAllows you to replace the component's HTML element with a different tag, or compose it with another component.ReactElement | ((props, state) => ReactElement)

Also takes the attributes of its element.

ActivityInboxViewport, ActivityInboxLoadingMore

The list's scroller, a ScrollArea container with absolute gutters: the overlay scrollbar takes no room, so the item cells' fills sit 8px from both edges with or without it (design/patterns/lists.md), and the scroller lays out its own column of items. `ref`, `className` and the native props are the scrolling element's; a frame around it holds the scrollbar.

Takes the attributes of its element.

ActivityInboxSidebar

PropTypeDefault
renderAllows you to replace the component's HTML element with a different tag, or compose it with another component.ReactElement | ((props, state) => ReactElement)

Also takes the attributes of its element.

ActivityInboxControls

Takes the attributes of its element.

Changes

  • 0.101.0 · Breaking ChangesMessageMultiSelectToolbar, MessageMultiSelectToolbarActions, ActivityInboxSelectionToolbar and ActivityInboxSelectionCount are removed ([SelectionToolbar](https://raft-design.botiverse.build/components/selection-toolbar/)). Their props types (MessageMultiSelectToolbarProps, MessageMultiSelectToolbarActionsProps, ActivityInboxSelectionToolbarProps, ActivityInboxSelectionCountProps) go with them. MessageMultiSelect, MessageMultiSelectCheckbox and ActivityInboxControls stay.
  • 0.74.0 · ChangeduseScrollAreaContainer gives its container the overflow: the classes in containerProps.className make the element scroll in the orientation, as ScrollArea's own container does (vertical: overflow-y: auto and overflow-x: hidden; horizontal: the other way round; both: auto), so the element needs no overflow class of its own and nothing for raft-ui/prefer-scroll-area to report. ComposerInput and ActivityInboxViewport no longer carry overflow-y-auto.
  • 0.73.0 · ChangedEvery region that scrolls is a ScrollArea: PanelScrollViewport, ActivityInboxViewport, SearchShellViewport, NotificationCenterScroller, FilesViewport, TasksPanelViewport, ChoiceList's scroller, MobileNavServerPopoverList, ComposerSuggestionList, AnnouncementDialogBody, MessageActionCardScopeListViewport and DialogNav show ScrollArea's overlay scrollbar instead of the platform's. Native scrolling stays only in the places scroll-area.md lists, each with its reason, and a test fails on any other.
  • 0.49.0 · ChangedSidebarItem, InboxItem, SearchEntity/SearchHit rows: list cells, no dividers; their lists (SidebarList, SearchResultsList, ActivityInboxViewport, InboxItemSkeletonList, DialogNav) space rows with gap-0.5 py-2. An app that drew its own row padding or right inset on these rows should remove it.