Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion ui/shared/NotificationList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,21 @@ class NotificationList extends React.Component {
}

render() {
const { notifications, clearNotification } = this.props;
const { notifications, clearNotification, clearAllNotifications } = this.props;

return (
<ul id="notification-box" className="list-unstyled">
{notifications.length > 0 && (
<li>
<Button
onClick={() => clearAllNotifications()}
className="clear-all-notifications w-100 mb-1"
size="sm"
>
Clear all notifications
</Button>
Comment on lines +34 to +40

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functionality is all right
That blue background stands out too much imo, this styling is used for tags.
I would go for maybe variant="darker-info", it looks better on jobs view, it overlaps with Table view and Add test data buttons in graphs view, I'm not sure. What do you think?
Or something that is not that bright in color and is similar with the other buttons in Perfherder.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could add a keyboard shortcut for this

@davidmiculit davidmiculit Jul 10, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that it could look better, but the overlapping will still be present as long as any notifications are on screen(even without the clear all button), so that can't be helped

</li>
)}
{notifications.map((notification, idx) => (
<li key={notification.created}>
<Alert variant={notification.severity}>
Expand Down Expand Up @@ -73,6 +84,7 @@ NotificationList.propTypes = {
}),
).isRequired,
clearNotification: PropTypes.func.isRequired,
clearAllNotifications: PropTypes.func.isRequired,
};

export default NotificationList;
4 changes: 4 additions & 0 deletions ui/shared/Notifications.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ const Notifications = () => {
const clearNotification = useNotificationStore(
(state) => state.clearNotification,
);
const clearAllNotifications = useNotificationStore(
(state) => state.clearAllOnScreenNotifications,
);

return (
<NotificationList
notifications={notifications}
clearNotification={clearNotification}
clearAllNotifications={clearAllNotifications}
/>
);
};
Expand Down