Skip to content

Commit 0996493

Browse files
committed
🐛 Add conditional tooltip and update template
Signed-off-by: ibolton336 <[email protected]>
1 parent fa663da commit 0996493

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

client/public/templates/questionnaire-template.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ sections:
88
- order: 1
99
text: What is the main technology in your application?
1010
explanation: Identify the main framework or technology used in your application.
11+
includeFor:
12+
- category: Technology
13+
tag: Java
1114
answers:
1215
- order: 1
1316
text: Quarkus
@@ -17,6 +20,9 @@ sections:
1720
applyTags:
1821
- category: Technology
1922
tag: Quarkus
23+
autoAnswerFor:
24+
- category: Technology
25+
tag: Quarkus
2026
- order: 2
2127
text: Spring Boot
2228
risk: green
@@ -25,6 +31,9 @@ sections:
2531
applyTags:
2632
- category: Technology
2733
tag: Spring Boot
34+
autoAnswerFor:
35+
- category: Technology
36+
tag: Spring Boot
2837
- order: 3
2938
text: Legacy Monolithic Application
3039
risk: red
@@ -33,6 +42,9 @@ sections:
3342
applyTags:
3443
- category: Architecture
3544
tag: Monolith
45+
autoAnswerFor:
46+
- category: Architecture
47+
tag: Monolith
3648
- order: 2
3749
text: Does your application use a microservices architecture?
3850
explanation: Assess if the application is built using a microservices architecture.
@@ -45,11 +57,17 @@ sections:
4557
applyTags:
4658
- category: Architecture
4759
tag: Microservices
60+
autoAnswerFor:
61+
- category: Architecture
62+
tag: Microservices
4863
- order: 2
4964
text: No
5065
risk: yellow
5166
rationale: Non-microservices architectures may face scalability issues.
5267
mitigation: Assess the feasibility of transitioning to microservices.
68+
autoAnswerFor:
69+
- category: Architecture
70+
tag: Monolith
5371
- order: 3
5472
text: Unknown
5573
risk: unknown
@@ -59,6 +77,9 @@ sections:
5977
- order: 3
6078
text: Is your application's data storage cloud-optimized?
6179
explanation: Evaluate if the data storage solution is optimized for cloud usage.
80+
includeFor:
81+
- category: Technology
82+
tag: Java
6283
answers:
6384
- order: 1
6485
text: Cloud-Native Storage Solution

client/src/app/components/questions-table/questions-table.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { useTranslation } from "react-i18next";
1717
import spacing from "@patternfly/react-styles/css/utilities/Spacing/spacing";
1818
import { Assessment, Question, Questionnaire } from "@app/api/models";
1919
import { useLocalTableControls } from "@app/hooks/table-controls";
20-
import { Label } from "@patternfly/react-core";
20+
import { Label, Tooltip } from "@patternfly/react-core";
2121
import { NoDataEmptyState } from "@app/components/NoDataEmptyState";
2222
import AnswerTable from "@app/components/answer-table/answer-table";
2323
import { AxiosError } from "axios";
@@ -113,7 +113,9 @@ const QuestionsTable: React.FC<{
113113
>
114114
{(!!question?.includeFor?.length ||
115115
!!question?.excludeFor?.length) && (
116-
<Label className={spacing.mrSm}>Conditional</Label>
116+
<Tooltip content={"Question is conditionnally added"}>
117+
<Label className={spacing.mrSm}>Conditional </Label>
118+
</Tooltip>
117119
)}
118120
{question.text}
119121
</Td>

0 commit comments

Comments
 (0)