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

fix(firestore): handle parent correctly in doc and collection #7922

Closed

Conversation

ycmjason
Copy link

Description

Previously, doc() and collection() assumed parent to be a Collection and Document respectively.

But I belive this is not the indended behaviour as we provided the overload for them to take in Collection | Document. See here.

This commit adds support to this.

Related issues

N/A

Release Summary

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
    • Yes
  • My change supports the following platforms;
    • Android
    • iOS
  • My change includes tests;
    • e2e tests added or updated in packages/\*\*/e2e
    • jest tests added or updated in packages/\*\*/__tests__
  • I have updated TypeScript types that are affected by my change.
  • This is a breaking change;
    • Yes
    • No

Test Plan


Think react-native-firebase is great? Please consider supporting the project with any of the below:

Previously, `doc()` and `collection()` assumed `parent` to be a Collection and Document respectively.

But I belive this is not the indended behaviour as we provided the overload for them to take in `Collection | Document`. See [here](https://github.com/invertase/react-native-firebase/blob/ad40ea2eb828a59451a619059bb4bef96277e23f/packages/firestore/lib/modular/index.d.ts#L213-L217).

This commit adds support to this.
Copy link

vercel bot commented Jul 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-firebase ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 14, 2024 10:02am

@CLAassistant
Copy link

CLAassistant commented Jul 21, 2024

CLA assistant check
All committers have signed the CLA.

@ycmjason ycmjason changed the title handle parent correctly in doc and collection fix: handle parent correctly in doc and collection Jul 21, 2024
@ycmjason ycmjason changed the title fix: handle parent correctly in doc and collection fix(firestore): handle parent correctly in doc and collection Jul 21, 2024
@russellwheatley
Copy link
Member

Hi @ycmjason , could you be explicit about what the issue is. i.e. code sample with expected behaviour + actual behaviour.

So I can understand the issue this is trying to solve. Would also be helpful to add e2e tests to test behaviour if it is indeed a bug.

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

Successfully merging this pull request may close these issues.

3 participants