userscripts icon indicating copy to clipboard operation
userscripts copied to clipboard

About loading optimization of `popup` interface

Open ACTCD opened this issue 3 years ago • 5 comments

https://user-images.githubusercontent.com/101378590/176054410-169dcd08-decd-4386-bdde-44251b17d32e.mp4

From time to time I experience loading waits as shown in the screen recording, even when I just want to quickly check or disable/enable a script, I have to wait a while or try to cancel it to show the interface, this unpleasant experience has been experienced a lot It caught my attention after that, and I was thinking maybe this automatic update check could not block the loading of the entire interface, but like just run in the banner at the top. Do you think this would be better?

Another problem is, I notice the error banner it alert, but I always can't get more information, why it fails, which script update failed, and if it keeps failing, it seems difficult to check as a user, may need delete the scripts one by one to confirm the problem. Could you provide more details of the error information, at least to show which scripts failed to upgrade, so that users can better understand and try to solve the problem themselves.

ACTCD avatar Jun 28 '22 00:06 ACTCD

I was thinking maybe this automatic update check could not block the loading of the entire interface, but like just run in the banner at the top. Do you think this would be better?

Yes this is exactly how I would like it to function. Optimize the popup display so we get it loaded as fast as possible. After load, we can do the background check for updates, etc... and display that in a banner. I was thinking the exact same thing recently.

Another problem is, I notice the error banner it alert, but I always can't get more information

I agree error logging can be improved. Sometimes there more information in the popup console (right click, then click Inspect Element), but that info is not always useful and most users are not aware of it.

I think more broadly, error logging needs to be improved, how we do that needs to be determined. If you suggestions for how, please share. One challenge is the limited space the popup offers. However, we could give generic errors in the pop, and tell the user to view a detailed message in the page console (we could send the error data to the content script, which then can provide more details, if we are on a page where that is possible).

2 new issue should be created:

  1. Optimize popup loading - defer update checks
  2. improve error logging

I can do this later or you can make them.

quoid avatar Jun 28 '22 00:06 quoid

@quoid My current thinking is that if a general error is given, I can click on the red error banner to see more detailed error messages in a new interface. For update checks, perhaps we can put a flag next to the corresponding script to indicate that.

It's worth mentioning that I checked the console of the popup and background pages and it didn't give any error messages.

You can create granular issues that fit your workflow at the right time. I think the above is all I have thought and expressed at the moment.

ACTCD avatar Jun 28 '22 00:06 ACTCD

https://user-images.githubusercontent.com/101378590/176326862-55480e0d-ff2b-42c8-8ddc-9906f39ba514.mp4

cancel request doesn't always work, in the video, after I click on it, it still circles for about 30s (the video is cropped at the back). This also happens on macOS, it's just that I don't have the right opportunity to record.

ACTCD avatar Jun 29 '22 00:06 ACTCD

I believe you.

The cancel request button just sends a message to the swift side and calls window.location.reload(), which should just reload the popup. I hope then when the popup load is reworked this will be improved.

quoid avatar Jun 29 '22 01:06 quoid