listenbrainz-server icon indicating copy to clipboard operation
listenbrainz-server copied to clipboard

Timezone support in react

Open YouzhiL opened this issue 2 years ago • 3 comments

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

  1. Modify the view function select_timezone to support react based UI. No more flask forms needed.
  2. Create user-setting folder in static/js/src.
  3. Implement a drop-down for user to select the local timezones.
  4. Add APIService function resetUserTimezone to fetch response from backend API.
  5. Add backend API reset_timezone to reset timezone.

YouzhiL avatar Jul 15 '22 04:07 YouzhiL

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

Line 26:50: W291 trailing whitespace

Comment last updated at 2022-08-24 23:30:42 UTC

pep8speaks avatar Jul 15 '22 04:07 pep8speaks

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?

mayhem avatar Jul 18 '22 11:07 mayhem

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.

amCap1712 avatar Aug 24 '22 09:08 amCap1712