Add a loading message, link to the project, before the UI initializes
It can take a second or two for the GWT code to download, parse, and start executing. During that time its a good idea to give the user more than just a blank window to look at, so we embed a very basic loading message into the default DOM in the host page. In practice it is hard to see this message, as the UI does start up pretty quick. Once the UI is ready to install the first screen we drop the elements out of the DOM tree, so the browser no longer needs to manage them. We also embed a hyperlink back to the project homepage. This can be useful for non-JavaScript enabled browsers, so they can at least jump back to the Gerrit project and learn more about why JavaScript might need to be enabled here. It also will help to boost our project's rankings in search engines, as any search engine will most likely index only the host page. Anyone who is using Gerrit on their site should also help drive traffic back to the main project, to promote more developers to get interested in contributing. It is in everyone's best interest if we have a vibrant developer community behind Gerrit. Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
@@ -278,6 +278,9 @@ public class Gerrit implements EntryPoint {
|
||||
}
|
||||
|
||||
private void showInitialScreen() {
|
||||
final RootPanel sg = RootPanel.get("gerrit_startinggerrit");
|
||||
sg.getElement().getParentElement().removeChild(sg.getElement());
|
||||
|
||||
History.addHistoryListener(new Link());
|
||||
if ("".equals(History.getToken())) {
|
||||
if (isSignedIn()) {
|
||||
|
@@ -11,9 +11,12 @@
|
||||
<div id="gerrit_topmenu"></div>
|
||||
<div id="gerrit_endtopmenu"></div>
|
||||
<div id="gerrit_header"></div>
|
||||
<noscript>
|
||||
<p>Gerrit requires a JavaScript enabled browser.</p>
|
||||
</noscript>
|
||||
<div id="gerrit_startinggerrit" style="margin-left: 10px;">
|
||||
<p>Loading <a href="http://code.google.com/p/gerrit/" target="_blank">Gerrit Code Review</a> ...</p>
|
||||
<noscript>
|
||||
<p>Gerrit requires a JavaScript enabled browser.</p>
|
||||
</noscript>
|
||||
</div>
|
||||
<div id="gerrit_body"></div>
|
||||
<div id="gerrit_pagefooter">
|
||||
<div id="gerrit_footer"></div>
|
||||
|
Reference in New Issue
Block a user