:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(workflows): scroll step settings with the panel and give the email preview room (#121274)
Daniel Marchuk2ce22aa65195
diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex 558a3045d377..ac3ffec36540 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -8243,13 +8243,13 @@ snapshots:products-workflows-editor-configuration-panel--conditional-branch--light:hash: v1.k794b7964.3691f905593cd2084ec01847e80b3eeda4c834bd1c34a9d0f37e2d36db9c5f0c.2xvXivEkevaUXKSag8wYob1Hi2ZyfxUcr7VE46qW50wproducts-workflows-editor-configuration-panel--email--dark:- hash: v1.k794b7964.8aa43ec8cf9ce9be4b9127e5e9f02585751dcf7a608d721a78139b6d50f7badc.MyDzRS7aT1ol1-R42vCvfzGscOB36K6P73yVH2QlFYU+ hash: v1.k794b7964.82956ad7b49338362f216d5648ee89813a3e18e903bc45b42c07c78f1b2a8867.byfxv4NIxretK2jzWWtxLDC8JOBfVF-tTXUPEO57PJ8products-workflows-editor-configuration-panel--email--light:- hash: v1.k794b7964.b32849126a512eded3c17f06cf3195fba34be7650656fbce62eddfda536c0e23.H6EMRSeFlrHqU3mdJSV__LWPiX1U3V99mmtcop_VDp0+ hash: v1.k794b7964.dd2c15bc5c6a886c41f24f953cd0357978914f002f42d732b842c2349c04317b.6WUo7ta3_veXnom0KzU7BZ1lUzBWNCxugxmfTVPZwlQproducts-workflows-editor-configuration-panel--email-in-side-panel--dark:- hash: v1.k794b7964.11641a90642d56a19bcb4c246b090bee8afea1cbe9e8de036d99dbe0317c66b3.XvJ_Ngs1JOs6ANfMLuuunRyPQhizz_q_xQMaIO7R62I+ hash: v1.k794b7964.b86dd0589d4176cecbfdfec32ed5fd8d9d6b4da89571a78f3d46567b13b095a7.pmXKJhqonqv2m0izV0rqZGqzaKcC7NuPqds4ykm428Yproducts-workflows-editor-configuration-panel--email-in-side-panel--light:- hash: v1.k794b7964.9b09c56e592e9ffc28a819d33e623f1991a51a17968df8b9496e49e01c3fa823.5ipJ50svyohjEDKIEwZ5h3fHKIwfp9esmAIbrWORhMQ+ hash: v1.k794b7964.5148ef83b4ffa0066217d18ab900c6c7fc93e6c7024dd16c30d3adce5be0ad95.fmtMjqlnEFw4qXHvkmJrJtAAzPGgwrBGTrPYwjoQtQYproducts-workflows-editor-configuration-panel--logs--dark:hash: v1.k794b7964.beabe0c2c69154a7e7b8e5709226f710bbb707c7a2a96ea3b908e7b5348ad177.l8BzDM-8b8Z6jYzADnoiRggNuU02m3lgVa6vtNm2VOwproducts-workflows-editor-configuration-panel--logs--light:@@ -8271,9 +8271,9 @@ snapshots:products-workflows-editor-configuration-panel--variables--light:hash: v1.k794b7964.e755c7e47cc53fab702c298414df2ab452bbe7f0182475888e8d6a6614174142.NrDxyc4ZMWe9aaXccP1uyLnJoFvt5gp5UDi4IObWHJ4products-workflows-editor-configuration-panel--webhook--dark:- hash: v1.k794b7964.7110b746becc3e42efc67b87d2e61968935a2af05d7a4e938c47e09f2d848def.5qibm9YGsfhzOIfrbdusaYZEgNh_Cf69S6CQkjStRWo+ hash: v1.k794b7964.ae40e661ff40af560a8514c23ee903b5ed2612a89d003e30ff8c8538be817241.LZP1-ccPa8UF-2g3VkEU7FCQc74H5K4qd8y7Jvfw3fcproducts-workflows-editor-configuration-panel--webhook--light:- hash: v1.k794b7964.57bca0d67317055160426c969f4f9c63a850a2240cda64b141e035c87dc8198a.zdBd3SBBJtGX85QCOFUw2WFRK-SoocCeTjtu__zuhVQ+ hash: v1.k794b7964.50f31a08c94115097306a76810343499b35294055b5f6a96d8466a77ff6dd72c.KgUwEqV9D2ROlg3pazBZGDM3-z7W6595ojBL0uvLGRcproducts-workflows-editor-graph--add-on-promotion-emails--dark:hash: v1.k794b7964.5d37d34ca5aa7b35f278cb1bb1bb6b8546f76cb8c7cac834bc70a503adce6808.Ey0Bf5z3N1u07UPAirdjqG1c09FJDG41oVedkWmAKDEproducts-workflows-editor-graph--add-on-promotion-emails--light:diff --git a/frontend/src/scenes/hog-functions/email-templater/EmailTemplater.tsx b/frontend/src/scenes/hog-functions/email-templater/EmailTemplater.tsxindex fa7f4bc22b1a..e990f2d12462 100644--- a/frontend/src/scenes/hog-functions/email-templater/EmailTemplater.tsx+++ b/frontend/src/scenes/hog-functions/email-templater/EmailTemplater.tsx@@ -255,7 +255,7 @@ function DestinationEmailTemplaterForm({srcDoc={value}sandbox=""title="Email template preview"- className="flex-1 min-h-40"+ className="flex-1 min-h-80"/></>)}@@ -810,7 +810,7 @@ function NativeEmailTemplaterForm({srcDoc={value}sandbox=""title="Email template preview"- className="flex-1 min-h-40"+ className="flex-1 min-h-80"/></>)}diff --git a/products/workflows/frontend/Workflows/hogflows/panel/HogFlowEditorPanelBuildDetail.tsx b/products/workflows/frontend/Workflows/hogflows/panel/HogFlowEditorPanelBuildDetail.tsxindex 9e0ccede72f2..8f014e90d2e8 100644--- a/products/workflows/frontend/Workflows/hogflows/panel/HogFlowEditorPanelBuildDetail.tsx+++ b/products/workflows/frontend/Workflows/hogflows/panel/HogFlowEditorPanelBuildDetail.tsx@@ -90,416 +90,428 @@ export function HogFlowEditorPanelBuildDetail(): JSX.Element | null {<ScrollableShadowsdirection="vertical"className="flex-1 min-h-0"- innerClassName="flex flex-col gap-2 p-3"- // The scroll area wraps the step config in its own content element, so the flex- // column above stops there. An email step's preview takes the height the panel- // gives it, so that wrapper has to grow as well.- contentClassName={isEmailAction(action) ? 'flex flex-1 flex-col' : undefined}+ innerClassName="flex flex-col"+ // The settings scroll with the step config, so an open section never runs past the+ // panel. The config takes the height left over, which keeps short steps' settings at+ // the bottom and lets an email step's preview grow.+ contentClassName="flex flex-1 shrink-0 flex-col"styledScrollbars>- <ErrorBoundary exceptionProps={{ feature: 'workflow-step-config' }}>- {Step?.renderConfiguration(selectedNode)}- </ErrorBoundary>- </ScrollableShadows>+ <div className="flex flex-1 flex-col gap-2 p-3">+ <ErrorBoundary exceptionProps={{ feature: 'workflow-step-config' }}>+ {Step?.renderConfiguration(selectedNode)}+ </ErrorBoundary>+ </div>- {isOptOutEligibleAction(action) && (- <>- <LemonDivider className="my-0" />- <div className="flex flex-col px-2 py-1">- <LemonLabel htmlFor="Message category" className="flex gap-2 justify-between items-center">- <span>Message category</span>- <div className="flex gap-2">- {!categoriesLoading && !categories.length && (- <LemonButton- to={urls.workflows('opt-outs')}- targetBlank- type="secondary"- icon={<IconExternal />}- >- Configure- </LemonButton>- )}- <CategorySelect- onChange={(categoryId) => {- setWorkflowAction(action.id, {- ...action,- config: {- ...action.config,- message_category_id: categoryId,- message_category_type: categoryId- ? categories.find((cat) => cat.id === categoryId)?.category_type- : undefined,- },- } as Extract<HogFlowAction, { type: 'function_email' | 'function_sms' }>)- }}- value={action.config.message_category_id}- />- </div>- </LemonLabel>- </div>- </>- )}+ {isOptOutEligibleAction(action) && (+ <>+ <LemonDivider className="my-0" />+ <div className="flex flex-col px-2 py-1">+ <LemonLabel htmlFor="Message category" className="flex gap-2 justify-between items-center">+ <span>Message category</span>+ <div className="flex gap-2">+ {!categoriesLoading && !categories.length && (+ <LemonButton+ to={urls.workflows('opt-outs')}+ targetBlank+ type="secondary"+ icon={<IconExternal />}+ >+ Configure+ </LemonButton>+ )}+ <CategorySelect+ onChange={(categoryId) => {+ setWorkflowAction(action.id, {+ ...action,+ config: {+ ...action.config,+ message_category_id: categoryId,+ message_category_type: categoryId+ ? categories.find((cat) => cat.id === categoryId)?.category_type+ : undefined,+ },+ } as Extract<HogFlowAction, { type: 'function_email' | 'function_sms' }>)+ }}+ value={action.config.message_category_id}+ />+ </div>+ </LemonLabel>+ </div>+ </>+ )}- {isEmailAction(action) && (- <>- <LemonDivider className="my-0" />- <div className="flex gap-2 justify-between items-center px-2 py-1">- <LemonLabel info="Turn this off for emails that should never be tracked, such as transactional messages. When off, no tracking pixel is added and links are not rewritten, so opens and clicks won't appear in the workflow's metrics. Delivery, bounce, and unsubscribe events are still recorded. Marketing emails may additionally be sent untracked based on the email tracking consent setting in your environment settings.">- Track opens and link clicks- </LemonLabel>- <LemonSwitch- checked={action.config.tracking_enabled !== false}- onChange={(checked) => {- setWorkflowAction(action.id, {- ...action,- config: { ...action.config, tracking_enabled: checked },- })- }}- />- </div>- <div className="flex gap-2 justify-between items-center px-2 py-1">- <LemonLabel info="Adds UTM tags to each link, so visits from this email show up as their own campaign in web analytics. Tags already on a link are kept. Links to PostHog, such as the unsubscribe link, are not changed. Add data-ph-no-utm to a link to leave it as is.">- Add UTM tags to links- </LemonLabel>- <LemonSwitch- checked={action.config.utm_tags_enabled === true}- onChange={(checked) => {- setWorkflowAction(action.id, {- ...action,- config: { ...action.config, utm_tags_enabled: checked },- })- }}- data-attr="workflow-email-utm-tags-toggle"- />- </div>- {action.config.utm_tags_enabled === true && (- <div className="px-2 pb-2">- <UtmTagFields- value={action.config.utm_params ?? {}}- onChange={(utmParams) => {+ {isEmailAction(action) && (+ <>+ <LemonDivider className="my-0" />+ <div className="flex gap-2 justify-between items-center px-2 py-1">+ <LemonLabel info="Turn this off for emails that should never be tracked, such as transactional messages. When off, no tracking pixel is added and links are not rewritten, so opens and clicks won't appear in the workflow's metrics. Delivery, bounce, and unsubscribe events are still recorded. Marketing emails may additionally be sent untracked based on the email tracking consent setting in your environment settings.">+ Track opens and link clicks+ </LemonLabel>+ <LemonSwitch+ checked={action.config.tracking_enabled !== false}+ onChange={(checked) => {setWorkflowAction(action.id, {...action,- config: { ...action.config, utm_params: utmParams },+ config: { ...action.config, tracking_enabled: checked },})}}- campaignDefault={workflow.name || 'Workflow name'}- contentDefault={action.name}/></div>- )}- </>- )}+ <div className="flex gap-2 justify-between items-center px-2 py-1">+ <LemonLabel info="Adds UTM tags to each link, so visits from this email show up as their own campaign in web analytics. Tags already on a link are kept. Links to PostHog, such as the unsubscribe link, are not changed. Add data-ph-no-utm to a link to leave it as is.">+ Add UTM tags to links+ </LemonLabel>+ <LemonSwitch+ checked={action.config.utm_tags_enabled === true}+ onChange={(checked) => {+ setWorkflowAction(action.id, {+ ...action,+ config: { ...action.config, utm_tags_enabled: checked },+ })+ }}+ data-attr="workflow-email-utm-tags-toggle"+ />+ </div>+ {action.config.utm_tags_enabled === true && (+ <div className="px-2 pb-2">+ <UtmTagFields+ value={action.config.utm_params ?? {}}+ onChange={(utmParams) => {+ setWorkflowAction(action.id, {+ ...action,+ config: { ...action.config, utm_params: utmParams },+ })+ }}+ campaignDefault={workflow.name || 'Workflow name'}+ contentDefault={action.name}+ />+ </div>+ )}+ </>+ )}- {!['trigger', 'exit'].includes(action.type) && (- <>- <LemonDivider className="my-0" />+ {!['trigger', 'exit'].includes(action.type) && (+ <>+ <LemonDivider className="my-0" />- <div className="flex-0">- <LemonCollapse- embedded- panels={[- {- key: 'outputs',- header: (- <>- <span className="flex-1">Output variables</span>- <LemonBadge.Number- count={mappings.filter((m) => m.key).length}- showZero={false}- />- </>- ),- content: (- <div className="flex flex-col items-start gap-2 max-h-96 overflow-y-auto">- {mappings.map((mapping, index) => (- <div- key={index}- className="flex flex-col gap-1 w-full rounded border border-border p-2"- >- <div className="flex items-center gap-1">- <LemonField.Pure label="Variable" className="flex-1">- <LemonInputSelect- mode="single"- allowCustomValues- placeholder="Select or type a new name"- formatCreateLabel={(input) =>- `Create variable "${input}"`- }- inputTransform={sanitizeVariableKey}- options={(workflow.variables || [])- .filter(- ({ key }) =>- key === mapping.key ||- !mappings.some((m) => m.key === key)- )- .map(({ key }) => ({ key, label: key }))}- value={mapping.key ? [mapping.key] : []}- onChange={([value]) =>- setMappingVariable(index, value || '')- }- size="small"- />- </LemonField.Pure>- {mapping.key && (- <LemonField.Pure label="Type">- <LemonSelect- options={WORKFLOW_VARIABLE_TYPE_OPTIONS}- value={- WORKFLOW_VARIABLE_TYPE_OPTIONS.find(- ({ value }) =>- value ===- workflow.variables?.find(- (v) => v.key === mapping.key- )?.type- )?.value ?? null+ <div className="flex-0">+ <LemonCollapse+ embedded+ panels={[+ {+ key: 'outputs',+ header: (+ <>+ <span className="flex-1">Output variables</span>+ <LemonBadge.Number+ count={mappings.filter((m) => m.key).length}+ showZero={false}+ />+ </>+ ),+ content: (+ <div className="flex flex-col items-start gap-2 max-h-96 overflow-y-auto">+ {mappings.map((mapping, index) => (+ <div+ key={index}+ className="flex flex-col gap-1 w-full rounded border border-border p-2"+ >+ <div className="flex items-center gap-1">+ <LemonField.Pure label="Variable" className="flex-1">+ <LemonInputSelect+ mode="single"+ allowCustomValues+ placeholder="Select or type a new name"+ formatCreateLabel={(input) =>+ `Create variable "${input}"`}- placeholder="Other"- onChange={(type) =>- type && setVariableType(mapping.key, type)+ inputTransform={sanitizeVariableKey}+ options={(workflow.variables || [])+ .filter(+ ({ key }) =>+ key === mapping.key ||+ !mappings.some((m) => m.key === key)+ )+ .map(({ key }) => ({ key, label: key }))}+ value={mapping.key ? [mapping.key] : []}+ onChange={([value]) =>+ setMappingVariable(index, value || '')}size="small"/></LemonField.Pure>- )}- <LemonButton- icon={<IconX />}- size="small"- tooltip="Remove mapping"- onClick={() => removeMapping(index)}- />+ {mapping.key && (+ <LemonField.Pure label="Type">+ <LemonSelect+ options={WORKFLOW_VARIABLE_TYPE_OPTIONS}+ value={+ WORKFLOW_VARIABLE_TYPE_OPTIONS.find(+ ({ value }) =>+ value ===+ workflow.variables?.find(+ (v) => v.key === mapping.key+ )?.type+ )?.value ?? null+ }+ placeholder="Other"+ onChange={(type) =>+ type && setVariableType(mapping.key, type)+ }+ size="small"+ />+ </LemonField.Pure>+ )}+ <LemonButton+ icon={<IconX />}+ size="small"+ tooltip="Remove mapping"+ onClick={() => removeMapping(index)}+ />+ </div>+ <LemonField.Pure+ label="Result path"+ info={+ isAiTaskAction+ ? "Specify a path within the step result to store. A path like 'output.verdict' asks the agent to return that field, typed like the variable. Leave blank for the entire result."+ : "Specify a path within the step result to store, e.g. 'body.results[0].id'. Leave blank for the entire result."+ }+ className="w-full"+ >+ <LemonInput+ disabledReason={+ !mapping.key+ ? 'Select a variable first.'+ : undefined+ }+ type="text"+ prefix={<span>result.</span>}+ value={mapping.result_path}+ onChange={(value) =>+ updateMappingResultPath(index, value)+ }+ placeholder={+ isAiTaskAction+ ? 'output.verdict'+ : 'body.results[0].id'+ }+ size="small"+ />+ </LemonField.Pure></div>- <LemonField.Pure- label="Result path"- info={- isAiTaskAction- ? "Specify a path within the step result to store. A path like 'output.verdict' asks the agent to return that field, typed like the variable. Leave blank for the entire result."- : "Specify a path within the step result to store, e.g. 'body.results[0].id'. Leave blank for the entire result."- }- className="w-full"+ ))}+ {pendingSuggestions.length > 0 && (+ <div className="w-full">+ <p className="text-xs text-secondary mb-1">Suggested</p>+ <div className="flex flex-wrap gap-1">+ {pendingSuggestions.map((suggestion) => (+ <LemonButton+ key={suggestion.key}+ size="xsmall"+ type="secondary"+ icon={<IconPlus />}+ onClick={() => applySuggestion(suggestion)}+ >+ {suggestion.label}+ </LemonButton>+ ))}+ </div>+ </div>+ )}+ <div className="flex gap-2 w-full">+ <LemonButton+ icon={<IconPlus />}+ size="small"+ type="secondary"+ onClick={() => addMapping()}>- <LemonInput- disabledReason={- !mapping.key ? 'Select a variable first.' : undefined- }- type="text"- prefix={<span>result.</span>}- value={mapping.result_path}- onChange={(value) => updateMappingResultPath(index, value)}- placeholder={- isAiTaskAction ? 'output.verdict' : 'body.results[0].id'- }+ Add mapping+ </LemonButton>+ {!isAiTaskAction && (+ <LemonButton+ icon={<IconPlay />}size="small"- />- </LemonField.Pure>+ type="primary"+ className={shakePickButton ? 'animate-shake' : ''}+ loading={testLoading}+ tooltip="Executes a real HTTP request to this step's endpoint and shows the response so you can pick which property to store."+ onClick={runOutputTest}+ >+ Pick from response+ </LemonButton>+ )}</div>- ))}- {pendingSuggestions.length > 0 && (- <div className="w-full">- <p className="text-xs text-secondary mb-1">Suggested</p>- <div className="flex flex-wrap gap-1">- {pendingSuggestions.map((suggestion) => (- <LemonButton- key={suggestion.key}- size="xsmall"- type="secondary"- icon={<IconPlus />}- onClick={() => applySuggestion(suggestion)}+ {testError && (+ <LemonBanner type="error" className="w-full">+ {testError}+ </LemonBanner>+ )}+ {testResultData !== null && (+ <div+ className="w-full"+ ref={(el) =>+ el?.scrollIntoView({ behavior: 'smooth', block: 'nearest' })+ }+ >+ <p className="text-xs text-secondary mb-1">+ Click a key to use as result path+ </p>+ <div className="max-h-64 overflow-auto border rounded p-1">+ <OutputTestResultTree+ data={testResultData}+ selectedPath={pendingPath || ''}+ onPathSelect={(path) => selectPath(path)}+ />+ </div>+ {pendingPath && mappings.length >= 2 && (+ <div+ ref={(el) =>+ el?.scrollIntoView({+ behavior: 'smooth',+ block: 'nearest',+ })+ }+ className="mt-2 p-2 rounded border border-primary bg-primary-highlight">- {suggestion.label}- </LemonButton>- ))}+ <p className="text-xs font-semibold mb-1">+ Assign{' '}+ <code className="text-xs">+ result.{pendingPath}+ </code>{' '}+ to:+ </p>+ <div className="flex flex-wrap gap-1">+ {mappings.map((mapping, index) =>+ mapping.key ? (+ <LemonButton+ key={index}+ size="xsmall"+ type="secondary"+ onClick={() =>+ assignPendingPathToMapping(+ index,+ pendingPath!+ )+ }+ >+ {mapping.key}+ </LemonButton>+ ) : null+ )}+ <LemonButton+ size="xsmall"+ type="tertiary"+ onClick={() => cancelPendingPath()}+ >+ Cancel+ </LemonButton>+ </div>+ </div>+ )}</div>- </div>- )}- <div className="flex gap-2 w-full">+ )}+ <LemonDivider className="my-1" /><LemonButton- icon={<IconPlus />}+ sideIcon={<IconExternal />}size="small"type="secondary"- onClick={() => addMapping()}+ onClick={() => setMode('variables')}>- Add mapping+ View all workflow variables</LemonButton>- {!isAiTaskAction && (- <LemonButton- icon={<IconPlay />}- size="small"- type="primary"- className={shakePickButton ? 'animate-shake' : ''}- loading={testLoading}- tooltip="Executes a real HTTP request to this step's endpoint and shows the response so you can pick which property to store."- onClick={runOutputTest}- >- Pick from response- </LemonButton>- )}</div>- {testError && (- <LemonBanner type="error" className="w-full">- {testError}- </LemonBanner>- )}- {testResultData !== null && (- <div- className="w-full"- ref={(el) =>- el?.scrollIntoView({ behavior: 'smooth', block: 'nearest' })- }+ ),+ },+ ...(hideFiltersPanel+ ? []+ : [+ {+ key: 'filters',+ header: (+ <>+ <span className="flex-1">+ {hasLegacyBranchingFilters+ ? 'Legacy skip conditions'+ : 'Conditions'}+ </span>+ <LemonBadge.Number+ count={numberOfActionFilters}+ showZero={false}+ />+ </>+ ),+ content: (+ <div>+ {hasLegacyBranchingFilters ? (+ <p>+ These skip conditions were set on this branching step+ before we removed the option. They still apply at+ runtime: if they aren't met, the user skips the entire+ branching step and continues to the next step. Clear+ them to hide this panel.+ </p>+ ) : (+ <p>+ Add conditions to the step. If these conditions aren't+ met, the user will skip this step and continue to the+ next one.+ </p>+ )}+ <HogFlowPropertyFilters+ filtersKey={`action-skip-conditions-${action.id}`}+ filters={action.filters ?? {}}+ setFilters={(filters) =>+ setWorkflowAction(action.id, { ...action, filters })+ }+ buttonCopy="Add filter conditions"+ />+ </div>+ ),+ },+ ]),+ {+ key: 'on_error',+ header: (+ <>+ <span className="flex-1">Error handling</span>+ <LemonTag+ size="small"+ type={action.on_error === 'continue' ? 'success' : 'danger'}>- <p className="text-xs text-secondary mb-1">- Click a key to use as result path- </p>- <div className="max-h-64 overflow-auto border rounded p-1">- <OutputTestResultTree- data={testResultData}- selectedPath={pendingPath || ''}- onPathSelect={(path) => selectPath(path)}- />- </div>- {pendingPath && mappings.length >= 2 && (- <div- ref={(el) =>- el?.scrollIntoView({- behavior: 'smooth',- block: 'nearest',- })- }- className="mt-2 p-2 rounded border border-primary bg-primary-highlight"- >- <p className="text-xs font-semibold mb-1">- Assign{' '}- <code className="text-xs">result.{pendingPath}</code>{' '}- to:- </p>- <div className="flex flex-wrap gap-1">- {mappings.map((mapping, index) =>- mapping.key ? (- <LemonButton- key={index}- size="xsmall"- type="secondary"- onClick={() =>- assignPendingPathToMapping(- index,- pendingPath!- )- }- >- {mapping.key}- </LemonButton>- ) : null- )}- <LemonButton- size="xsmall"- type="tertiary"- onClick={() => cancelPendingPath()}- >- Cancel- </LemonButton>- </div>- </div>- )}- </div>- )}- <LemonDivider className="my-1" />- <LemonButton- sideIcon={<IconExternal />}- size="small"- type="secondary"- onClick={() => setMode('variables')}- >- View all workflow variables- </LemonButton>- </div>- ),- },- ...(hideFiltersPanel- ? []- : [- {- key: 'filters',- header: (- <>- <span className="flex-1">- {hasLegacyBranchingFilters- ? 'Legacy skip conditions'- : 'Conditions'}- </span>- <LemonBadge.Number- count={numberOfActionFilters}- showZero={false}- />- </>- ),- content: (- <div>- {hasLegacyBranchingFilters ? (- <p>- These skip conditions were set on this branching step- before we removed the option. They still apply at runtime:- if they aren't met, the user skips the entire branching- step and continues to the next step. Clear them to hide- this panel.- </p>- ) : (- <p>- Add conditions to the step. If these conditions aren't- met, the user will skip this step and continue to the next- one.- </p>- )}- <HogFlowPropertyFilters- filtersKey={`action-skip-conditions-${action.id}`}- filters={action.filters ?? {}}- setFilters={(filters) =>- setWorkflowAction(action.id, { ...action, filters })- }- buttonCopy="Add filter conditions"- />- </div>- ),- },- ]),- {- key: 'on_error',- header: (- <>- <span className="flex-1">Error handling</span>- <LemonTag- size="small"- type={action.on_error === 'continue' ? 'success' : 'danger'}- >- {action.on_error === 'continue' ? 'Continue on error' : 'Exit on error'}- </LemonTag>- </>- ),- content: (- <div>- <p>- What to do if this step fails (e.g. message could not be sent). By- default, the user will continue to the next step.- </p>- <LemonSelect- options={[- { value: 'continue', label: 'Continue to next step' },- { value: 'abort', label: 'Exit the workflow' },- ]}- value={action.on_error || 'continue'}- onChange={(value) =>- setWorkflowAction(action.id, {- ...action,- on_error: value,- })- }- />- </div>- ),- },- ]}- />- </div>- </>- )}+ {action.on_error === 'continue'+ ? 'Continue on error'+ : 'Exit on error'}+ </LemonTag>+ </>+ ),+ content: (+ <div>+ <p>+ What to do if this step fails (e.g. message could not be sent). By+ default, the user will continue to the next step.+ </p>+ <LemonSelect+ options={[+ { value: 'continue', label: 'Continue to next step' },+ { value: 'abort', label: 'Exit the workflow' },+ ]}+ value={action.on_error || 'continue'}+ onChange={(value) =>+ setWorkflowAction(action.id, {+ ...action,+ on_error: value,+ })+ }+ />+ </div>+ ),+ },+ ]}+ />+ </div>+ </>+ )}+ </ScrollableShadows></div>)}