Skip to content

[cloud_firestore_web] Ensure Query pagination methods encode values.#2166

Merged
ditman merged 2 commits into
firebase:masterfrom
ditman:firestore-web-timestamps
Mar 19, 2020
Merged

[cloud_firestore_web] Ensure Query pagination methods encode values.#2166
ditman merged 2 commits into
firebase:masterfrom
ditman:firestore-web-timestamps

Conversation

@ditman

@ditman ditman commented Mar 13, 2020

Copy link
Copy Markdown
Contributor

Description

This change ensures that the package:firestore Query objects are created with properly encoded values when done so from the start/end (pagination) methods.

This also adds some Timestamps to the unit tests to verify the behavior of Timestamp -> DateTime.

(There are some integration tests in cloud_firestore that cover this behavior further.)

Related Issues

Fixes #2153

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • If the pull request affects only one plugin, the PR title starts with the name of the plugin in brackets (e.g. [cloud_firestore])
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
  • I updated CHANGELOG.md to add a description of the change.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • No, this is not a breaking change.

This change ensures that the package:firestore Query objects are created
with properly encoded values when done so from the start/end
(pagination) methods.

This also adds some Timestamps to the unit tests to verify the behavior of
Timestamp -> DateTime.

There are some integration tests in cloud_firestore that cover this
behavior further.

Fixes #2153
@ditman ditman requested a review from collinjackson March 13, 2020 02:39
@ditman ditman self-assigned this Mar 13, 2020
@ditman

ditman commented Mar 13, 2020

Copy link
Copy Markdown
Contributor Author

/cc @amrfarid140

@ditman

ditman commented Mar 13, 2020

Copy link
Copy Markdown
Contributor Author

(The push above is unrelated. I didn't add a version bump because it's just a minor fix in a test file to appease the analyzer, I'm not planning in publishing that)

@amrfarid140

Copy link
Copy Markdown
Contributor

Ah! this slipped through the cracks when we did it for mobile. Good catch @ditman .

@ditman ditman requested a review from harryterkelsen March 13, 2020 18:35
@firebase firebase deleted a comment Mar 18, 2020
@firebase firebase deleted a comment Mar 18, 2020
@ditman

ditman commented Mar 19, 2020

Copy link
Copy Markdown
Contributor Author

I'm merging this, I repeated the last failing check and it passed, and there's 2 approvals.

@ditman ditman merged commit bd9bcd4 into firebase:master Mar 19, 2020
@ditman ditman deleted the firestore-web-timestamps branch March 19, 2020 23:31
@firebase firebase locked and limited conversation to collaborators Aug 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[cloud_firestore] error-Invalid argument (dartObject): Could not convert: Instance of 'Timestamp'

5 participants