Overview
The CometChatCallLogs component displays a paginated, scrollable list of call history records for the logged-in user. Each call log entry shows the other party’s avatar and name, the call direction (incoming, outgoing, or missed), the call type (audio or video), and the timestamp. Users can initiate new calls directly from the list and view real-time call overlays for outgoing and ongoing calls. The component follows a Service-based Architecture where:- CallLogsService handles call log fetching, pagination, call initiation, call lifecycle listeners, and state management via Angular signals
- Component manages UI rendering, template overrides, and user interactions
- Templates allow extensive customization of all UI sections
Key Features
- Pagination: Automatic infinite-scroll pagination via
CallLogRequestBuilderfrom the CometChat Calls SDK - Call Initiation: Start audio or video calls directly from a call log entry’s trailing button
- Call Overlays: Built-in outgoing call screen and ongoing call screen overlays with automatic lifecycle management
- Template Overrides: Extensive
ng-templateprojection for item, leading, title, subtitle, trailing, loading, empty, and error views - Keyboard Accessibility: Full keyboard navigation with arrow keys, Enter, and Tab support (WCAG 2.1 Level AA compliant)
- Active Call Highlighting: Highlight a specific call log entry via the
activeCallinput - Custom Date Formatting: Configurable call timestamp formatting with
CalendarObjectsupport - Error Handling: Comprehensive error handling with custom error views and
onErrorcallback
Live Preview — default call logs preview.
Open in Storybook ↗
Keyboard Accessibility
CometChatCallLogs is fully keyboard accessible and meets WCAG 2.1 Level AA standards. All functionality can be accessed using only the keyboard.Keyboard Shortcuts
Accessibility Features
ARIA Attributes:role="list"on the paginated list containerrole="listitem"on each call log item viacometchat-list-itemaria-labelwith user name and call type (e.g., “John Doe, Video call”)aria-busyon the list container during loadingaria-live="polite"on loading and status indicatorsrole="button"on the trailing call type icon with descriptivearia-label(e.g., “Audio call John Doe”)role="alert"on the error state viewrole="status"on the empty state view
- Announces call log details (user name and call type) when focused
- Announces loading and error states via live regions
- Semantic HTML structure with proper heading hierarchy
- Visible focus indicators (2px outline) meeting WCAG contrast requirements
focus-visiblestyling on trailing call buttons withoutline-offset- Roving
tabindexon list items for efficient keyboard navigation - Trailing call buttons are independently focusable with
tabindex="0"
- ✅ 2.1.1 Keyboard (Level A) — All functionality available via keyboard
- ✅ 2.1.2 No Keyboard Trap (Level A) — Users can navigate away using keyboard
- ✅ 2.4.3 Focus Order (Level A) — Logical focus order through list items and call buttons
- ✅ 2.4.7 Focus Visible (Level AA) — Visible focus indicators on all interactive elements
- ✅ 4.1.2 Name, Role, Value (Level A) — Proper ARIA attributes on all elements
- Shimmer loading animations are disabled when
prefers-reduced-motion: reduceis active
Basic Usage
Simple Implementation
With Call Button Handler
callButtonClicked has no observers, clicking the trailing call button automatically initiates a call of the same type (audio/video) to the other party. When a handler is bound, the call log is emitted to the handler instead, giving you full control over call initiation.
Properties
Template Properties
Events
Advanced Usage
Custom CallLogRequestBuilder
Use thecallLogRequestBuilder input to customize how call logs are fetched. The builder comes from CometChatCalls (the Calls SDK), not the core Chat SDK:
CallLogRequestBuilder Methods
Custom Date Formatting
Override the default call timestamp format usingcallInitiatedDateTimeFormat:
Handling Call Button Events
By default, clicking the trailing call button automatically initiates a call of the same type (audio/video) to the other party. BindcallButtonClicked to override this behavior:
Active Call Highlighting
Highlight a specific call log entry by passing it to theactiveCall input:
Custom Call Settings
Override the defaultCallSettingsBuilder used in the ongoing call overlay when a call is initiated from the call logs:
Customization with Templates
Custom Subtitle View
Customize the subtitle section to show additional call details:Custom Trailing View
Replace the default call button with custom action buttons:Custom Empty and Error States
Provide custom views for empty and error states:Styling with CSS Variables
The CometChatCallLogs component uses CSS variables for comprehensive theming:Dark Theme Example
Custom Brand Colors
Error Handling
Built-in Error Handling
The component includes comprehensive error handling through theonError callback and built-in error state view:
Error Flow
Errors are handled at two levels:- Service level:
CallLogsServicecatches errors during fetch and call initiation, wraps them inCometChat.CometChatException, and forwards to theonErrorcallback - Component level: The component catches errors in event handlers and delegates to the same error handling pipeline
errorView template).
For troubleshooting tips, see the Troubleshooting Guide.
Related Components
- CometChatOutgoingCall: Outgoing call overlay displayed when a call is initiated from the call logs
- CometChatOngoingCall: Ongoing call screen displayed when an outgoing call is accepted
- CometChatCallButtons: Standalone call buttons component for initiating audio/video calls
- CometChatAvatar: Avatar component used in call log items
- CometChatListItem: List item component used for rendering each call log entry
- CometChatDate: Date component used for formatting call timestamps
- CometChatPaginatedList: Paginated list component providing infinite scroll
Technical Details
- Standalone Component: Can be imported and used independently
- Change Detection: Uses
OnPushstrategy for optimal performance - Service Architecture:
CallLogsServicehandles all business logic (fetching, pagination, call initiation, call lifecycle) - Signal-based State: Uses Angular signals for reactive state management
- Pagination: Automatic infinite scroll via
CometChatPaginatedListwith intersection observers - Call Lifecycle: Manages outgoing call → accepted → ongoing call → ended flow with overlays
- Accessibility: WCAG 2.1 Level AA compliant with full keyboard navigation
- BEM CSS: Follows Block Element Modifier naming convention
- Reduced Motion: Respects
prefers-reduced-motionmedia query for shimmer animations