discourse/test/javascripts/models
Martin Brennan b8b29e79ad
FIX: Improve user timezone saving (#9230)
Based on issues identified in https://meta.discourse.org/t/improved-bookmarks-with-reminders/144542/20

* Implement the resolvedTimezone() function on the user model where we return the user's timezone if it has been set, or we guess it using moment and save it to the user using an update call if it has not yet been set. This covers the cases of users who do not log out/in often who will not get their timezone set via login. This also makes sure the guess + save is done in a non-obtrusive way not on every page -- only when it is needed.

* Before if a user's timezone was blank when they visited their profile page we were autofilling the dropdown with the guessed timezone from moment. However this was confusing as it would appear you have that timezone saved in the DB when you really didn't. Now we do not autofill the dropdown and added a button to automatically guess the current timezone to make everything more explicit.
2020-03-24 11:39:09 +10:00
..
badge-test.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
category-test.js.es6 FIX: Make category slug validation less strict (#8915) 2020-02-11 17:01:12 +02:00
composer-test.js.es6 Rename 'target usernames' with 'target recipients' in Composer (#8606) 2020-01-07 15:33:48 +02:00
email-log-test.js.es6 FIX: ensure URLs include subfolder in admin emails UI 2018-08-08 16:48:03 -04:00
group-test.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
invite-test.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
nav-item-test.js.es6 DEV: Remove some extra `Discourse.Site` uses 2019-11-13 16:00:58 -05:00
post-stream-test.js.es6 DEV: Clean up Ember imports (#8979) 2020-03-06 23:49:28 +01:00
post-test.js.es6 DEV: Use async functions in tests (#9087) 2020-03-02 21:20:19 +01:00
report-test.js.es6 FIX: Add aria-labels to topic list items (#9048) 2020-03-02 14:28:54 -05:00
rest-model-test.js.es6 DEV: adds afterCreate/beforeUpdate hooks to rest models (#9253) 2020-03-23 16:58:40 +01:00
result-set-test.js.es6 DEV: Use async functions in tests (#9087) 2020-03-02 21:20:19 +01:00
session-test.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
site-test.js.es6 DEV: Remove some extra `Discourse.Site` uses 2019-11-13 16:00:58 -05:00
staff-action-log-test.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
store-test.js.es6 DEV: Use async functions in tests (#9087) 2020-03-02 21:20:19 +01:00
topic-details-test.js.es6 FIX: Missing User objects in Utilities 2019-11-13 15:55:32 -05:00
topic-test.js.es6 FIX: show error message if the topic deletion fails (#8723) 2020-01-16 00:58:03 +05:30
topic-tracking-state-test.js.es6 FIX: Include sub-sub-categories in new/unread counts (#8710) 2020-01-17 10:02:57 +00:00
user-action-test.js.es6 REFACTOR: Remove `Discourse.UserAction` from code 2019-11-08 12:52:39 -05:00
user-badge-test.js.es6 DEV: Use async functions in tests (#9087) 2020-03-02 21:20:19 +01:00
user-drafts-test.js.es6 FIX: Missing User objects in Utilities 2019-11-13 15:55:32 -05:00
user-stream-test.js.es6 FIX: Missing User objects in Utilities 2019-11-13 15:55:32 -05:00
user-test.js.es6 FIX: Improve user timezone saving (#9230) 2020-03-24 11:39:09 +10:00