From 8a949c80ce103990e6561ee959c0c8a505985fbe Mon Sep 17 00:00:00 2001
From: Shane Tomlinson <stomlinson@mozilla.com>
Date: Fri, 7 Oct 2011 14:13:48 +0100
Subject: [PATCH] Smoothing out just a tad, showing the initial "communicating
 with server" message, but it still jumps a tad bit.

---
 .../static/dialog/controllers/dialog_controller.js   | 12 ++++++------
 browserid/views/dialog.ejs                           |  6 ++++--
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/browserid/static/dialog/controllers/dialog_controller.js b/browserid/static/dialog/controllers/dialog_controller.js
index 748ce8897..aaa56166b 100644
--- a/browserid/static/dialog/controllers/dialog_controller.js
+++ b/browserid/static/dialog/controllers/dialog_controller.js
@@ -44,13 +44,14 @@
 
 PageController.extend("Dialog", {}, {
     init: function(el) {
-      this.element.show();
+      var self=this;
+      //this.element.show();
 
       // keep track of where we are and what we do on success and error
-      this.onsuccess = null;
-      this.onerror = null;
-      var chan = setupChannel(this);
-      this.stateMachine();
+      self.onsuccess = null;
+      self.onerror = null;
+      setupChannel(self);
+      self.stateMachine();
     },
       
     getVerifiedEmail: function(origin_url, onsuccess, onerror) {
@@ -196,7 +197,6 @@ PageController.extend("Dialog", {}, {
 
     doCheckAuth: function() {
       var self=this;
-      self.doWait(BrowserID.Wait.checkAuth);
       BrowserID.Identities.checkAuthenticationAndSync(function onSuccess() {}, 
         function onComplete(authenticated) {
           if (authenticated) {
diff --git a/browserid/views/dialog.ejs b/browserid/views/dialog.ejs
index 35996046a..74a9a404c 100644
--- a/browserid/views/dialog.ejs
+++ b/browserid/views/dialog.ejs
@@ -15,7 +15,7 @@
   <link href="https://fonts.googleapis.com/css?family=Droid+Serif:400,400italic,700,700italic" rel="stylesheet" type="text/css">
   <title>Browser ID</title>
 </head>
-  <body>
+  <body class="waiting">
       <div id="wrapper">
           <header id="header" class="cf">
               <ul>
@@ -27,7 +27,9 @@
             <form novalidate> 
 
               <div id="dialog" class="dialog cf">
-
+                <!-- All of this is going to be replaced on startup, but we need some temporary placeholder -->
+                <h2>Communicating with server</h2>
+                <p>Just a moment while we talk with the server.</p>
               </div>
 
               <div id="error_dialog">
-- 
GitLab