Skip to content

Commit e8cd0c5

Browse files
Suggested code when renaming a label is not visible
1 parent 64b85b7 commit e8cd0c5

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

src/components/projects/projectId/settings/labeling-tasks/RenameLabelModal.tsx

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -172,16 +172,10 @@ export default function RenameLabelModal() {
172172
<span className="text-sm">{warning.new}</span>
173173
</div></div>}
174174
{warning.key == 'HEURISTIC' && <div className="flex flex-col gap-y-2">
175-
<span className="text-sm">
176-
<Tooltip content={TOOLTIPS_DICT.PROJECT_SETTINGS.LABELING_TASK.OPEN_HEURISTICS} placement="right" color="invert">
177-
<a href={'../heuristics/' + warning.id} target="_blank"
178-
className="cursor-pointer underline font-medium">
179-
Current source code:</a>
180-
</Tooltip>
181-
</span>
182-
<Highlight text={warning.oldParsed} searchFor={warning.old_highlighting} />
183-
<span className="text-sm font-medium text-left">Suggested changes:</span>
184-
<Highlight text={warning.newParsed} searchFor={warning.new_highlighting} />
175+
<span className="text-sm font-medium underline text-left">Current source code:</span>
176+
<Highlight text={warning.oldParsed} searchFor={warning.oldHighlighting} />
177+
<span className="text-sm font-medium underline text-left">Suggested changes:</span>
178+
<Highlight text={warning.newParsed} searchFor={warning.newHighlighting} />
185179
</div>}
186180
<KernButton
187181
text="Change"

src/components/shared/highlight/Highlight.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ export default function Highlight(props: any) {
4545
setParts(extendArrayElementsByUniqueId(rebuildText(props.text, finalRegEx)));
4646
}, [finalRegEx, props.text]);
4747

48-
return (<span>
48+
return (<pre className="text-left text-sm">
4949
{parts && parts.map((part, index) => (<span key={part.id} className={`${part.isMatch ? highlightClass : null} ${addClassString}`}>
5050
{part.text}
5151
</span>))}
52-
</span>)
52+
</pre>)
5353
}

0 commit comments

Comments
 (0)