During network requests, a good User Experience practice is to display a spinner for the user to know that the application is not stuck. One way to do that is to start an activity indicator when the request starts and stop/hide it when the call is completed.
Kodika offers an automated way that shows and hides an activity indicator/spinner during the network request.
To enable/disable, you will need to change the
Auto show Progress Spinner during loading switch in the Datasource settings.
If you want to manually display a spinner or handle the UI changes during a Datasource request, you will need to:
- Show spinner/block user interaction when the Datasource request starts.
- Hide spinner/unblock user interaction when the Datasource request finishes, either with success or error.
There is no event when a Datasource request starts. Still, you can manually handle it depending on how the Datasource will start:
- If you have used a Start a datasource request Event Action, then place a new Event Action before the one that starts the Datasource.
- If you have used a Code Block, then place the code blocks that change the UI before the one that starts the Datasource.
There is no event when a Datasource request finishes. Still, you can bind a Function to a response parameter of the Datasource response. You will add all the Code Blocks for the UI Changes in this binded Function.
Note: You will need to handle all the request responses(success and error).