UI can be made to run in embedded mode with a simple tweak to its URL path.
There are two ways of achieving it.
Append "/embed" right before "userview" in your UI URL path to switch it to embedded mode OR
Add request parameter "embed=true" to the end of your UI URL path.
Figure 1: Normal UI view
Figure 2: Embedded UI mode view (Append "/embed")
Figure 3: Embedded UI mode view (Add request parameter "embed=true")