Skip to content

Commit

Permalink
wip: ux
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Dec 17, 2024
1 parent 261f466 commit 49d14fe
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions webui/src/Controls/FeedbackEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
faCopy,
faFolderOpen,
faPencil,
faQuestionCircle,
} from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import React, { useCallback, useContext, useMemo, useRef, useState } from 'react'
Expand Down Expand Up @@ -507,7 +508,17 @@ const FeedbackEditor = observer(function FeedbackEditor({
<CForm onSubmit={PreventDefaultHandler}>
<InlineFeedbacksEditor
controlId={controlId}
heading={feedbackSpec.supportsAdvancedChildFeedbacks ? 'Conditions' : null}
heading={
feedbackSpec.supportsAdvancedChildFeedbacks ? (
<>
Conditions&nbsp;
<FontAwesomeIcon
icon={faQuestionCircle}
title="This feedback will only execute when all of the conditions are true"
/>
</>
) : null
}
feedbacks={feedback.children ?? []}
entityType="condition"
onlyType={'boolean'}
Expand All @@ -521,10 +532,18 @@ const FeedbackEditor = observer(function FeedbackEditor({

{feedbackSpec.supportsAdvancedChildFeedbacks && (
<>
<CForm onSubmit={PreventDefaultHandler}>
<CForm onSubmit={PreventDefaultHandler} className="mt-2">
<InlineFeedbacksEditor
controlId={controlId}
heading={'Feedbacks'}
heading={
<>
Feedbacks&nbsp;
<FontAwesomeIcon
icon={faQuestionCircle}
title="These feedbacks will only be shown if the conditions above are met"
/>
</>
}
feedbacks={feedback.advancedChildren ?? []}
entityType="feedback"
onlyType={'advanced'}
Expand Down

0 comments on commit 49d14fe

Please sign in to comment.