Before the reviews on the "All reviews" page have loaded, we render a few reviews with <LoadingText />. But if we're coming from the add-on details page, we have a review count in state already so we should render that many reviews. This prevents an add-on with only, say, one review from having four "loading" reviews and then cutting the content down to only one review once loaded.
If you access the page directly, obviously we won't have a review count. In that case we can continue to load a random/set amount.
@kumar303 given all the work around reviews, is this issue still relevant?
It still happens; coming from the main add-ons page we know how many reviews there are, so it would make sense to show that many LoadingText reviews. This one, for instance, should have 28 and not 4:

It's pretty minor in that case, but it's a bit more jarring when there are fewer than 4 reviews:

Thanks! That'd be a nice improvement indeed
Yep. It should be doable although I haven't looked at it closely.
Hey guys, I'm gunna take a crack at this. The source code in question is found here:
It still happens; coming from the main add-ons page we know how many reviews there are, so it would make sense to show that many
LoadingTextreviews. This one, for instance, should have 28 and not 4:
It's pretty minor in that case, but it's a bit more jarring when there are _fewer_ than 4 reviews:
@tofumatt Would there be 25 or 28 LoadingText components? The reason being is that I thought pagination only allows 25 to show at a time - please correct me if I'm wrong
I'd say the limit should be the pagination limit; I wouldn't show 28 when the most that would appear would be 25 馃憤
(So it should be capped at 25.)
Great!! Thanks for the super speedy reply 馃殌
@SeanPrashad @willdurand I verified this issue on AMO dev (FF63, Win10).
To see this behavior I first checked on AMO prod and I could indeed reproduce it but only for add-ons with more than 25 reviews, never with 4 reviews or below, and also it is intermittent.
I could reproduce it on prod with
https://addons.mozilla.org/en-US/firefox/addon/privacy-possum/
https://addons.mozilla.org/en-US/firefox/addon/steam-database/
https://addons.mozilla.org/en-US/firefox/addon/arc-dark-theme-we/
I was not able to reproduce it on AMO dev at all. This should no longer be an issue but to be sure I'll recheck it with the above samples on AMO prod too.
I could no longer reproduce this issue on AMO prod. Verified with FF64 (Win10).