Only add changes to status page with jobs
In v3, changes get added to pipelines and then it is determined what, if
any, jobs they have. This leads to two UX 'issues'. The first is that a
change can flash into the check pipeline for a second even if zuul isn't
doing anything with it. The second is that for changes that zuul IS
doing things with, the change box will appear before it is expandable.
If we only append changes that have jobs, then they won't show up in a
pipeline if they aren't going to do anything, nor will the user be
presented with a box that looks expandable but isn't.
Change-Id: I4c39505dbba5c02790132a3f52afad5d68578a2e
diff --git a/etc/status/public_html/jquery.zuul.js b/etc/status/public_html/jquery.zuul.js
index 1937cd5..c2cf279 100644
--- a/etc/status/public_html/jquery.zuul.js
+++ b/etc/status/public_html/jquery.zuul.js
@@ -554,11 +554,14 @@
}
$.each(changes, function (change_i, change) {
- var $change_box =
- format.change_with_status_tree(
- change, change_queue);
- $html.append($change_box);
- format.display_patchset($change_box);
+ // Only add a change when it has jobs
+ if (change.jobs.length > 0) {
+ var $change_box =
+ format.change_with_status_tree(
+ change, change_queue);
+ $html.append($change_box);
+ format.display_patchset($change_box);
+ }
});
});
});