-
Notifications
You must be signed in to change notification settings - Fork 27
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
Chore: support setting timezone for cronjob #1664
base: main
Are you sure you want to change the base?
Conversation
b3c01ee
to
b856f93
Compare
<TimezoneSelection | ||
label="Timezone" | ||
onChange={(timezone) => | ||
form.setValue("timezone", timezone, { | ||
shouldValidate: true, | ||
shouldDirty: true, | ||
}) | ||
} | ||
value={form.watch("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.
can you use ControlledCustomInput
here? it provides some useful accessibility features
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.
It also provides a standard method for providing a label, so you can omit that from TimezoneSelection.tsx
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.
@ryanhopperlowe ok, I did some effort and have no idea how to use it outside a form... 🤷
maybe you can take a look after it. It is used in a different place where form is not provided.
b856f93
to
9b70be6
Compare
@ryanhopperlowe changes pushed |
eeb9207
to
664c1a8
Compare
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.
thank you!!
Per Darren's UX suggestion: We are going to change the UX so that user doesn't need to pick timezone in current UX. Browser will by default send its current timezone and backend will save it and use for cronjob. It will only display the timzeone in UI when browser's current timezone is different than the one set in database. |
I changed the UX to match what we have discussed for disabling selection of a timezone now. |
The layout for the schedulers seems to be shifted depending on the existence of a timezone. Looks a bit wonky |
@ryanhopperlowe yeah I agree... don't have a a clear solution for that. It is a bit weird if you have one entry for the same timezone but one different one in a different timezone. |
e48b190
to
48e466a
Compare
Signed-off-by: Daishan Peng <[email protected]>
48e466a
to
1b38e29
Compare
Signed-off-by: Daishan Peng <[email protected]>
cf99b27
to
a6ea07a
Compare
#1480
Adding support to run cronjob in a specific timezone. It will default to server's own timezone if it is not set in API. The browser will now set the user's own timezone as default but user will be able to change it.
https://www.loom.com/share/052bd151e46b4c1cb37e28b281687a50