ChopsUI: In pRPC client bind window.fetch to window

Otherwise fetch will throw an error about illegal invocation when it's
called with a context that isn't `window`.

Bug: monorail:3376
Change-Id: I7cccb201c015ae4b764b7b58bcd9cd956e3b8f9a
Reviewed-on: https://chromium-review.googlesource.com/1105345
Reviewed-by: Tiffany Zhang <zhangtiff@chromium.org>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
Commit-Queue: Jeff Carpenter <jeffcarp@chromium.org>
Cr-Mirrored-From: https://chromium.googlesource.com/infra/infra
Cr-Mirrored-Commit: ed4df42b55742c5d7327ef008d3a4032e9a2466a
1 file changed
tree: 12d8ce097afc8e07b7143455a81828330ce72890
  1. demo/
  2. img/
  3. test/
  4. .gitignore
  5. bower.json
  6. chops-bug-input.html
  7. chops-bug-link.html
  8. chops-bug-mixin.html
  9. chops-button.html
  10. chops-carousel.html
  11. chops-chip.html
  12. chops-cl-link.html
  13. chops-dialog.html
  14. chops-header.html
  15. chops-login.html
  16. chops-styles.css
  17. chops-timestamp.html
  18. chops-tree-status.html
  19. chops-user-dropdown.html
  20. chops-user-id.html
  21. chops-user-input.html
  22. new-element-test.sh
  23. new-element.sh
  24. prpc-client.js
  25. README.md
README.md

chopsui

Design Doc: go/chopsui

This directory contains Polymer Web Components that are meant to be shared by Chrome Operations' application frontends.

chopsui/ has been published as the bower package: chopsui

Definitions

infra repo

  • The chopsui directory in the infra repo

chopsui repo

  • A subdirectory mirror repo of the chopsui directory in the infra repo

Code changes should be done in the infra repo.

New versions of the chopsui bower package are published by pushing git tags. This should be done in the chopsui repo. See the Pushing a New Version section.

Documenting elements

Please add demos and documentation for elements as described in the polymer docs.

Check that your demo and documentation are working and correct by running:

polymer serve

then visit localhost:XXXX/components/chopsui/demo/my-el_demo.html

Pushing a New Version

New versions are published by pushing git version tags while in the chopsui repo. Bower will automatically detect a new version tag.

Prerequisites

You need to be granted permission to push tags in the chopsui repo. If you don't have permission, please contact jojwang@, zhangtiff@, or seanmccullough@ for instructions on how to proceed.

Make a clone of the chopsui repo:

git clone https://chromium.googlesource.com/infra/infra/crdx/chopsui

To test your elements, you will need to install polymer-cli:

npm install -g polymer-cli

You can run the tests with:

polymer test

Make sure Chromium's depot_tools is in your path as well. Learn how to set up depot_tools here.

Push a new version tag

  1. Once the latest change(committed in the infra repo) for the new version has landed, switch to the chopsui repo
  2. To view existing tags run
git tag
  1. Create a new version tag
git tag v0.0.31 # replace 0.0.31 with an appropriate version number
  1. Push the new tag
git push --tags

That's it! Run

bower info chopsui

You should see the new version tag you just pushed listed under ‘Available versions’.