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): Filter typing. Filter.or & Filter.and can accept each other #7904

Merged
merged 4 commits into from
Jul 16, 2024

Conversation

russellwheatley
Copy link
Member

Description

Related issues

fixes #7850

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:

Copy link

vercel bot commented Jul 15, 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 Jul 16, 2024 10:58am

Lyokone
Lyokone previously approved these changes Jul 15, 2024
Copy link
Collaborator

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

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

This is divergent from the type system firebase-js-sdk uses, QueryFilterConstraint should be composed of QueryCompositeFilterConstraint already, and not need a change.

Current def of QueryFilterConstraint should be changed/renamed similar to upstream QueryFieldFilterConstraint then QueryFilterConstraint is composed of both of them...

https://github.com/firebase/firebase-js-sdk/blob/84fe88079842d2840a10eccc865c78bca2653f35/packages/firestore/src/lite-api/query.ts#L356-L392

I always look at judge typing changes by looking through firebase-js-sdk until I find their declarations and then seeing whether we are getting closer or father away from what they're doing - goal being to do exactly what they are doing unless we have some react-native-specific reason to deviate ?

@mikehardy mikehardy added the Workflow: Waiting for User Response Blocked waiting for user response. label Jul 15, 2024
Copy link
Collaborator

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

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

Great - this looks like it has a lot more fidelity with the firebase-js-sdk type system and should allow and/or to also accept and/or

@mikehardy mikehardy merged commit f6c12ec into main Jul 16, 2024
19 checks passed
@mikehardy mikehardy deleted the firestore-7850 branch July 16, 2024 17:00
@mikehardy mikehardy removed the Workflow: Waiting for User Response Blocked waiting for user response. label Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[🐛] 🔥Filter.and and Filter.or should be able to accept Filter.and or Filter.or as their argument
3 participants