ui/components/NotificationCenter/README.md
Bulk operations in the Notification Center allow users to perform actions like deleting multiple notifications or changing the status of multiple notifications in a batch. This documentation outlines the key features and functionality of bulk operations, including the restriction of performing only one bulk operation at a time, the disabling of buttons during ongoing operations, and the display of a loading icon to indicate ongoing activity.
To maintain system stability and prevent conflicts, the Notification Center enforces a rule that allows users to initiate only one bulk operation at a time. This means that if a bulk operation is already in progress, any attempt to start another operation will be blocked until the ongoing operation is completed or canceled.
When a bulk operation is initiated, such as deleting or changing the status of notifications, all relevant action buttons are automatically disabled. This prevents users from accidentally triggering additional operations that might interfere with the ongoing one. Disabled buttons ensure the user's actions are synchronized with the current state of notifications.
While a bulk operation is in progress, a loading icon is displayed to provide feedback to the user. This visual indicator assures users that their request is being processed, and it also reinforces the idea that actions cannot be performed until the operation completes or is canceled.
Users select the notifications they want to include in the bulk operation. This is typically done by checking checkboxes next to each notification.
After selecting notifications, users trigger the desired bulk operation (e.g., delete or change status) by clicking the corresponding action button.
Once initiated, the bulk operation begins processing the selected notifications.
To ensure a seamless user experience with bulk operations in the Notification Center, consider the following best practices:
Provide clear and concise messaging to inform users about the progress and outcome of the bulk operation.
Implement error handling to gracefully handle any issues that may arise during the operation and communicate errors to the user.
Consider offering a confirmation dialog before initiating a bulk operation to prevent accidental actions.
When an event is received from the server, it adheres to a fixed schema containing information that is valuable for presentation to the user. This information typically includes details such as the description, date, userID, systemID, action, and actedUpon resources. Additionally, sometimes there may be a detailed traceback, a summary, or a comprehensive error log, all of which are dynamically generated data encapsulated within the metadata of the event. Presenting this structured data in a user-friendly manner is a crucial task because it contains valuable insights into ongoing operations.
Here's a refactored and enhanced version of your documentation with improved clarity, structure, and readability:
This component serves as the entry point for formatting events. It provides the logic for mapping custom formatters to different event types and properties, ensuring consistent and dynamic formatting.
Formatting follows a structured hierarchy to determine the most appropriate transformation for event data:
Custom Event Formatter
Custom Property Formatter
id, data, doc, description).error or trace to ensure structured formatting.description, error).Both event-based and property-based formatters can recursively utilize the Dynamic Formatter, allowing for structured and consistent data transformation across nested properties.
While this system was initially developed for our events and notification center, the components it comprises are highly reusable and can be employed in other contexts where dynamic formatting of structured data is required.