fix: [code-1756]: fix aida btn (#1210)

This commit is contained in:
Calvin Lee 2024-04-12 05:40:15 +00:00 committed by Harness
parent fb78234a0f
commit 740d47529a
4 changed files with 16 additions and 2 deletions

View File

@ -270,7 +270,7 @@ export function MarkdownEditorWithPreview({
} }
setFlag?.(false) setFlag?.(false)
} }
}, [handleCopilotClick]) // eslint-disable-line react-hooks/exhaustive-deps }, [handleCopilotClick, flag]) // eslint-disable-line react-hooks/exhaustive-deps
useEffect(() => { useEffect(() => {
if (!isEmpty(data)) { if (!isEmpty(data)) {

View File

@ -268,6 +268,16 @@
} }
} }
.popoverDescriptionbox {
:global {
.bp3-popover-content {
padding: var(--spacing-small);
max-width: 700px;
word-break: break-all;
}
}
}
.copyButton { .copyButton {
--button-height: 14px !important; --button-height: 14px !important;
} }

View File

@ -38,6 +38,7 @@ export declare const mergeContainer: string
export declare const mergedBox: string export declare const mergedBox: string
export declare const optionMenuIcon: string export declare const optionMenuIcon: string
export declare const popover: string export declare const popover: string
export declare const popoverDescriptionbox: string
export declare const refreshIcon: string export declare const refreshIcon: string
export declare const repeatBtn: string export declare const repeatBtn: string
export declare const rightTextPadding: string export declare const rightTextPadding: string

View File

@ -97,6 +97,9 @@ export const DescriptionBox: React.FC<DescriptionBoxProps> = ({
repoMetadata={repoMetadata} repoMetadata={repoMetadata}
value={content} value={content}
flag={flag} flag={flag}
targetGitRef={pullReqMetadata?.target_branch}
sourceGitRef={pullReqMetadata?.source_branch}
handleCopilotClick={handleCopilotClick}
setFlag={setFlag} setFlag={setFlag}
outlets={{ outlets={{
[CommentBoxOutletPosition.START_OF_MARKDOWN_EDITOR_TOOLBAR]: ( [CommentBoxOutletPosition.START_OF_MARKDOWN_EDITOR_TOOLBAR]: (
@ -125,7 +128,7 @@ export const DescriptionBox: React.FC<DescriptionBoxProps> = ({
interactionKind: 'hover', interactionKind: 'hover',
usePortal: true, usePortal: true,
position: PopoverPosition.BOTTOM_LEFT, position: PopoverPosition.BOTTOM_LEFT,
popoverClassName: cx(css.popover) popoverClassName: cx(css.popoverDescriptionbox)
}} }}
/> />
) : null} ) : null}