Make some minor improvements on tooltip popover (#604)

This commit is contained in:
Tan Nhu 2023-09-22 19:31:04 +00:00 committed by Harness
parent ecfe2b5cff
commit a96c2a92f9
4 changed files with 18 additions and 2 deletions

View File

@ -95,7 +95,7 @@ const CheckPipelineStep: React.FC<CheckPipelineStepsProps & { step: TypesStep }>
_logs.forEach(_log => fragment.appendChild(createLogLineElement(_log)))
const scrollParent = logContainer.closest(`.${css.content}`) as HTMLDivElement
const scrollParent = logContainer?.closest(`.${css.content}`) as HTMLDivElement
const autoScroll = scrollParent && scrollParent.scrollTop === scrollParent.scrollHeight - scrollParent.offsetHeight
logContainer.appendChild(fragment)

View File

@ -70,3 +70,13 @@
}
}
}
.popover {
:global {
.bp3-popover-content {
padding: var(--spacing-medium);
max-width: 700px;
word-break: break-all;
}
}
}

View File

@ -6,6 +6,7 @@ export declare const checksCount: string
export declare const checksCountLayout: string
export declare const input: string
export declare const main: string
export declare const popover: string
export declare const prNumber: string
export declare const prTitle: string
export declare const titleText: string

View File

@ -96,7 +96,12 @@ export const PullRequestTitle: React.FC<PullRequestTitleProps> = ({
</Truthy>
<Else>
<>
<Text tag="h1" className={css.titleText} font={{ variation: FontVariation.H4 }} lineClamp={1}>
<Text
tag="h1"
className={css.titleText}
font={{ variation: FontVariation.H4 }}
lineClamp={1}
tooltipProps={{ portalClassName: css.popover }}>
{original} <span className={css.prNumber}>#{number}</span>
</Text>
<Button