Add support for opening a dialog or a popup modal to its part, similar to the view modality when opening a dialog or a popup in a view. Closing the part should hide the dialog or popup. Opening it from a peripheral part should position it in the center of the application.