listenbrainz-server
listenbrainz-server copied to clipboard
Timezone support in react
Problem
The current version of timezone-support function is implemented in Flask/html.
Solution
This pull request re-implement timezone-support function in React/js.
Action
- Modify the view function
select_timezone
to support react based UI. No more flask forms needed. - Create
user-setting
folder in static/js/src. - Implement a drop-down for user to select the local timezones.
- Add APIService function
resetUserTimezone
to fetch response from backend API. - Add backend API
reset_timezone
to reset timezone.
Hello @YouzhiL! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Line 26:50: W291 trailing whitespace
- In the file
listenbrainz/webserver/views/user_settings_api.py
:
Line 26:50: W291 trailing whitespace
Comment last updated at 2022-08-24 23:30:42 UTC
Hi!
I've run this, but when I select a new timezone, it doesn't save the change. Should it be doing that now or am I jumping the gun?
Thanks for adding the new tests. Those look good to me. But the unresolved comment above to add an assert for success alert still needs to fixed.