Skip to content

make waitForPendingWrites public #2109

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

Conversation

wu-hui
Copy link
Contributor

@wu-hui wu-hui commented Aug 23, 2019

No description provided.

Copy link
Contributor

@schmidt-sebastian schmidt-sebastian left a comment

Choose a reason for hiding this comment

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

Can you add a Changelog entry? Thanks!

@wu-hui
Copy link
Contributor Author

wu-hui commented Aug 26, 2019

Can you add a Changelog entry? Thanks!

I did add a CHANGELOG entry, now also fixed missing versions of previous entries.

@wu-hui wu-hui assigned schmidt-sebastian and unassigned wu-hui Aug 26, 2019
@@ -1,23 +1,41 @@

# Unreleased
- [feature] Added a `waitForPendingWrites` method to `Firestore` class which
Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you for the cleanup. Much appreciated! If you want to, you could include what you think the next version number should be - in this case, since we are adding a new feature, we should bump the minor version (to 1.5.0)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You mean bump the version in package.json?

@@ -1,23 +1,41 @@

# Unreleased
- [feature] Added a `waitForPendingWrites` method to `Firestore` class which
allows users to wait on a promise that resolves when all pending writes
Copy link
Contributor

Choose a reason for hiding this comment

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

s/to wait on a promise that resolves when all pending/to wait until all pending/

Copy link
Contributor

Choose a reason for hiding this comment

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

Please remember to fix this since it is a bit shorter and no loss of information.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, done.

@@ -1,23 +1,41 @@

# Unreleased
- [feature] Added a `waitForPendingWrites` method to `Firestore` class which
Copy link
Contributor

Choose a reason for hiding this comment

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

s/a waitForPendingWrites method to Firestore/Firestore.waitForPendingWrites()/

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.

@@ -29,7 +47,7 @@
that you update your call to `enablePersistence()`. Firestore logs an error
if you continue to use `experimentalTabSynchronization`.
- [feature] You can now query across all collections in your database with a
given collection ID using the `FirebaseFirestore.collectionGroup()` method.
given collection ID using the `FirebaseFirestore.collis:openectionGroup()` method.
Copy link
Contributor

Choose a reason for hiding this comment

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

is:open? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, good catch.

@wu-hui wu-hui assigned schmidt-sebastian and unassigned wu-hui Aug 26, 2019
@@ -1,23 +1,41 @@

# Unreleased
- [feature] Added a `waitForPendingWrites` method to `Firestore` class which
allows users to wait on a promise that resolves when all pending writes
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remember to fix this since it is a bit shorter and no loss of information.

@@ -1,6 +1,6 @@
{
"name": "@firebase/firestore",
"version": "1.4.10",
"version": "1.5.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry I think there was a misunderstanding - the JS team updates these numbers. We can make their lives easier if we hint what version number we want in the changelog. What I intended was to change "Unreleased" to "Unreleased (1.5.0).". This is completely optional but please do revert the change in this file.

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.

@wu-hui wu-hui removed their assignment Aug 27, 2019
* The returned Promise resolves immediately if there are no outstanding writes. Otherwise, the
* Promise waits for all previously issued writes (including those written in a previous app
* session), but it does not wait for writes that were added after the method is called. If you
* wish to wait for additional writes, you have to call `waitForPendingWrites()` again.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: we usually strive for an informal tone, preferring "want" over "wish."

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.

* The returned Promise resolves immediately if there are no outstanding writes. Otherwise, the
* Promise waits for all previously issued writes (including those written in a previous app
* session), but it does not wait for writes that were added after the method is called. If you
* wish to wait for additional writes, you have to call `waitForPendingWrites()` again.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggest just "additional writes, call waitForPendingWrites() again."

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.

@@ -1,23 +1,41 @@

# Unreleased
# Unreleased (1.5.0)
- [feature] Added a `Firestore.waitForPendingWrites()` method which
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should be the restrictive "that," unless there other things the method does and we're just mentioning this one.

So, "that allows users to wait..."

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.

Copy link
Contributor

@egilmorez egilmorez left a comment

Choose a reason for hiding this comment

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

Added some very minor style nits for you to look at. Thanks!

@wu-hui wu-hui assigned Feiyang1 and unassigned wu-hui Aug 27, 2019
Copy link
Contributor

@egilmorez egilmorez left a comment

Choose a reason for hiding this comment

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

Thanks!

@wu-hui wu-hui merged commit 4bccd8f into master Aug 27, 2019
@firebase firebase locked and limited conversation to collaborators Oct 8, 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