Skip to content

Commit page: Async loading of Branches section causes layout shift

Summary

When viewing a commit, the data for Branches section is loaded asynchronously. This causes users to click on “Branches containing commit” when they mean to click on the associated MR.

Screenshot

layout-change

Steps to reproduce

  1. View a commit (example).
  2. Refresh the page.
  3. Notice the layout shift once the Branches section is done loading.

Possible fixes

Display a loading icon instead of an empty div while refs are being loaded.