Skip to content
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

[UI v2] feat: Adds component for change-flow-run-state option #16611

Merged
merged 3 commits into from
Jan 6, 2025

Conversation

devinvillarosa
Copy link
Contributor

@devinvillarosa devinvillarosa commented Jan 5, 2025

  1. Re-organizes components to use react-hook-form components.
  2. Adds schema for action type when selecting Change flow run's state
Screen.Recording.2025-01-05.at.9.51.07.AM.mov

Checklist

  • This pull request references any related issue by including "closes <link to issue>"
    • If no issue exists and your change is not a small fix, please create an issue first.
  • If this pull request adds new functionality, it includes unit tests that cover the changes
  • If this pull request removes docs files, it includes redirect settings in mint.json.
  • If this pull request adds functions or classes, it includes helpful docstrings.

Relates to #15512

@github-actions github-actions bot added the ui-replatform Related to the React UI rewrite label Jan 5, 2025
@devinvillarosa devinvillarosa force-pushed the change-flow-run-state-action branch from 11ebffe to 00ac211 Compare January 5, 2025 17:55
@devinvillarosa devinvillarosa marked this pull request as ready for review January 5, 2025 21:22
@devinvillarosa devinvillarosa force-pushed the change-flow-run-state-action branch from 00ac211 to c6d48fb Compare January 6, 2025 01:44
@devinvillarosa devinvillarosa marked this pull request as draft January 6, 2025 01:45
@devinvillarosa devinvillarosa force-pushed the change-flow-run-state-action branch 2 times, most recently from d522778 to 618969e Compare January 6, 2025 02:01
@devinvillarosa devinvillarosa marked this pull request as ready for review January 6, 2025 02:03
@devinvillarosa devinvillarosa force-pushed the change-flow-run-state-action branch from 618969e to d2e07fd Compare January 6, 2025 04:50
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this file was deleted and not recreated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of these files got moved as part of automations-wizard-action-type-select.tsx and automations-wizard-action-step.tsx.

I'm trying to figure out how I should write stories & tests since they're part of a form

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this file was deleted and not recreated.

onSubmit,
}: AutomationWizardActionStepProps) => {
const form = useForm<z.infer<typeof ActionsSchema>>({
resolver: zodResolver(ActionsSchema),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the schema used change based on the action type that is selected?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When trying this out, I think having

export const ActionsSchema = z.union([
	ChangeFlowRunStateSchema,
	DeploymentsSchema,
	RunDeploymentsSchema,
	WorkPoolSchema,
	WorkQueueSchema,
	AutomationSchema,
	SendNotificationSchema,
	FlowRunSchema,
]);

in action-type-schemas gives a similar UI. the schema will be based on the type field from type narrowing.

@devinvillarosa devinvillarosa force-pushed the change-flow-run-state-action branch from d2e07fd to 9859d87 Compare January 6, 2025 16:05
@devinvillarosa devinvillarosa force-pushed the change-flow-run-state-action branch 2 times, most recently from 2c84b24 to 1916e56 Compare January 6, 2025 18:45
@devinvillarosa
Copy link
Contributor Author

Re-organized folder such that all action related components are in /automations/automation-wizard/action-step

@devinvillarosa devinvillarosa force-pushed the change-flow-run-state-action branch from 1916e56 to 40b742b Compare January 6, 2025 19:04
…p/action-change-flow-run-state-fields/flow-states.ts

Co-authored-by: Alex Streed <desertaxle@users.noreply.github.com>
@devinvillarosa devinvillarosa force-pushed the change-flow-run-state-action branch from 059d29c to 0258ab4 Compare January 6, 2025 22:40
@devinvillarosa devinvillarosa merged commit e067622 into main Jan 6, 2025
8 checks passed
@devinvillarosa devinvillarosa deleted the change-flow-run-state-action branch January 6, 2025 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ui-replatform Related to the React UI rewrite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants