feat(ui): add fake dnd node field element w/ info tooltip

This commit is contained in:
psychedelicious
2025-02-21 08:22:50 +10:00
parent d1d3971ee3
commit 6cfeadb33b
2 changed files with 7 additions and 0 deletions

View File

@@ -1715,6 +1715,8 @@
"layout": "Layout",
"row": "Row",
"column": "Column",
"nodeField": "Node Field",
"nodeFieldTooltip": "To add a node field, click the small plus sign button on the field in the Workflow Editor, or drag the field by its name into the form.",
"label": "Label",
"description": "Description",
"component": "Component",

View File

@@ -13,9 +13,11 @@ import { buildContainer, buildDivider, buildHeading, buildText } from 'features/
import { startCase } from 'lodash-es';
import type { RefObject } from 'react';
import { memo, useEffect, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { assert } from 'tsafe';
export const WorkflowBuilder = memo(() => {
const { t } = useTranslation();
const rootElementId = useAppSelector(selectFormRootElementId);
useBuilderDndMonitor();
@@ -27,6 +29,9 @@ export const WorkflowBuilder = memo(() => {
<AddFormElementDndButton type="divider" />
<AddFormElementDndButton type="heading" />
<AddFormElementDndButton type="text" />
<Button variant="ghost" tooltip={t('workflows.builder.nodeFieldTooltip')}>
{t('workflows.builder.nodeField')}
</Button>
<Spacer />
<WorkflowBuilderEditMenu />
</ButtonGroup>