Attempt to use firebase 3.0#15
Closed
rogeriochaves wants to merge 3 commits into
Closed
Conversation
| ref = firebase.database(); | ||
| break; | ||
| case 'ref': | ||
| ref = getRefStep (rest) .ref (head._1); |
There was a problem hiding this comment.
Why the spaces after function names?
Author
There was a problem hiding this comment.
idk, that's the way thomas was doing ¯\_(ツ)_/¯
Owner
There was a problem hiding this comment.
That's my style for JS code.
I would appreciate if contributors would stick the style of the existing code.
Owner
|
@rogeriochaves thank you very much for your contribution. Will review it ASAP. |
Author
|
@ThomasWeiser it's not really a valuable code contribution, I opened this PR more for the discussion of what path will we follow |
ThomasWeiser
added a commit
that referenced
this pull request
Mar 5, 2017
As suggested by Rogério Chaves: #15 (comment) Pros: - No need to patch Firebase script - Faster loading from CDN / cache / parallel chunk. - Can upgrade firebase for non-breaking changes without changing ElmFire. - More flexibility while developing new ElmFire version Cons: - ElmFire is not self-contained any more. - User is now responsibly for compatibility of the version of included firebase.js script. This is a preliminary change during development. We may change back to included Firebase script for published versions of ElmFire. Needs to be discussed with community.
Owner
|
As per your suggestion, firebase.js script is now to be included separately. For pros and cons see the commit msg. Please direct API discussions to #16 or separate issues/PRs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
So, first of all, I really needed this project going, so I decided to help, then I noted that this is a lot to maintain, congratulations for the awesome work!
What I did was changing the example and use it to test if the stuff worked. Auth was not working, so I needed to upgrade to Firebase 3.0.
But I've had some problems upgrading the javascript, because firebase 3.0 doesn't work when bundled inside something that uses
"use strict", as elm does, check it out: https://groups.google.com/forum/#!topic/firebase-talk/gFtK1YoRUoESo I've decided to delete firebase and rely on the global available one, and found out that this might be a much better approach, because:
Going forward, I've realized that the API must change, we have to pass more data than the database url (apiKey, authDomain, databaseURL, storageBucket, messagingSenderId now), and we have to instantiate it without child paths, we could have something like:
Then, I don't see a reason why the elm api shouldn't just mimic the js api, we could use it like this: