Skip to content

Commit 88fc541

Browse files
authored
Merge pull request #907 from 1AhmedYasser/Cap-canvas-text-node-height-with-wrapped-preview
Cap canvas text node height with wrapped preview
2 parents 57dba08 + 3fc5de6 commit 88fc541

2 files changed

Lines changed: 18 additions & 4 deletions

File tree

GUI/src/components/Flow/NodeTypes/StepNode.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,17 @@ const StepNode: FC<StepNodeProps> = ({ data }) => {
6767
</p>
6868
{data.stepType === StepType.Textfield && (
6969
<div
70-
style={{ ...boldText, whiteSpace: 'pre-wrap' }}
70+
className="step-node-content"
71+
style={{ ...boldText }}
7172
dangerouslySetInnerHTML={createMarkup(data.message ?? '')}
72-
></div>
73+
/>
7374
)}
7475
{data.stepType === StepType.MultiChoiceQuestion && (
7576
<div
76-
style={{ ...boldText, whiteSpace: 'pre-wrap' }}
77+
className="step-node-content"
78+
style={{ ...boldText }}
7779
dangerouslySetInnerHTML={createMarkup(data.multiChoiceQuestion?.question ?? '')}
78-
></div>
80+
/>
7981
)}
8082
{data.stepType === StepType.Auth && <p style={boldText}>&quot;{t('serviceFlow.popup.loginWithTARA')}&quot;</p>}
8183
{data.stepType === StepType.Input && (

GUI/src/pages/ServiceFlowPage.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,20 @@
5454
max-width: 350px;
5555
width: 100%;
5656
min-height: 65px;
57+
max-height: 65px;
5758
align-content: center;
5859

60+
.step-node-content {
61+
overflow: hidden;
62+
text-overflow: ellipsis;
63+
white-space: nowrap;
64+
max-width: 318px;
65+
66+
p {
67+
display: inline;
68+
}
69+
}
70+
5971
&.selected {
6072
border: dashed 1px get-color(black-coral-1);
6173

0 commit comments

Comments
 (0)