2068 Commits

Author SHA1 Message Date
Dave Borowitz
41272759a6 PolyGerrit: Fix startup command in README.md
Change-Id: I89d7802c19522a0a6d172b1fdb6492b74ce8d3d3
2015-11-23 13:04:43 -05:00
Dave Borowitz
3952d762d3 Merge "Introduce responsive layout media queries and clean up gr-diff-view a bit" 2015-11-23 15:50:39 +00:00
Dave Borowitz
153d46c367 Merge changes from topic 'kill-bower-2'
* changes:
  Support deps for bower_component rules
  Update polygerrit-ui/README.md with some developer scenarios
  Serve bower_components from buck-out with --polygerrit-dev
2015-11-23 15:26:54 +00:00
Andrew Bonventre
64ad58f19f Introduce responsive layout media queries and clean up gr-diff-view a bit
This also re-introduces app-theme.html that we will use for general
color choices and any other CSS vars that should be shared. In the
future it should be separated into two different files: one for
theming and one for UI layout that we'd prefer users not to change.

The use of ems and rems is for the responsive layout. In the case
that the font size changes as a result of the window changing size,
the margins/padding should be relative to that font size, not absolute.
Not everything was fixed to be relative sizing. That will come in a
further change as the UI is more fleshed out.

Change-Id: I5a0e7cb6e46a4ca4e1ea52c71c9b7c75f1b42608
2015-11-23 10:24:32 -05:00
Dave Borowitz
17f6204a5e Merge "Fix bug where the search bar wasn't properly in sync with the URL" 2015-11-23 15:13:31 +00:00
Dave Borowitz
c913a9bc7b Support deps for bower_component rules
Combine bower components by unzipping their bower_components
directories including transitive dependencies over each other.

Change-Id: Ib1792ba0b17999b7df60babf6ce6a59c292c3eca
2015-11-23 08:57:58 -05:00
Dave Borowitz
3232f85eda Update polygerrit-ui/README.md with some developer scenarios
Change-Id: I1716b9ed332bb2eab2db36cecb33db63c3320958
2015-11-23 08:57:58 -05:00
Andrew Bonventre
de61992f9f Fix bug where the search bar wasn't properly in sync with the URL
The search bar should reflect what is in the URL and vice versa.

Change-Id: Ib0636898f13e84d9be3c36d55a13a4b0840daf1a
2015-11-21 00:05:43 -05:00
Andrew Bonventre
05a7a5727c Fix bug where changeURL was not updating to reflect its change object
Computed bindings are recomputed (say, on a model update), when the
arguments to the computation function change. Since no arguments were
being passed to changeURL(), it was only being computed once.

In order to maintain a clean API for external callers, move changeURL
from a function to a computed property. This way the caller doesn't
have to pass in the change number but it still updates when the change
number does.

Bug: Issue 3689
Change-Id: I92a659b3c917f77d4e212c98af7c763174756074
2015-11-20 21:10:22 -05:00
Dave Borowitz
7086ce5b81 Merge changes from topic 'kill-bower'
* changes:
  Daemon: Add flag to force PolyGerrit development mode
  Add polygerrit.war target to build only PolyGerrit UI
  Buck: Package PolyGerrit in gerrit.war
  Vulcanize PolyGerrit in Buck build
2015-11-19 20:56:46 +00:00
Andrew Bonventre
4c94478802 [PolyGerrit] Render (read-only) comments and column width ruler.
Also some small additional changes as well:
+ Correct some :host selectors that were causing issues when Shadow DOM
  was used instead of Shady DOM.
+ Two of the same revisions should not be shown in side-by-side view.
  When two are specified via the url as /N..N/ redirect to /N/.
+ Added header to the diff view to give context and allow the user to
  go back to the top-level change.

Feature: Issue 3676
Feature: Issue 3648
Feature: Issue 3649
Change-Id: Ib39bb7cb2eab26740f80971d4e00d579a2e08b0b
2015-11-19 14:25:24 -05:00
David Ostrovsky
be81e1f4b5 Vulcanize PolyGerrit in Buck build
Change-Id: Ie9baded31746a307bb257b69deeef41665821e9d
2015-11-18 15:26:39 -05:00
Andrew Bonventre
ab0f6a82c1 [PolyGerrit] Basic diff view with tests
This covers proper rendering at this point.

Issue 3648
Change-Id: I4c22595ca7ed8f5d98034e68b48942e34b5eb6bb
2015-11-16 14:36:15 -05:00
Andrew Bonventre
00b28becf5 [PolyGerrit] Remove empty test files
Change-Id: Iedf510e610951ae44f44575e06cdf67075d7310a
2015-11-16 12:29:55 -05:00
David Ostrovsky
f6f0b1ffaf Update PolyGerrit dependencies
Iron-ajax 1.0.9 added `json-prefix` attribute handling that we need for
vulcanized PolyGerrit to work.

Change-Id: I7ffb545f1d54faab1fdd54088311d48c45f2f129
2015-11-12 19:01:11 -08: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
Dave Borowitz
ffe301570c Build bower_components with buck
Add support for downloading npm binaries including dependencies and
running them in buck genrules. In npm land, transitive dependencies
are generally included in the package distribution, and there are a
*lot* of them. Since we aren't redistributing these binaries and
they're only part of the build process, we don't have to worry too
much about licensing, only that they don't have anything totally
crazy.

We assume packages have a certain format and we can detect the binary
to run from the genrule output filename. Actually running the binary
is tricky as well, since we have to extract it first. But it might be
large, so we don't want to extract it on every invocation; and naive
extraction to a common location (in buck-out) is racy. So we need a
custom extractor scheme using atomic rename to make this work.

Download bower as an npm package and use it to download bower
packages. Bower packages can come from a variety of sources, usually
git repositories, so we can't simply use download_file. There is
additional logic in bower to read bower.json and strip out unneeded
files, so I didn't want to get into reimplementing that. The tricky
thing about bower is convincing it to avoid transitive dependencies so
we can let Buck handle parallelism and caching. To do this, we need to
read the package information from the upstream bower repository, and
explicitly ignore all listed dependencies when downloading.

We combine the flattened list of bower packages in a single
bower_components rule. It would be nice to have deps of each
bower_component so we didn't need to flatten these, but Buck genrules
don't have deps so this is a nonstarter. Considering we only expect to
have a single bower_components for the whole project, hopefully this
is not too onerous.

This change just gets us the bower_components directory. We still have
some work to do to use this from Gerrit. Plus even more work to
replace the gulpfile and actually package this stuff together into a
compiled JS app for the war distribution.

Change-Id: Id277d2d812ffcc3bce87ff00b5894bacdffc038e
2015-11-12 19:01:53 -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