-
Notifications
You must be signed in to change notification settings - Fork 948
Rename multi-tab setting to synchronizeTabs #1728
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -398,14 +398,30 @@ export class Firestore implements firestore.FirebaseFirestore, FirebaseService { | |
'any other methods on a Firestore object.' | ||
); | ||
} | ||
|
||
let synchronizeTabs = false; | ||
|
||
if (settings) { | ||
if (settings.experimentalTabSynchronization !== undefined) { | ||
log.error( | ||
'The `experimentalTabSynchronization` setting has been renamed to ' + | ||
'`synchronizeTabs`. In a future release, the setting will be removed ' + | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. extra space in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ugh, I thought I fixed this before sending this out. It's fixed now. |
||
'and it is recommended that you remove it from your ' + | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I might be overly paranoid but I worry "the setting will be removed" and "recommend that you remove it" could potentially be ambiguous and lead people to remove the setting entirely. Perhaps:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, that works and reduces code duplication :) |
||
'firestore.enablePersistence() call now.' | ||
); | ||
} | ||
synchronizeTabs = objUtils.defaulted( | ||
settings.synchronizeTabs !== undefined | ||
? settings.synchronizeTabs | ||
: settings.experimentalTabSynchronization, | ||
DEFAULT_SYNCHRONIZE_TABS | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Way to go naming the default correctly ahead of time! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do you assume the API proposal wasn't based on this name? :) |
||
); | ||
} | ||
|
||
return this.configureClient( | ||
new IndexedDbPersistenceSettings( | ||
this._config.settings.cacheSizeBytes, | ||
settings !== undefined && | ||
objUtils.defaulted( | ||
settings.experimentalTabSynchronization, | ||
DEFAULT_SYNCHRONIZE_TABS | ||
) | ||
synchronizeTabs | ||
) | ||
); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably super nitty but I don't think we usually use backticks within log messages. I'd remove or replace with
'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't like the message without any quoting, but I am fine just using single quotes.