[results feed] Add "Fetching results..." message to try results page

Change-Id: I6ede9370f2795f5ea030594da57cd43938c9c827
Fixes https://github.com/dart-lang/dart_ci/issues/84
Reviewed-on: https://dart-review.googlesource.com/c/dart_ci/+/140283
Reviewed-by: Alexander Thomas <athom@google.com>
diff --git a/results_feed/lib/src/components/try_results_component.dart b/results_feed/lib/src/components/try_results_component.dart
index d184f4b..aa92284 100644
--- a/results_feed/lib/src/components/try_results_component.dart
+++ b/results_feed/lib/src/components/try_results_component.dart
@@ -46,8 +46,7 @@
   int review;
   int patchset;
   ReviewInfo reviewInfo;
-  ChangeGroup changeGroup =
-      ChangeGroup(null, {}, [], [], LoadedResultsStatus());
+  ChangeGroup changeGroup = waitingForDataChangeGroup;
   int cachedReview;
   int cachedPatchset;
   List<Change> changes;
@@ -63,6 +62,10 @@
 
   TryResultsComponent(this._tryDataService, this._applicationRef);
 
+  bool get waitingForData => !changeGroup.loadedResultsStatus.loaded;
+
+  bool get noChanges => !waitingForData && changeGroup.changes.isEmpty;
+
   bool get approveEnabled =>
       changeGroup.changes.flat.any((change) => change.failed);
 
@@ -122,6 +125,8 @@
       reviewInfo = await _tryDataService.fetchReviewInfo(review);
     }
     if (review != cachedReview || patchset != cachedPatchset) {
+      changeGroup = waitingForDataChangeGroup;
+      comments = [];
       changes = await _tryDataService.changes(reviewInfo, patchset);
       comments = await _tryDataService.comments(reviewInfo.review);
       builds = {
@@ -155,3 +160,6 @@
   String newIssueURL() => githubNewIssueURL(changeGroup.changes,
       reviewInfo.title, "https://dart-review.googlesource.com/c/sdk/+/$review");
 }
+
+final waitingForDataChangeGroup =
+ChangeGroup(null, {}, [], [], LoadedResultsStatus()..loaded=false);
diff --git a/results_feed/lib/src/components/try_results_component.html b/results_feed/lib/src/components/try_results_component.html
index 1b6dd3a..b53854b 100644
--- a/results_feed/lib/src/components/try_results_component.html
+++ b/results_feed/lib/src/components/try_results_component.html
@@ -3,7 +3,8 @@
     <a href="http://dart-review.googlesource.com/c/sdk/+/{{review}}/{{patchset}}"
        target="_blank">{{reviewInfo.title}}</a>
   </h2>
-  <h2 *ngIf="changeGroup.changes.isEmpty">No changed test results</h2>
+  <h2 *ngIf="waitingForData">Fetching results&hellip;</h2>
+  <h2 *ngIf="noChanges">No changed test results</h2>
   <results-panel *ngIf="!approving"
       [changes]="changeGroup.changes"
       [builds]="builds"
diff --git a/results_feed/pubspec.lock b/results_feed/pubspec.lock
index 11104f0..8804f1c 100644
--- a/results_feed/pubspec.lock
+++ b/results_feed/pubspec.lock
@@ -70,14 +70,14 @@
       name: args
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.5.2"
+    version: "1.6.0"
   async:
     dependency: transitive
     description:
       name: async
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "2.4.0"
+    version: "2.4.1"
   bazel_worker:
     dependency: transitive
     description:
@@ -119,7 +119,7 @@
       name: build_modules
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "2.8.0"
+    version: "2.9.0"
   build_resolvers:
     dependency: transitive
     description:
@@ -133,14 +133,14 @@
       name: build_runner
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.7.4"
+    version: "1.8.0"
   build_runner_core:
     dependency: transitive
     description:
       name: build_runner_core
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "4.4.0"
+    version: "4.5.2"
   build_test:
     dependency: "direct dev"
     description:
@@ -154,7 +154,7 @@
       name: build_web_compilers
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "2.9.0"
+    version: "2.10.0"
   built_collection:
     dependency: transitive
     description:
@@ -217,7 +217,7 @@
       name: coverage
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "0.13.6"
+    version: "0.13.9"
   crypto:
     dependency: transitive
     description:
@@ -413,7 +413,7 @@
       name: package_config
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.1.0"
+    version: "1.9.2"
   package_resolver:
     dependency: transitive
     description:
@@ -462,7 +462,7 @@
       name: pub_semver
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.4.3"
+    version: "1.4.4"
   pubspec_parse:
     dependency: transitive
     description:
@@ -476,14 +476,14 @@
       name: quiver
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "2.1.2+1"
+    version: "2.1.3"
   sass:
     dependency: transitive
     description:
       name: sass
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.25.0"
+    version: "1.26.3"
   sass_builder:
     dependency: "direct dev"
     description:
@@ -518,7 +518,7 @@
       name: shelf_packages_handler
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.0.4"
+    version: "2.0.0"
   shelf_static:
     dependency: transitive
     description:
@@ -546,7 +546,7 @@
       name: source_map_stack_trace
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.1.5"
+    version: "2.0.0"
   source_maps:
     dependency: transitive
     description:
@@ -560,7 +560,7 @@
       name: source_span
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.6.0"
+    version: "1.7.0"
   stack_trace:
     dependency: transitive
     description:
@@ -581,7 +581,7 @@
       name: stream_transform
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.1.0"
+    version: "1.2.0"
   string_scanner:
     dependency: transitive
     description:
@@ -609,21 +609,21 @@
       name: test
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.12.0"
+    version: "1.14.2"
   test_api:
     dependency: transitive
     description:
       name: test_api
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "0.2.14"
+    version: "0.2.15"
   test_core:
     dependency: transitive
     description:
       name: test_core
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "0.3.0"
+    version: "0.3.3"
   timing:
     dependency: transitive
     description:
@@ -651,14 +651,14 @@
       name: vm_service
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "2.3.1"
+    version: "4.0.0"
   watcher:
     dependency: transitive
     description:
       name: watcher
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "0.9.7+13"
+    version: "0.9.7+14"
   web_socket_channel:
     dependency: transitive
     description:
@@ -679,7 +679,7 @@
       name: webkit_inspection_protocol
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "0.5.0"
+    version: "0.5.0+1"
   yaml:
     dependency: transitive
     description:
@@ -688,4 +688,4 @@
     source: hosted
     version: "2.2.0"
 sdks:
-  dart: ">=2.7.0-dev <=2.8.0-dev.11.0"
+  dart: ">=2.8.0-dev.10.0 <=2.8.0-dev.15.0"