You're working on something important and need to focus? Use the fullscreen-mode of your programs (usually by pressing F11).
Now #Gnome hides usual notifications, while ones that are flagged as "critical", like a battery warning, still show up.
This helps you to focus on your work. After finishing your work you can leave the full screen mode and see all the notifications in the message tray.
Hint: You can switch between multiple windows in fullscreen-mode.