Skip to content

WIP: RxFire #933

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

Merged
merged 28 commits into from
Jun 26, 2018
Merged

WIP: RxFire #933

merged 28 commits into from
Jun 26, 2018

Conversation

davideast
Copy link
Member

Discussion

RxJS + Firebase = 🔥🔥🔥

WIP. Will provide a deep description soon.

@firebase firebase deleted a comment from googlebot Jun 15, 2018
Copy link
Contributor

@jshcrowthe jshcrowthe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build Feedback

  1. .gitignore could use some more comments explaining some of the rationale behind the .d.ts ignores
  2. Delete .npmignore in favor of a pkg.files in the package.json
  3. Why does packages/rxfire/index.ts exist?
  4. Why does packages/rxfire/test/index.ts exist?
  5. Set pkg.private in the package.json to true for now

Code Feedback

  1. As a matter of convention should we prepending all of our streams w/ $?
  2. We are using indexOf as Array.prototype.includes can we not do that (we have varying comparisons throughout the codebase for this)?

@@ -0,0 +1,5 @@
{
"name": "rxfire-auth",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Call this rxfire/auth

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@@ -0,0 +1,69 @@
{
"name": "rxfire",
"version": "0.0.2",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just call this 0.0.0 for now

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

/**
* Complete Package Builds
*/
const completeBuilds = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete this, it's not needed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

*/
const GLOBAL_NAME = 'rxfire';

const coreBuild = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete this, not relevant.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

import storagePkg from './storage/package.json';
import functionsPkg from './functions/package.json';

const pkgsByName = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you aren't compiling everything here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

* @param change
*/
function combineChange<T>(
combined: firestore.DocumentChange[],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's be more descriptive of what this actually is in this name (i.e. the full array of changes and a single change to process)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

* @param combined
* @param change
*/
function combineChange<T>(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function name isn't indicative of what is actually being done here, let's think of a new name?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

}

/**
* Return a stream of document changes on a query. These results are in sort order.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is inaccurate, we return a stream of DocumentSnapshots not changes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.


/**
* Create a stream of changes as they occur it time. This method is similar
* to stateChanges() but it collects each event in an array over time.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stateChanges doesn't exist?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's now docChanges()

export function putString(
ref: storage.Reference,
data: string,
format?: storage.StringFormat,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't used in the body? Perhaps you meant ref.putString?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

Copy link
Contributor

@jshcrowthe jshcrowthe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple more comments on the root package.json.

Rest is looking good.

"./firestore",
"./functions",
"./storage",
"./package.json",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed, the root package.json is included by default.

@@ -67,6 +68,18 @@
},
"typings": "dist/index.d.ts",
"files": [

"./auth",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like for all of these dirs you need two things:

  1. The package.json
  2. The dist dir.

Can we not include source here and instead just do that?

Copy link
Contributor

@jshcrowthe jshcrowthe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guess I wasn't fully clear, including the entire directory for auth, firestore, functions, and storage, is not necessary. Let's only include the package.json and the dist dir, inside each of those directories.

@davideast davideast merged commit d134c39 into master Jun 26, 2018
@davideast davideast deleted the rxfire-infra branch June 26, 2018 23:35
@firebase firebase locked and limited conversation to collaborators Oct 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants