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.
Also 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).
When to use
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
Behavior
- Open a selected item beside the list, and mark it
activeon 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 witharia-pressed. - Set
aria-busyonActivityInboxPanelwhile it loads.
API
ActivityInboxPanel
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
Also takes the attributes of its element.
ActivityInboxControls
Takes the attributes of its element.
Related
Changes
- 0.101.0 · Breaking Changes
MessageMultiSelectToolbar,MessageMultiSelectToolbarActions,ActivityInboxSelectionToolbarandActivityInboxSelectionCountare removed ([SelectionToolbar](https://raft-design.botiverse.build/components/selection-toolbar/)). Their props types (MessageMultiSelectToolbarProps,MessageMultiSelectToolbarActionsProps,ActivityInboxSelectionToolbarProps,ActivityInboxSelectionCountProps) go with them.MessageMultiSelect,MessageMultiSelectCheckboxandActivityInboxControlsstay. - 0.74.0 · ChangeduseScrollAreaContainer gives its container the overflow: the classes in
containerProps.classNamemake the element scroll in theorientation, as ScrollArea's own container does (vertical:overflow-y: autoandoverflow-x: hidden; horizontal: the other way round; both:auto), so the element needs no overflow class of its own and nothing forraft-ui/prefer-scroll-areato report.ComposerInputandActivityInboxViewportno longer carryoverflow-y-auto. - 0.73.0 · ChangedEvery region that scrolls is a ScrollArea:
PanelScrollViewport,ActivityInboxViewport,SearchShellViewport,NotificationCenterScroller,FilesViewport,TasksPanelViewport, ChoiceList's scroller,MobileNavServerPopoverList,ComposerSuggestionList,AnnouncementDialogBody,MessageActionCardScopeListViewportandDialogNavshow 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 withgap-0.5 py-2. An app that drew its own row padding or right inset on these rows should remove it.