I noticed that panel on Special Contribs is hidden by default for client-nojs. This is great!
And the section also renders partly server-side to avoid FOUC and layout shifts when the default state is collapsed.
When the default state is expanded, however, it seems the placeholder is empty with little to no reserved height, even after the user preference is known and "loading" state has started. Thus, causing a layout shift not just in the initial rendering once the (cached) JS arrives, but also after the API response has come back from the network.
This shift is quite noticable and can lead to frustration due to accidental clicks or lost visual context.
Steps:
- https://en.wikipedia.beta.wmflabs.org/wiki/Special:RecentChanges?userExpLevel=unregistered
- Open devtools
- Pick a user and open their contribs page (if not expanded previously, expand once, and visit another contribs page)
Actual result:
AC:
- The default height to be the same as when the infobox is open with data.
Related: