Skip to content

Move parent/doc/collection back #3679

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 5 commits into from
Aug 27, 2020
Merged

Conversation

schmidt-sebastian
Copy link
Contributor

@schmidt-sebastian schmidt-sebastian commented Aug 25, 2020

As part of go/firestore-next-amendment-amendment, we decided to make parent once again a property of CollectionReference and DocumentReference and also to re-add doc() and collection() method to these classes (with the old methods staying as is).

Tree-shaking will be improved with #3678

@changeset-bot
Copy link

changeset-bot bot commented Aug 25, 2020

💥 No Changeset

Latest commit: d2fc594

Merging this PR will not cause any packages to be released. If these changes should not cause updates to packages in this repo, this is fine 🙂

If these changes should be published to npm, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Aug 25, 2020

Binary Size Report

Affected SDKs

  • @firebase/firestore/exp

    Type Base (96076f0) Head (d73181c) Diff
    browser 189 kB 189 kB +352 B (+0.2%)
    main 468 kB 469 kB +944 B (+0.2%)
    module 189 kB 189 kB +352 B (+0.2%)
    react-native 189 kB 189 kB +352 B (+0.2%)
  • @firebase/firestore/lite

    Type Base (96076f0) Head (d73181c) Diff
    browser 64.7 kB 65.1 kB +336 B (+0.5%)
    main 141 kB 142 kB +944 B (+0.7%)
    module 64.7 kB 65.1 kB +336 B (+0.5%)
    react-native 64.8 kB 65.2 kB +336 B (+0.5%)
  • @firebase/rules-unit-testing

    Type Base (96076f0) Head (d73181c) Diff
    main 7.24 kB 7.28 kB +37 B (+0.5%)

Test Logs

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Aug 25, 2020

Size Analysis Report

Affected Products

No changes between base commit (29bac5e) and head commit (3b23694).

Test Logs

Copy link

@thebrianchen thebrianchen left a comment

Choose a reason for hiding this comment

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

lgtm

} else {
return new DocumentReference(
this.firestore,
/* converter= */ null,

Choose a reason for hiding this comment

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

nit: Can you standardize the constructor argument order for DocumentReference and CollectionReference?

Choose a reason for hiding this comment

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

I missed this in an earlier review when you made the converter nullable, but the converter in the CollectionReference constructor can be readonly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done (changed CollectionReference to match). As for readonly, that is done in the parent class Query and we rely on the Query's converter property here.

functionName: string,
argumentName: string,
argument?: string
): asserts argument is string {

Choose a reason for hiding this comment

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

ooooooh this is fancy :)

@schmidt-sebastian schmidt-sebastian merged commit 70537a6 into master Aug 27, 2020
@firebase firebase locked and limited conversation to collaborators Sep 27, 2020
@schmidt-sebastian schmidt-sebastian deleted the mrschmidt/renames-parent branch November 9, 2020 22:36
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.

4 participants