Skip to Content
Author's profile photo Jerry Wang

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?

/wp-content/uploads/2015/06/clipboard1_732222.png

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

/wp-content/uploads/2015/06/clipboard2_732223.png

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.

/wp-content/uploads/2015/06/clipboard2_732223.png

And here is the Flower rendering logic:

/wp-content/uploads/2015/06/clipboard4_732225.png

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.

/wp-content/uploads/2015/06/clipboard5_732226.png

/wp-content/uploads/2015/06/clipboard6_732227.png

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.

/wp-content/uploads/2015/06/clipboard7_732228.png

Also in the end of UI navigation, the UI framework will also attempt to close busy dialog if any.

/wp-content/uploads/2015/06/clipboard8_732229.png

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.

/wp-content/uploads/2015/06/clipboard9_732233.png

See this video for effect: https://github.com/i042416/jerryslide/blob/master/video/flower%20effect.wmv

Assigned Tags

      3 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Maksim Rashchynski
      Maksim Rashchynski
      Author's profile photo Jerry Wang
      Jerry Wang
      Blog Post Author

      Hi Maksim,

      your blog is awesome 🙂

      Best regards,

      Jerry

      Author's profile photo Tejas Chouhan
      Tejas Chouhan

      Nice one Jerry 🙂