-
Notifications
You must be signed in to change notification settings - Fork 2k
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
SiteSettings: Add timezone section to general settings. #4226
Conversation
0b01813
to
6fe8b39
Compare
6fe8b39
to
266ec01
Compare
if ( this.state.isOpen ) { | ||
this.closeDropdown(); | ||
} | ||
|
||
if ( this.props.initialSelected !== nextProps.initialSelected ) { |
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.
What if the initialSelected
prop changes after the user has made a selection? Should we retain the user's selection rather than overriding it? I'd be annoyed if I had to make my selection again. It looks like state.selected
will be undefined until a selection is made, so could we add a check for typeof this.state.selected === 'undefined'
before we setState
?
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.
👍 smart
8a30208
to
f43efb7
Compare
/> | ||
|
||
<FormSettingExplanation> | ||
{ this.translate( 'Choose a city in the same timezone as you.' ) } |
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.
simpler: Choose a city in your timezone.
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.
👍 just FYI it was copied from wp-admin
f43efb7
to
6690b4e
Compare
6690b4e
to
8a1354e
Compare
Looks and works great for me! |
thanks @rralian |
Related issue: #3902
This PR adds a
timezones
dropdown to general settings which allows to the user customize the timezone of his site.Testing
Select your testing site and go to general settings page. The url should be something like http://calypso.localhost:3000/settings/general/
Select a timezone from the dropdown and save the site
The previous timezone should be there after a hard-refresh
Go to "Create a new post", open the post schedule component and pay attention to the timezone section. The current site timezone should be there with the difference in hours between you.