12 Commits

Author SHA1 Message Date
Viktar Donich
56305cb485 Use anonymous origin for gr-app.js
This makes exception text to be accessible to JS outside of
cdn.googlesource.com domain.

See related https://crbug.com/690301

Bug: Issue 5509
Change-Id: Ib44037c8f5685e7fd25e6c8b057152e920503691
2017-02-13 10:14:49 -08:00
Andrew Bonventre
4979ed0753 Fix preload of gr-app.js resource
According to https://crbug.com/678429 the issue was that the script
tag doesn’t know to use the resource unless as="script" is added to
the preload tag. Separately, crossorigin="anonymous" is removed
because when it’s present it causes a double download.

Change-Id: I59478fd6a6cb150b0032b5a6e6f7d078b1791d77
2017-02-10 07:27:17 +00:00
Viktar Donich
21a410d22c Fall back for exception name and try fix 'Script Error'
JS exceptions are being muted by exception reporting pipeline in
production because of CORS-related settings. I'm not yet certain what
and how, and this potentially could be attributed to preload-specific
behavior.

Also, fall back for such exceptions to default 'Script Error' message.

@see https://bugs.chromium.org/p/gerrit/issues/detail?id=5471#c7

Change-Id: I073118002ef2516ae6c3d9ec02f0393e36caeaf3
2017-02-07 16:12:36 -08:00
Viktar Donich
7a1aef251d Preload code font
Eliminate visual negative effects (such as invisible text or reflow)
caused by the font being unavailable while the browser attempts to use
it in the DOM.

Change-Id: Ia9c8562a76df1ee4adebe20b3dceb17c230b3739
2016-11-16 23:17:35 +00:00
Viktar Donich
4324dcbd8e Preload gr-app.js if browser supports it
Change-Id: I88c3c5620d0ede515e77722f79d871892df77eed
2016-11-03 10:07:35 -07:00
Andrew Bonventre
29a1f982bb Move fonts.css out of @import so that it can load async
Change-Id: Id0269f846d02194607e4f6e3819435a914f2add0
2016-04-16 15:13:24 +00:00
Andrew Bonventre
814c03283d Initial work to make viewing change on mobile more manageable
Some specificity is needed via !important due to bugs that
appear to be fixed in the latest version of Polymer[1]. An
update of those libs will come in a later change.

[1] https://github.com/Polymer/polymer/issues/2531

Bug: Issue 3908
Change-Id: I384b27143471da266f752b247e87ab53886ff6c5
2016-02-19 17:21:01 +00:00
Andrew Bonventre
9de8b68b77 Update page title when a view is displayed
Bug: Issue 3784
Change-Id: I499a1543b38241a1ec8bd6861df4ba21616a24f2
2016-01-15 20:25:27 +00:00
Dave Borowitz
6fc269e537 PolyGerrit: Remove gulp-specific comments from index.html
Change-Id: Ifdaaa2b95d9908df031ac51be06a54e731f05eaa
2015-12-04 13:27:45 -05:00
Andrew Bonventre
a5fff8ebc9 Scaffold for user's logged-in dashboard
This change introduces a dependency of the routing behavior on
whether the user is logged in. Since the WebComponentsReady event
can fire before OR after the account info is retrieved, a Promise
is used to ensure deterministic ordering via `accountReady`.

There is also some minor cleanup of which element is being used
as the global `app` object.

Feature: Issue 3700

Change-Id: I9768f2eabd5cdb7c62ead16ae97df5c1c321eaf6
2015-11-30 18:56:07 -05:00
Dave Borowitz
8c14386ea7 PolyGerrit: Rework script imports
With Buck, we won't easily be able to follow the <!-- build:js -->
directive in index.html to combine multiple .js files into a single
app.js. Instead, move those includes into the top-level component
gr-app.html, so vulcanize will simply inline them. This leaves
index.html as a simple unvulcanized shim that will just load the
polyfills and the top-level app.

After this change, we can vulcanize gr-app.html and just swap out one
path in index.html, otherwise serving it as-is.

Change-Id: I782c4bbd259c03c2d7e2d33342462510a91f32e3
2015-11-12 19:03:09 -05:00
Andrew Bonventre
ba69835964 Add the skeleton of a new UI based on Polymer, PolyGerrit
This is the beginnings of an experimental new non-GWT web UI developed
using a modern JS web framework, http://www.polymer-project.org/. It
will coexist alongside the GWT UI until it is feature-complete.

The functionality of this change is light years from complete, with
a full laundry list of things that don't work. This change is simply
meant to get the starting work in and continue iteration afterward.

The contents of the polygerrit-ui directory started as the full tree of
https://github.com/andybons/polygerrit at 219f531, plus a few more
local changes since review started. In the future this directory will
be pruned, rearranged, and integrated with the Buck build.

Change-Id: Ifb6f5429e8031ee049225cdafa244ad1c21bf5b5
2015-11-09 22:01:28 +00:00