Skip to content

Commit 98c6401

Browse files
committed
#RI-5786 - fix styles
#RI-5787 - change parsing from human message
1 parent 4ed96dd commit 98c6401

File tree

7 files changed

+41
-12
lines changed

7 files changed

+41
-12
lines changed

redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/shared/chat-history/ChatHistory.tsx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,17 @@ const ChatHistory = (props: Props) => {
6060
data-testid={`ai-message-${messageType}_${id}`}
6161
>
6262
{error && (<EuiIcon type="alert" className={styles.errorIcon} />)}
63-
<MarkdownMessage
64-
onRunCommand={onRunCommand}
65-
onMessageRendered={onMessageRendered}
66-
modules={modules}
67-
>
68-
{content}
69-
</MarkdownMessage>
63+
{messageType === AiChatMessageType.HumanMessage
64+
? content
65+
: (
66+
<MarkdownMessage
67+
onRunCommand={onRunCommand}
68+
onMessageRendered={onMessageRendered}
69+
modules={modules}
70+
>
71+
{content}
72+
</MarkdownMessage>
73+
)}
7074
</div>
7175
</div>
7276
<ErrorMessage error={error} onRestart={onRestart} />

redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/shared/markdown-message/MarkdownMessage.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const MarkdownMessage = (props: Props) => {
2929
} = props
3030

3131
const [content, setContent] = useState('')
32+
const [parseAsIs, setParseAsIs] = useState(false)
3233

3334
const ChatCodeBlock = useCallback((codeProps: CodeProps) =>
3435
(<CodeBlock {...codeProps} modules={modules} onRunCommand={onRunCommand} />), [modules])
@@ -43,7 +44,7 @@ const MarkdownMessage = (props: Props) => {
4344
})
4445
setContent(formated)
4546
} catch {
46-
// ignore
47+
setParseAsIs(true)
4748
}
4849
}
4950

@@ -56,14 +57,18 @@ const MarkdownMessage = (props: Props) => {
5657
}
5758
}, [content])
5859

60+
if (parseAsIs) {
61+
return <>{children}</>
62+
}
63+
5964
return (
6065
// @ts-ignore
6166
<JsxParser
6267
components={components}
6368
blacklistedTags={['iframe', 'script']}
6469
autoCloseVoidElements
6570
jsx={content}
66-
onError={(e) => console.error(e)}
71+
onError={() => setParseAsIs(true)}
6772
/>
6873
)
6974
}

redisinsight/ui/src/components/table-column-search-trigger/styles.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
:global {
1313
.euiFormControlLayout--group {
14-
border: 0;
14+
border: 0 !important;
1515
height: 100%;
1616
}
1717

redisinsight/ui/src/components/virtual-table/styles.module.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,10 @@ $footerHeight: 38px;
199199
padding: 18px 4px 18px 20px;
200200
}
201201

202+
.tableRowColumn {
203+
min-height: 100%;
204+
}
205+
202206
.tableRowCell {
203207
padding: 8px 6px 8px 20px !important;
204208
min-height: 42px;

redisinsight/ui/src/pages/database-analysis/components/top-keys/styles.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
:global(.euiButton.euiButton-isDisabled.euiButton--fill.euiButton--secondary) {
3131
background: var(--browserComponentActive) !important;
3232
color: var(--wbActiveIconColor) !important;
33-
opacity: 1;
33+
opacity: 1 !important;
3434
}
3535
}
3636

redisinsight/ui/src/styles/base/_base.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ main.euiPageBody {
6060
}
6161

6262
.euiLoadingSpinner {
63-
border-top-color: var(--euiColorDarkestShade) !important;
63+
border-top-color: transparent;
6464
}
6565

6666
.link-underline {

redisinsight/ui/src/styles/base/_overrides.scss

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,19 @@ body .euiSuperSelect__listbox {
6060
.euiPanel {
6161
border-color: var(--euiColorLightShade);
6262
}
63+
64+
.euiFormControlLayout--group .euiFormLabel {
65+
background-color: var(--tableDarkestBorderColor);
66+
color: var(--htmlColor)
67+
}
68+
69+
.euiTab {
70+
color: var(--euiTextColor);
71+
&.euiTab-isSelected {
72+
color: var(--euiColorPrimary);
73+
}
74+
}
75+
76+
.euiFilePicker-hasFiles .euiFilePicker__promptText {
77+
color: var(--euiTextColor);
78+
}

0 commit comments

Comments
 (0)