topcoder-platform / taas-app

TaaS App Front End
3 stars 24 forks source link

fix: additional fixes #515

Closed infinitycoders05 closed 3 years ago

infinitycoders05 commented 3 years ago

This PR contains these addition fixes,

  1. If we cannot find the client timezone in the list, then select the first timezone using user timezone offset and select the first timezone in the list with such offset, see screenshot https://monosnap.com/file/nHG7C9mCjUT1S96rwbWDirUWcDBzuN(Fixed)
  2. There are multiple warnings from React in the browser console which are caused by the code from the submission, please fix them: (Fixed)
infinitycoders05 commented 3 years ago

Thank you @infinitycoders05.

Nice idea of adding not listed timezone.

There is only one issue left, when I open available time screen, there is still one props warning is shown https://monosnap.com/file/8Ev6aFLopWVbOUrZL0mpMIBBtZW21P

Also, it's alway better to use some unique ids for key when possible, see https://en.reactjs.org/docs/lists-and-keys.html#keys. Please, check comments below.

Thank you @infinitycoders05.

Nice idea of adding not listed timezone.

There is only one issue left, when I open available time screen, there is still one props warning is shown https://monosnap.com/file/8Ev6aFLopWVbOUrZL0mpMIBBtZW21P

Also, it's alway better to use some unique ids for key when possible, see https://en.reactjs.org/docs/lists-and-keys.html#keys. Please, check comments below.

The select warning is fixed. can you please check now?

infinitycoders05 commented 3 years ago

@infinitycoders05 after the last update looks like something got broken and there are more warning and errors in console, see demo video https://monosnap.com/file/RQ8kdMnBMoJeH5t3ZLwZL5dIgvH1IA.

image

image

image

I couldn't see these errors. which user did you login to? also which browser do you use?

maxceem commented 3 years ago

I couldn't see these errors

I'm trying to test everything again.

which user did you login to? also which browser do you use?

I've tried with 2 user max.admin and pshah_manager. Both giving me the same errors.

Browser Google Chrome Version 94.0.4606.81 (Official Build) (x86_64) on macOS 11.6.

infinitycoders05 commented 3 years ago

@infinitycoders05 after the last update looks like something got broken and there are more warning and errors in console, see demo video https://monosnap.com/file/RQ8kdMnBMoJeH5t3ZLwZL5dIgvH1IA. image image image

I couldn't see these errors. which user did you login to? also which browser do you use?

Checked it in chrome and firefox. I could not reproduce these warnings. Can you please give me the exact steps to reproduce this? thanks!

infinitycoders05 commented 3 years ago

@infinitycoders05 after the last update looks like something got broken and there are more warning and errors in console, see demo video https://monosnap.com/file/RQ8kdMnBMoJeH5t3ZLwZL5dIgvH1IA. image image image

I couldn't see these errors. which user did you login to? also which browser do you use?

This is what I see in the console logs. 2 errors are related to network and 1 is related to stripe.

Screenshot 2021-10-18 at 15 48 04
maxceem commented 3 years ago

How it do it:

maxceem commented 3 years ago

btw, if I go to previous commit 032f210b281ac1b8b3c0708f4cd43569e28ee7f4 then it's not got broken, just 2 warnings https://monosnap.com/file/a5hEAKU2h1Zf1MM01wFjvEkZzSH8OI.

But when I use the latest commit 2c3178a79151c4055b21809c7d16ea9ed798eff6 with latest fixes it got broken and more errors and warnings are shown.

maxceem commented 3 years ago

@infinitycoders05 I re-run code locally a bit different way. There is only one error, but it's there, see demo video https://monosnap.com/file/WrpnQstp4hr4hUSGCkhgM3RM62VYdn

user pshah_manager timezone GMT+3 Europe/Kiev image

infinitycoders05 commented 3 years ago

@infinitycoders05 I re-run code locally a bit different way. There is only one error, but it's there, see demo video https://monosnap.com/file/WrpnQstp4hr4hUSGCkhgM3RM62VYdn

user pshah_manager timezone GMT+3 Europe/Kiev image

So this means, the other errors are resolved only the undefined error happened right?

I tried to reproduce it for the same candidate but it isn't reproducible. but still I made a null check at on change event. can you please check it and let me know if this error still happens? Thanks!

maxceem commented 3 years ago

I dive a bit into this issue, I guess you couldn't reproduce because your timezone is on the list while mine timezone is not on the list which leads to another condition. That issue was cause by calling onChange(browserTimezone) which is the same as onChangeTimezone(event) and browserTimezone doesn't have target.value like event.

image

PR is accepted.