feat(DT-3565): Schedules Redesign#3405
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
43fa679 to
23923a6
Compare
| <Loading /> | ||
| {:then { schedule, searchAttributes }} | ||
| <ScheduleFormView onConfirm={handleEdit} {schedule} {searchAttributes} /> | ||
| <ScheduleFormView |
There was a problem hiding this comment.
⚠️ Argument of type 'ISchedule | undefined' is not assignable to parameter of type 'ISchedule'.
| <ScheduleFormView onConfirm={handleEdit} {schedule} {searchAttributes} /> | ||
| <ScheduleFormView | ||
| onSubmit={handleEdit(schedule)} | ||
| {schedule} |
There was a problem hiding this comment.
⚠️ Type 'ISearchAttributes | null | undefined' is not assignable to type 'ISearchAttributes | undefined'.
|
23923a6 to
f6459bf
Compare
61bbcf7 to
b0bed58
Compare
| const body = await formDataToCreateScheduleRequest( | ||
| baseFormData({ specs: [{ type: 'cron', cronString: 'not a cron' }] }), | ||
| ); | ||
|
|
There was a problem hiding this comment.
⚠️ 'body.schedule.spec' is possibly 'undefined'.
| const body = await formDataToCreateScheduleRequest( | ||
| baseFormData({ specs: [{ type: 'interval', interval: '300s' }] }), | ||
| ); | ||
|
|
There was a problem hiding this comment.
⚠️ 'body.schedule.spec' is possibly 'undefined'.
| ], | ||
| }), | ||
| ); | ||
|
|
There was a problem hiding this comment.
⚠️ 'body.schedule.spec' is possibly 'undefined'.
| ], | ||
| }), | ||
| ); | ||
|
|
There was a problem hiding this comment.
⚠️ 'body.schedule.spec' is possibly 'undefined'.
| ], | ||
| }), | ||
| ); | ||
|
|
There was a problem hiding this comment.
⚠️ 'body.schedule.spec' is possibly 'undefined'.
| metadata: { encoding: 'json/plain' }, | ||
| data: '"hello"', | ||
| }); | ||
| // source schedule is untouched |
There was a problem hiding this comment.
⚠️ 'schedule.action' is possibly 'null' or 'undefined'.⚠️ 'schedule.action.startWorkflow' is possibly 'null' or 'undefined'.⚠️ 'schedule.action.startWorkflow.header' is possibly 'null' or 'undefined'.⚠️ 'schedule.action.startWorkflow.header.fields' is possibly 'null' or 'undefined'.
| } | ||
|
|
||
| return { | ||
| schedule_id: formData.name.trim(), |
There was a problem hiding this comment.
⚠️ Type '{ indexedFields: { indexedFields?: { [k: string]: IPayload; } | null | undefined; }; } | null' is not assignable to type 'ISearchAttributes | null | undefined'.
| workflowId: formData.workflowId, | ||
| workflowType: { name: formData.workflowType }, | ||
| taskQueue: { name: formData.taskQueue }, | ||
| input: payloads ? { payloads } : null, |
There was a problem hiding this comment.
⚠️ Type '{ indexedFields: { indexedFields?: { [k: string]: IPayload; } | null | undefined; }; } | null' is not assignable to type 'ISearchAttributes | null | undefined'.
| const header = await encodeHeaderFields(startWorkflow.header); | ||
|
|
||
| return { | ||
| schedule_id: scheduleId, |
There was a problem hiding this comment.
⚠️ Type '{ indexedFields: { indexedFields?: { [k: string]: IPayload; } | null | undefined; }; } | null' is not assignable to type 'ISearchAttributes | null | undefined'.
| taskQueue: { name: formData.taskQueue }, | ||
| ...(formData.editInput && { | ||
| input: payloads ? { payloads } : null, | ||
| }), |
There was a problem hiding this comment.
⚠️ Type '{ indexedFields: { indexedFields?: { [k: string]: IPayload; } | null | undefined; }; } | null' is not assignable to type 'ISearchAttributes | null | undefined'.
| submitPauseSchedule(reason, { | ||
| identity, | ||
| scheduleId, | ||
| namespace, |
There was a problem hiding this comment.
⚠️ Type 'boolean | undefined' is not assignable to type 'boolean'.
| class="flex select-all flex-wrap items-center gap-2 text-3xl" | ||
| data-testid="schedule-name" | ||
| > | ||
| <WorkflowStatus |
There was a problem hiding this comment.
⚠️ 'schedule.schedule' is possibly 'undefined'.⚠️ 'schedule.schedule.state' is possibly 'null' or 'undefined'.
| {schedule?.schedule?.action?.startWorkflow?.workflowType?.name} | ||
| <div class="flex items-center gap-2"> | ||
| <Link | ||
| class="block p-1" |
There was a problem hiding this comment.
⚠️ Type 'string | undefined' is not assignable to type 'string'.
| class="p-1 text-secondary" | ||
| onclick={(e) => { | ||
| copy( | ||
| e, |
There was a problem hiding this comment.
⚠️ Argument of type 'string | null | undefined' is not assignable to parameter of type 'string'.
| {$timestamp(schedule?.info?.createTime)} | ||
| </dd> | ||
| </div> | ||
|
|
There was a problem hiding this comment.
⚠️ 'schedule.info' is possibly 'null' or 'undefined'.
|
|
||
| <div class="flex w-full flex-col gap-4 xl:w-1/3"> | ||
| <ScheduleInputCard | ||
| {scheduleId} |
There was a problem hiding this comment.
⚠️ Type 'IPayloads | null | undefined' is not assignable to type 'IPayloads'.
| </div> | ||
| <PauseScheduleModal | ||
| {scheduleId} | ||
| {namespace} |
There was a problem hiding this comment.
⚠️ Type 'boolean | null | undefined' is not assignable to type 'boolean | undefined'.
| <DurationInput | ||
| id="interval-{uuid}" | ||
| inputClass="max-w-96" | ||
| label={translate('schedules.interval-label')} |
There was a problem hiding this comment.
⚠️ Type 'string | undefined' is not assignable to type 'string'.
| <DurationInput | ||
| id="phase-{uuid}" | ||
| inputClass="max-w-96" | ||
| label={translate('schedules.offset-heading')} |
There was a problem hiding this comment.
⚠️ Type 'string | undefined' is not assignable to type 'string'.
| placeholder="00" | ||
| suffix={translate('common.hours-abbreviated')} | ||
| error={!!$errors.specs?.[index]?.time?.hour?.[0]} | ||
| hintText={$errors.specs?.[index]?.time?.hour?.[0]} |
There was a problem hiding this comment.
⚠️ Type 'string | undefined' is not assignable to type 'string'.
| placeholder="00" | ||
| suffix={translate('common.minutes-abbreviated')} | ||
| error={!!$errors.specs?.[index]?.time?.minute?.[0]} | ||
| hintText={$errors.specs?.[index]?.time?.minute?.[0]} |
There was a problem hiding this comment.
⚠️ Type 'string | undefined' is not assignable to type 'string'.
| { label: translate('schedules.recurrence-weekdays'), value: 'weekdays' }, | ||
| { label: translate('schedules.recurrence-weekends'), value: 'weekends' }, | ||
| { label: translate('schedules.recurrence-custom'), value: 'custom' }, | ||
| ]} |
There was a problem hiding this comment.
⚠️ Type '(type: "custom" | "everyday" | "weekdays" | "weekends") => void' is not assignable to type '(value: string) => void'.
| placeholder="00" | ||
| suffix={translate('common.hours-abbreviated')} | ||
| error={!!$errors.specs?.[index]?.time?.hour?.[0]} | ||
| hintText={$errors.specs?.[index]?.time?.hour?.[0]} |
There was a problem hiding this comment.
⚠️ Type 'string | undefined' is not assignable to type 'string'.
| placeholder="00" | ||
| suffix={translate('common.minutes-abbreviated')} | ||
| error={!!$errors.specs?.[index]?.time?.minute?.[0]} | ||
| hintText={$errors.specs?.[index]?.time?.minute?.[0]} |
There was a problem hiding this comment.
⚠️ Type 'string | undefined' is not assignable to type 'string'.
| let body: ScheduleRequestBody; | ||
| try { | ||
| body = await formDataToCreateScheduleRequest(formData); | ||
| } catch (e) { |
There was a problem hiding this comment.
⚠️ Property 'message' does not exist on type '{}'.
| let body: ScheduleRequestBody; | ||
| try { | ||
| body = await formDataToEditScheduleRequest(formData, schedule, scheduleId); | ||
| } catch (e) { |
There was a problem hiding this comment.
⚠️ Property 'message' does not exist on type '{}'.
| } catch (e) { | ||
| actionPending.set(false); | ||
| serverError.set( | ||
| translate('schedules.delete-schedule-error', { |
There was a problem hiding this comment.
⚠️ Property 'message' does not exist on type '{}'.
| isPaused | ||
| ? 'schedules.pause-schedule-error' | ||
| : 'schedules.unpause-schedule-error', | ||
| { |
There was a problem hiding this comment.
⚠️ Property 'message' does not exist on type '{}'.
| } catch (e) { | ||
| actionPending.set(false); | ||
| serverError.set( | ||
| translate('schedules.trigger-schedule-error', { |
There was a problem hiding this comment.
⚠️ Property 'message' does not exist on type '{}'.
| } catch (e) { | ||
| actionPending.set(false); | ||
| serverError.set( | ||
| translate('schedules.backfill-schedule-error', { |
There was a problem hiding this comment.
⚠️ Property 'message' does not exist on type '{}'.
| } | ||
| } | ||
|
|
||
| export const currentScheduleFetch = |
There was a problem hiding this comment.
⚠️ Argument of type 'null' is not assignable to parameter of type 'Promise<DescribeFullSchedule | null> | undefined'.
Description & motivation 💭
Scehdules Redesign
Screenshots (if applicable) 📸
Design Considerations 🎨
https://www.figma.com/design/tzggy7x7JIM0payi0D4Xr4/Cloud-UI-Redesign?node-id=943-9543&m=dev
Testing 🧪
How was this tested 👻
Steps for others to test: 🚶🏽♂️🚶🏽♀️
Checklists
Draft Checklist
Merge Checklist
Issue(s) closed https://temporalio.atlassian.net/browse/DT-3565
Docs
Any docs updates needed?