addons-code-manager icon indicating copy to clipboard operation
addons-code-manager copied to clipboard

Create a loading indicator for comments

Open ioanarusiczki opened this issue 6 years ago • 2 comments
trafficstars

As discussed https://github.com/mozilla/addons-code-manager/issues/114#issuecomment-547967305

STR:

  1. Load a Browser page which contains reviewer comments https://code.addons-dev.allizom.org/en-US/browse/390151/versions/1688302/?messageUid=0f2fa4cbd8354a6fb1020f5f7ec2369e&path=mozilla-recommendation.json
  2. Observe the NavBar while the page is loading.

Expected result: A loading indicator is available for Comments and Comment Summary.

Actual result: Comments and Comment Summary appear with a small delay.

Notes: This issue is reproducible with the reviewer comments too. Same fix should be applied but perhaps after https://github.com/mozilla/addons-code-manager/issues/114 lands.

the Nav Bar

the elements

the Comments

the comments

┆Issue is synchronized with this Jira Task

ioanarusiczki avatar Oct 31 '19 09:10 ioanarusiczki

@ioanarusiczki ah, I also noticed that the API could be faster here. I filed https://github.com/mozilla/addons/issues/7100

Here are some thoughts on the loading indicator

  • It's currently impossible to know if a version has saved comments or not before making an API request for those comments. Thus, it wouldn't make sense (or would it?) to show a loading indicator for the case where the version does not have comments. This needs some thought.
  • Maybe there is a way to patch the initial get version API response to indicate whether saved comments exist or not for the current user. This would solve the problem above.

kumar303 avatar Nov 01 '19 21:11 kumar303

@kumar303 Indeed, I see that the response timings increase with the number of comments made.

12 comments from AMO dev

Frontend timing

12 comments from Postman - the API response :

Response for 12 comments

ioanarusiczki avatar Nov 04 '19 09:11 ioanarusiczki