Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloud Firestore Support #278

Open
wants to merge 37 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
2f5d602
Initial import of Cloud Firestore work.
mbleigh Oct 7, 2017
5b2bfb5
Rename FirestoreElement to FirestoreMixin and change filenames accord…
merlinnot Oct 20, 2017
f458cdd
Add FirestoreElement document demo.
merlinnot Oct 20, 2017
2fd8797
Use a new scope instead of a new context created by an IIFE in Firest…
merlinnot Oct 20, 2017
a448834
Merge pull request #288 from merlinnot/fix-issue-281
tjmonsi Oct 21, 2017
0b6cc21
Use binding to element's properties in firestore demo.
merlinnot Oct 23, 2017
349dc04
Merge branch 'firestore' into fix-issue-289
merlinnot Oct 23, 2017
e3afb7a
Change filenames of firestore demos to match those of other elements.
merlinnot Oct 23, 2017
97a771b
Fix FirestoreMixin's issue with binding to element's properties with …
merlinnot Oct 23, 2017
eb69c00
Merge pull request #293 from merlinnot/fix-issue-289-and-292
tjmonsi Oct 24, 2017
ed9c8b5
Increase efficiency of Array updates made by FirestoreMixin.
merlinnot Oct 23, 2017
6d5a55a
Merge branch 'firestore' into fix-issue-283
merlinnot Oct 25, 2017
958bf09
Fix `query` in FirestoreMixin.
merlinnot Oct 25, 2017
d0a4870
Fix an issue with initail binding in FirestoreMixin.
merlinnot Oct 25, 2017
e284cc4
FirestoreMixin: throw an error on binding to properties with invalid …
merlinnot Oct 25, 2017
28210c0
FirestoreMixin: ensure that it was not previously applied to the same…
merlinnot Oct 25, 2017
3644a85
FirestoreMixin: add missing semicolons.
merlinnot Oct 25, 2017
4328fd0
Merge pull request #297 from merlinnot/fix-issue-296
tjmonsi Oct 25, 2017
5982940
Add query property to _firestoreProps in FirestoreMixin.
merlinnot Oct 26, 2017
b0b30b5
Merge branch 'firestore-mixin-fixes' into fix-issue-302
merlinnot Nov 2, 2017
18ac794
Assign a null value to a document when it's listener is being deleted.
merlinnot Jan 3, 2018
ef9c2d0
Strict & more readable comparison in _firestoreAssignCollection metho…
merlinnot Jan 3, 2018
90f4d92
Merge branch 'fix-issue-283' into firestore
merlinnot Jan 3, 2018
bc292aa
Merge branch 'firestore' into fix-issue-284
merlinnot Jan 3, 2018
35caf3a
Apply DRY rule and improve a name of _ensurePropertyTypeCorrectness i…
merlinnot Jan 3, 2018
1a60e76
Merge branch 'firestore' into fix-issue-292
merlinnot Jan 3, 2018
5e5245e
Handle applying FirestoreMixin multiple times to the same element.
merlinnot Jan 3, 2018
fd12a0d
Simplify syntax in TRANSFORMS in FirestoreMixin.
merlinnot Jan 3, 2018
e148a13
Merge branch 'firestore' into fix-issue-300
merlinnot Jan 3, 2018
97dac28
Merge branch 'firestore' into fix-issue-302
merlinnot Jan 3, 2018
28f3e7d
Fix an issue with initial binding of properties in FirestoreMixin.
merlinnot Jan 4, 2018
cbd7370
Fix 'propertyReady' in FirestoreMixin.
merlinnot Jan 8, 2018
0fcfc37
Merge pull request #310 from merlinnot/firestore
tjmonsi Jan 10, 2018
94eec17
Fix persistence issue with documents, introduce noCache option, impro…
merlinnot Feb 6, 2018
cb3b093
Fix `super.connectedCallback` invocation in FirestoreMixin
merlinnot Feb 15, 2018
7d19610
Merge pull request #324 from merlinnot/fix-issue-323
tjmonsi Feb 20, 2018
03d40c7
Merge pull request #322 from merlinnot/fix-issue-282
tjmonsi Feb 21, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 36 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,20 @@ thing! https://github.com/PolymerLabs/tedium/issues
## <firebase-app>

The firebase-app element is used for initializing and configuring your
connection to firebase.
connection to firebase. It is only necessary to include this element once
in your application, and it equivalent to calling `firebase.initializeApp()`
in the JavaScript SDK.

```html
<firebase-app
auth-domain="polymerfire-test.firebaseapp.com"
database-url="https://polymerfire-test.firebaseio.com/"
api-key="AIzaSyDTP-eiQezleFsV2WddFBAhF_WEzx_8v_g"
storage-bucket="polymerfire-test.appspot.com"
messaging-sender-id="544817973908"
project-id="polymerfire-test">
</firebase-app>
```

## &lt;firebase-auth&gt;

Expand All @@ -30,13 +42,6 @@ workflows.
Example Usage:

```html
<firebase-app
auth-domain="polymerfire-test.firebaseapp.com"
database-url="https://polymerfire-test.firebaseio.com/"
api-key="AIzaSyDTP-eiQezleFsV2WddFBAhF_WEzx_8v_g"
storage-bucket="polymerfire-test.appspot.com"
messaging-sender-id="544817973908">
</firebase-app>
<firebase-auth id="auth" user="{{user}}" provider="google" on-error="handleError">
</firebase-auth>
```
Expand All @@ -58,8 +63,6 @@ This popup sign-in will then attempt to sign in using Google as an OAuth
provider since there was no provider argument specified and since `"google"` was
defined as the default provider.



## &lt;firebase-document&gt;

The firebase-document element is an easy way to interact with a firebase
Expand All @@ -83,8 +86,6 @@ and stored.
Set this configuration by adding a `<firebase-app>` element anywhere in your
app.



## &lt;firebase-query&gt;

`firebase-query` combines the given properties into query options that generate
Expand Down Expand Up @@ -122,4 +123,27 @@ Polymer({
</script>
```

## Polymer.FirestoreMixin

A class mixin that provides Cloud Firestore bindings to your Polymer elements.
Import `firebase-firestore-mixin.html` to make the mixin available.

Example usage:

```js
class MyElement extends Polymer.FirestoreMixin(Polymer.Element) {
// ...
static get properties() {
return {
user: {
type: Object,
doc: 'users/{uid}'
},
messages: {
type: Array,
collection: 'users/{uid}/messages'
}
}
}
}
```
Loading