Fiori Busy Dialog – when is it opened and closed
Recently in order to analyze one performance issue on my responsible CRM Fiori application, I was asked to research the behavior of the Flower-like animation as displayed below. Every time you click a tile to navigate to a Fiori application from launchpad, you will see this animation.
Have you even considered when it appears in UI and when vanishes?
1. When it appears in UI
According to callstack, the Flower-like animation, technically speaking, the BusyDialog will be opened every time there is change on url, which you could observe in address bar in your browser. This animation is implemented via in /sap/bc/ui5_ui5/ui2/ushell/resources/sap/m/BusyDialog.js
2. How is the Flower animation rendered
The entry point of rendering logic is in line 2019 below in file: /sap/bc/ui5_ui5/ui2/ushell/resources/sap/ui/core/Popup.js.
And here is the Flower rendering logic:
From here we know that the Flower we see in UI actually consists of FIVE ( why five? see line 97 below 🙂 ) different div tag with well-prepared CSS class.
3. When the Flower vanishes
There is a call in shell controller which will check whether the Flower busy dialog is still opened. If so, just put the close operation into the event queue with 0.3 second’s delay. It does not mean that the busy dialog will be closed after exactly 0.3 seconds due to JavaScript single thread execution pattern.
Also in the end of UI navigation, the UI framework will also attempt to close busy dialog if any.
4. Small experiment
Change the default 300 to 30000 in the following file in Chrome development tool:
/sap/bc/ui5_ui5/ui2/ushell/resources/sap/ushell/ui/launchpad/LoadingDialog.js
It means when you click any tile in Launchpad, you will see the Flower animation for totally 30 seconds before the application could be available to use.
See this video for effect: https://github.com/i042416/jerryslide/blob/master/video/flower%20effect.wmv
And here some practical use of it
Let that flower bloom for you (Using Fiori loading dialog in custom application)
Hi Maksim,
your blog is awesome 🙂
Best regards,
Jerry
Nice one Jerry 🙂