-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MWPW-159324] Progress loader circle delay handling #150
base: stage
Are you sure you want to change the base?
Conversation
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
Commits
|
|
@@ -24,6 +24,26 @@ export default class ActionBinder { | |||
this.errorToastEl = null; | |||
this.psApiConfig = this.getPsApiConfig(); | |||
this.serviceHandler = null; | |||
this.loadServiceHandler(); | |||
this.loadSVGsMaybe(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will add both progress circle and all the svgs (Including the ones that are present on the buttons that will be made visible only when user interacts) in the critical rendering path. Can we split this into two functions and call the progress circle js and css loader here and load svg in psActions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I'm missing something, but this will not work because we'll still load the other SVGs when the user clicks on "Remove background".
This will still cause a delay between the button click and the 'show'
action for the progress circle.
Description:
This PR handles the unwanted delay in the loader circle render by moving the async loading elements outside of the function which gets triggered by clicking the "Remove background" or "Upload image" button.
Resolves: MWPW-159324
Testing instructions:
Do these for both the before and after test URLs:
Test URLs:
Before: https://stage--unity--adobecom.hlx.page/drafts/rbogos/remove-background
After: https://mwpw-159324-loader-delay--unity--adobecom.hlx.page/drafts/rbogos/remove-background