There are scenarios where it's possible to get a LOT of persistent notifications if you're not careful with an automation. For example, you add a new RSS feed to the feedreader integration and it pulls in every feed item and notifies you. Or even the "Motion Detected" notification example on the demo site.
Dismissing dozens of these notifications one by one is extremely tedious. So how about a "Dismiss All" button either at the top or bottom, that you could press to quickly get rid of them all? Other platforms like iOS and Android have this feature and it comes in handy for managing notifications. Could make this only show up when there's >2 notifications or something.

Yes, and auto-hide the foldout window if all are dismissed....
This is all good for the example given here (test notifications).
But let's say you have 20 of them, of those 1 is important.
You did not see it before clicking "dismiss all" and now you never will.
So uuuh you want a list of previously dismissed notifications? Like a trashcan?
No, not at all.
I think the dismiss all with confirmation is ok?
I disagree. Confirmations are just more annoying for this. Example. Android Notifications have a clear all with no confirmations and no way to see dismissed notifications
Even android thinks there is a need for a history ;) https://www.android.com/android-11/ -> Usability Enhancements -> Notification history
IMO the risk of accidentally dismissing everything is extremely low. The button is clearly labeled and positioned away from everything else, there's little chance of a misclick. I agree with Zack that it'd just be slightly more annoying. iOS and macOS don't have a confirmation when clearing all either.
Though either way is fine tbh. Whether it's one click or two clicks (dismiss all + confirmation prompt) they're both significantly nicer than clicking dismiss 20 times :)
I'm working on a PR for this for Hacktoberfest.
I'm planning to put the _Dismiss All_ button at the end of the notifications list, so at least the user had to scroll through all notifications and had a chance of skimming them all/avoid missing important ones.
Also submitted a PR for the related WTH issue:
https://community.home-assistant.io/t/wth-doesnt-the-notifications-panel-close-after-i-dismiss-the-last-item/227639 (14 votes)
Most helpful comment
Yes, and auto-hide the foldout window if all are dismissed....