Skip to content

Swap to skeleton loaders from a single circular loader on MR Diffs (Changes) tab

Thomas Randolph requested to merge tor/feature/mr-skeleton-loader into master

What does this MR do?

For #290301 (closed)

This MR replaces all of our known loading states with skeleton loaders in the rough shape of the content that will replace them.

Issues

We only have loading states for:

  • The whole app
  • The diff files

Unfortunately, there's a long delay between when the app (e.g. the metadata) loads and when the file tree actually renders.
This results in the app showing both the tree loader and the files loader even though the tree should be able to render earlier than the files.


The table below lists our possible loading combinations and associated notes.

State Loaders Showing Notes
App Loading Pseudo-app layout with all three loaders: versions, tree, and files
Files loading The files loader and tree loader show In my testing, the tree never shows until the files load in any case, so we'll always show the tree loader next to the files loader to avoid a janky shift
Some files have loaded, but more batches are loading The files that have loaded are showing, but the files loader also show below them to indicate that more files are being requested
Loader Description
versions Has a square, a few lines, and a rectangle; very horizontal, indicates a bar with text and controls
tree Indicates a list; very vertical, multiple lines, plus a larger bar at the top to indicate a search input
files Looks like code with multiple lines of various lengths, and some vertical lines indicating the gutter, plus a file header area like a title

Screenshots (strongly suggested)

Small and/or Mobile Larger / Desktop
With File Tree Open smallWithTree largerWithTree
With File Tree Closed smallWithoutTree largerWithoutTree

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Thomas Randolph

Merge request reports

Loading