Skip to content

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

Merged
merged 4 commits into from
May 1, 2019
Merged

Conversation

schmidt-sebastian
Copy link
Contributor

@schmidt-sebastian schmidt-sebastian commented Apr 26, 2019

Note: To be merged into next major release.

Copy link
Contributor

@mikelehen mikelehen left a comment

Choose a reason for hiding this comment

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

LGTM with nits (sorry).

settings.synchronizeTabs !== undefined
? settings.synchronizeTabs
: settings.experimentalTabSynchronization,
DEFAULT_SYNCHRONIZE_TABS
Copy link
Contributor

Choose a reason for hiding this comment

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

Way to go naming the default correctly ahead of time!

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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? :)

if (settings) {
if (settings.experimentalTabSynchronization !== undefined) {
log.error(
'The `experimentalTabSynchronization` setting has been renamed to ' +
Copy link
Contributor

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 '

Copy link
Contributor Author

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.

if (settings.experimentalTabSynchronization !== undefined) {
log.error(
'The `experimentalTabSynchronization` setting has been renamed to ' +
'`synchronizeTabs`. In a future release, the setting will be removed ' +
Copy link
Contributor

Choose a reason for hiding this comment

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

extra space in setting will

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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.

log.error(
'The `experimentalTabSynchronization` setting has been renamed to ' +
'`synchronizeTabs`. In a future release, the setting will be removed ' +
'and it is recommended that you remove it from your ' +
Copy link
Contributor

Choose a reason for hiding this comment

The 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:

In a future release, 'experimentalTabSynchronization' will be removed, so you should update your firestore.enablePersistence() call to use 'synchronizeTabs' now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, that works and reduces code duplication :)

@schmidt-sebastian
Copy link
Contributor Author

Back to you Mike for merging! Thanls

@mikelehen
Copy link
Contributor

cc/ @Feiyang1 Another change for the next release...

@Feiyang1 Feiyang1 merged commit a0605e6 into master May 1, 2019
@Feiyang1 Feiyang1 deleted the mrschmidt-renamesetting branch May 1, 2019 23:18
@firebase firebase locked and limited conversation to collaborators Oct 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants