Skip to content

Reduce spinners shown on switching MR tabs 馃ゴ

Thomas Randolph requested to merge tor/defect/diffs-multiple-tab-spinners into master

What does this MR do and why?

For #371466 (closed)

We all love spinners but this MR reduces the total visible spinners to just one. I was getting dizzy before.

There are two different fixes for multiple spinners appearing in multiple situations:

  1. When you switch MR tabs, the very first thing it does is hide the spinner. Later code may re-show it, but it hides any visible spinners first.
  2. When loading the Changes tab, it doesn't show the spinner at all.

For the former fix, the Pipelines tab has its own spinner (and doesn't ask for the tabs spinner to be shown), but if the Commits are still loading, the Commits tab's spinner remains until the network request for the commits finishes. In that time, the pipeline component spinner has already displayed as it loads.

For the latter fix, the Changes app already has its own spinner, so we don't need to show one when switching tabs.

Screenshots or screen recordings

Before (master) After (this branch)
multi-spinner-mr-tabs-master multi-spinner-mr-tabs-branch

How to set up and validate locally

This is visible on pretty much any MR if you click super fast.

  1. Open an MR to the Overview tab
  2. Rapidly click the Commits tab and then immediately click the Pipelines tab

Validation note: the faster you do all of this, the more obvious. For example, if there are still network requests pending for the Overview tab when you click off to the Commits and then to Pipelines, the more likely you are to see the double spinner on master.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Thomas Randolph

Merge request reports