Migrate Dataflow interface patterns

This commit is contained in:
2026-08-03 14:19:42 +02:00
parent 3fa7a29f48
commit 109ddcd4fb
9 changed files with 995 additions and 103 deletions
File diff suppressed because it is too large Load Diff
+14 -2
View File
@@ -1,8 +1,8 @@
import { useEffect, useState } from "react";
import { useEffect, useState, type ComponentProps } from "react";
import { Play, Trash2 } from "lucide-react";
import {
DismissibleAlert,
FormField,
FormField as CoreFormField,
IconButton
} from "@govoplan/core-webui";
import type {
@@ -10,6 +10,18 @@ import type {
PipelineGraphNode,
TabularSource
} from "../../api/dataflow";
import { DATAFLOW_NODE_DOCUMENTATION } from "./interfacePatterns";
type NodeFormFieldProps = ComponentProps<typeof CoreFormField>;
function FormField({ documentation, ...props }: NodeFormFieldProps) {
return (
<CoreFormField
{...props}
documentation={documentation ?? DATAFLOW_NODE_DOCUMENTATION}
/>
);
}
type NodeInspectorProps = {
node: PipelineGraphNode | null;
@@ -0,0 +1,37 @@
import type { DocumentationHelpReference } from "@govoplan/core-webui";
export const DATAFLOW_DOCUMENTATION = {
topicId: "dataflow.module-boundary",
documentationType: "user"
} satisfies DocumentationHelpReference;
export const DATAFLOW_FIELDS_DOCUMENTATION = {
topicId: "dataflow.reference.fields-and-consequences",
documentationType: "admin"
} satisfies DocumentationHelpReference;
export const DATAFLOW_NODE_DOCUMENTATION = {
topicId: "dataflow.reference.nodes-and-expressions",
documentationType: "user"
} satisfies DocumentationHelpReference;
export const DATAFLOW_RUN_DOCUMENTATION = {
topicId: "dataflow.execution-and-recovery",
documentationType: "admin"
} satisfies DocumentationHelpReference;
export const DATAFLOW_I18N = {
loading: "i18n:govoplan-dataflow.loading_reason",
working: "i18n:govoplan-dataflow.working_reason",
writeReason: "i18n:govoplan-dataflow.write_reason",
runReason: "i18n:govoplan-dataflow.run_reason",
noSelection: "i18n:govoplan-dataflow.no_selection_reason",
noChanges: "i18n:govoplan-dataflow.no_changes_reason",
saveFirst: "i18n:govoplan-dataflow.save_first_reason",
requiredAction: "i18n:govoplan-dataflow.required_action",
actor: "i18n:govoplan-dataflow.actor",
destination: "i18n:govoplan-dataflow.destination",
permissionAction: "i18n:govoplan-dataflow.permission_action",
permissionActor: "i18n:govoplan-dataflow.permission_actor",
permissionDestination: "i18n:govoplan-dataflow.permission_destination"
} as const;