as it’s been pointed out elsewhere, it’s possible to add a listener for the
"uxpcommand" and then check the event’s
commandId. At the moment both
"uxphidepanel" can be found.
It turns out that listening directly on the
"uxpshowpanel" works too, but not with
"uxphidepanel". Regardless of the present situation, what’s to be expected in the future as the way to go:
"uxp*panel", maybe both?