Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Firebase 2.0.x #23

Closed
wants to merge 13 commits into from
Closed

Firebase 2.0.x #23

wants to merge 13 commits into from

Conversation

chuckh
Copy link
Contributor

@chuckh chuckh commented Nov 10, 2014

This pull request does the following:

  • Updates bower.json to Firebase 2.0.x
  • Changed name() to key()
  • Added limitToFirst and limitToLast
  • Added limit depreciated comment and message
  • Added orderByChild
  • Added orderByKey
  • Added orderByPriority
  • Added equalTo
  • Added to firebase-element demo examples using Dinosaur Facts from Firebase
  • Changed references to platform.js to webcomponents.js

This resolves #18.

I have signed the Google Contributor License Agreement

AgreementName Name Date Signed
Google Individual CLA Chuck Horton Nov 06, 2014 12:52 PST

Deprecated name() in favor of key() for Firebase 2.0.0.
Changes in priority now raise a child_changed event in addition to a
child_moved event. For Firebase 2.0.0
Also added demo content limitToFirst and limitToLast
Add to firebase.html demo demonstrate how these should work. Not all
are working correctly yet.
@chuckh chuckh mentioned this pull request Nov 10, 2014
@ebidel
Copy link

ebidel commented Nov 10, 2014

@nevir @kevinpschaaf who owns this element and can take a look? @chuckh da man!

@mbleigh
Copy link
Contributor

mbleigh commented Nov 11, 2014

👍 :shipit: please!

@mbleigh
Copy link
Contributor

mbleigh commented Nov 14, 2014

@chuckh can you update to be mergeable from master and @nevir @ebidel @kevinpschaaf can somebody get this thing merged? Very needed. 👾

@kevinpschaaf
Copy link
Contributor

Merged this in 45df802. Note, while resolving the conflict with master I messed up the merge such that you didn't get credit for it in the commit history, sorry :(.

FYI, I didn't take the change to demo.html; it was a little verbose and non-DRY for our taste, and I wasn't sure about the big chunk of code that was calling into the Firebase API directly, but in the interest of time wanted to get the main changes merged to unblock the other users. Feel free to open another PR with the demo update alone and we can discuss it there.

Thanks again for the contribution, this is great!

@mbleigh
Copy link
Contributor

mbleigh commented Nov 15, 2014

👏 thanks! @chuckh you rock.

@chuckh
Copy link
Contributor Author

chuckh commented Nov 17, 2014

@kevinpschaaf glad you where able to merge the changes into the master. I understand why you did not include the demo additions. I do think the demo does need more examples. I found that there are a few nuances with using the firebase-element and the advance query abilities for Firebase 2.0.x:

  • When you use OrderByChild or OrderByPriority the objects stored in data are not ordered but the child events are fired in order.
  • When you use LimitToFirst, limitToLast, StartAt, EndAt the objects stored in data are filtered, but the objects are not ordered but the child events are fired in order.
  • To show a list of data in order (sorted) you have to use query and child_added events to achieve this.

I was trying to demonstrates those nuances. I will work on another pull request to add more demos being dryer. Let me know if you have any suggestions on how to handle this better. Maybe a demo example of using core-list with firebase-element using OrderByChild and EqualTo.

Thanks for the kudos @mbleigh and @ebidel.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Firebase New Enhanced Query Support
4 participants