DT-3564 - migrate schedules form to superforms#3159
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| const action: ScheduleActionParameters = { | ||
| identity, | ||
| namespace, | ||
| namespace: page.params.namespace, |
There was a problem hiding this comment.
⚠️ Type 'string | undefined' is not assignable to type 'string'.
| identity, | ||
| namespace, | ||
| namespace: page.params.namespace, | ||
| name, |
There was a problem hiding this comment.
⚠️ Type 'string | undefined' is not assignable to type 'string'.
| namespace, | ||
| namespace: page.params.namespace, | ||
| name, | ||
| workflowType, |
There was a problem hiding this comment.
⚠️ Type 'string | undefined' is not assignable to type 'string'.
| namespace: page.params.namespace, | ||
| name, | ||
| workflowType, | ||
| workflowId, |
There was a problem hiding this comment.
⚠️ Type 'string | undefined' is not assignable to type 'string'.
| const action: ScheduleActionParameters = { | ||
| identity, | ||
| namespace, | ||
| namespace: page.params.namespace, |
There was a problem hiding this comment.
⚠️ Type 'string | undefined' is not assignable to type 'string'.
| identity, | ||
| namespace, | ||
| namespace: page.params.namespace, | ||
| name, |
There was a problem hiding this comment.
⚠️ Type 'string | undefined' is not assignable to type 'string'.
| namespace, | ||
| namespace: page.params.namespace, | ||
| name, | ||
| workflowType, |
There was a problem hiding this comment.
⚠️ Type 'string | undefined' is not assignable to type 'string'.
| namespace: page.params.namespace, | ||
| name, | ||
| workflowType, | ||
| workflowId, |
There was a problem hiding this comment.
⚠️ Type 'string | undefined' is not assignable to type 'string'.
|
| searchAttributes: form.searchAttributes, | ||
| workflowSearchAttributes: form.workflowSearchAttributes, | ||
| }; | ||
|
|
There was a problem hiding this comment.
⚠️ Argument of type 'ISchedule | null' is not assignable to parameter of type 'ISchedule | undefined'.
| {...$constraints.taskQueue} | ||
| required | ||
| /> | ||
| <ScheduleInputPayload |
There was a problem hiding this comment.
⚠️ Type 'string | undefined' is not assignable to type 'string'.
| <ScheduleInputPayload | ||
| bind:input={$form.input} | ||
| bind:editInput={$form.editInput} | ||
| {encoding} |
There was a problem hiding this comment.
⚠️ Type 'string | undefined' is not assignable to type 'string'.
| bind:input={$form.input} | ||
| bind:editInput={$form.editInput} | ||
| {encoding} | ||
| bind:messageType={$form.messageType} |
There was a problem hiding this comment.
⚠️ Type 'IPayloads | null | undefined' is not assignable to type 'IPayloads'.
| }: Props = $props(); | ||
|
|
||
| const addSearchAttribute = () => { | ||
| attributesToAdd = [ |
There was a problem hiding this comment.
⚠️ Type '{ type: "Unspecified" | "Keyword" | "Text" | "Int" | "Double" | "Bool" | "KeywordList" | "Datetime"; label: string; value?: any; } | { label: null; value: null; type: "Unspecified"; }' is not assignable to type '{ type: "Unspecified" | "Keyword" | "Text" | "Int" | "Double" | "Bool" | "KeywordList" | "Datetime"; label: string; value?: any; }'.
| 'workflowSearchAttributes', | ||
| ); | ||
|
|
||
| const handleConfirm = (form: ScheduleFormData) => { |
There was a problem hiding this comment.
⚠️ Type '{ encoding: "json/plain" | "json/protobuf"; messageType: string | undefined; hour: string; minute: string; second: string; phase: string; cronString: string; daysOfWeek: string[]; daysOfMonth: number[]; ... 8 more ...; taskQueue: string; }' is missing the following properties from type '{ name: string; days: string; encoding: "json/plain" | "json/protobuf"; workflowId: string; workflowType: string; taskQueue: string; searchAttributes: { type: "Unspecified" | "Keyword" | ... 5 more ... | "Datetime"; label: string; value?: any; }[]; ... 12 more ...; messageType?: string | undefined; }': editInput, timezoneName
| const scheduleId = $derived(page.params.schedule); | ||
|
|
||
| const title = $derived( | ||
| translate(schedule ? 'schedules.edit' : 'schedules.create'), |
| }), | ||
| ); | ||
|
|
||
| // initialValues is reactive but we only need its initial value |
There was a problem hiding this comment.
The initial value of initialValue, love it. I thought about this too when I used superForms. Seems weird from a reactivity or lifecycle perspective.
| const createSchedule = page.getByRole('button', { | ||
| name: 'Create Schedule', | ||
| }); | ||
| await expect(createSchedule).toBeDisabled(); |
There was a problem hiding this comment.
nice to be always enabled
Auto-generated version bump from 2.45.3 to 2.45.4 Bump type: patch Changes included: - [`02b30a6e`](02b30a6) Use CountSchedules for counting schedules (#3100) - [`90dfec88`](90dfec8) Add fallbacks for activities routes (#3154) - [`f160628c`](f160628) DT-3564 - migrate schedules form to superforms (#3159) - [`50d7bdf3`](50d7bdf) small css changes to nav components for better responsiveness (#3162) - [`e3b4028b`](e3b4028) UI Copy Updates (#3165) - [`3638919c`](3638919) add snippet for pre-release badge on standalone activities page (#3166) - [`1ee50fcb`](1ee50fc) fix standalone activity routes and prep for release (#3168) - [`7553e5b4`](7553e5b) Event history legend (#3160) - [`562067a8`](562067a) Environment variable audit (#3163) - [`51bdfd75`](51bdfd7) Card typography fixes (#3169) - [`dfc6b453`](dfc6b45) fix schedule edit form infinite effect loop (#3172) - [`07995e61`](07995e6) fix infinite effect bug when editing schedule with large input payload (#3174)
Auto-generated version bump from 2.45.3 to 2.45.4 Bump type: patch Changes included: - [`02b30a6e`](02b30a6) Use CountSchedules for counting schedules (#3100) - [`90dfec88`](90dfec8) Add fallbacks for activities routes (#3154) - [`f160628c`](f160628) DT-3564 - migrate schedules form to superforms (#3159) - [`50d7bdf3`](50d7bdf) small css changes to nav components for better responsiveness (#3162) - [`e3b4028b`](e3b4028) UI Copy Updates (#3165) - [`3638919c`](3638919) add snippet for pre-release badge on standalone activities page (#3166) - [`1ee50fcb`](1ee50fc) fix standalone activity routes and prep for release (#3168) - [`7553e5b4`](7553e5b) Event history legend (#3160) - [`562067a8`](562067a) Environment variable audit (#3163) - [`51bdfd75`](51bdfd7) Card typography fixes (#3169) - [`dfc6b453`](dfc6b45) fix schedule edit form infinite effect loop (#3172) - [`07995e61`](07995e6) fix infinite effect bug when editing schedule with large input payload (#3174) Co-authored-by: rossedfort <11775628+rossedfort@users.noreply.github.com>
Description & motivation 💭
Screenshots (if applicable) 📸
Design Considerations 🎨
Testing 🧪
How was this tested 👻
Steps for others to test: 🚶🏽♂️🚶🏽♀️
Checklists
Draft Checklist
Merge Checklist
Issue(s) closed
Docs
Any docs updates needed?