diff --git a/web/src/components/DiffViewer/DiffViewer.module.scss b/web/src/components/DiffViewer/DiffViewer.module.scss index 30913f2e4..398857a19 100644 --- a/web/src/components/DiffViewer/DiffViewer.module.scss +++ b/web/src/components/DiffViewer/DiffViewer.module.scss @@ -234,6 +234,10 @@ box-shadow: 0px 2px 4px 0px rgba(96, 97, 112, 0.16), 0px 0px 1px 0px rgba(40, 41, 61, 0.04); z-index: 4; + .fnamePopover { + display: flex; + } + .chevron { align-self: center; height: 24px; @@ -244,6 +248,7 @@ align-self: center; align-items: center; text-align: left; + max-width: calc(100vw - 600px); a { font-size: 13px; @@ -363,4 +368,14 @@ } } +.popover { + :global { + .bp3-popover-content { + padding: var(--spacing-medium); + max-width: 700px; + word-break: break-all; + } + } +} + // TODO: Restyle DiffView to match latest design (https://www.figma.com/file/PgBvi804VdQNyLS8fD9K0p/Code?node-id=9391%3A118114&mode=dev) diff --git a/web/src/components/DiffViewer/DiffViewer.module.scss.d.ts b/web/src/components/DiffViewer/DiffViewer.module.scss.d.ts index 04c2f5466..0ef935499 100644 --- a/web/src/components/DiffViewer/DiffViewer.module.scss.d.ts +++ b/web/src/components/DiffViewer/DiffViewer.module.scss.d.ts @@ -24,8 +24,10 @@ export declare const diffContent: string export declare const diffHeader: string export declare const fileChanged: string export declare const fname: string +export declare const fnamePopover: string export declare const main: string export declare const navV2: string +export declare const popover: string export declare const readOnly: string export declare const sidebarCollapsed: string export declare const standalone: string diff --git a/web/src/components/DiffViewer/DiffViewer.tsx b/web/src/components/DiffViewer/DiffViewer.tsx index feb0c8119..9a0c4c85d 100644 --- a/web/src/components/DiffViewer/DiffViewer.tsx +++ b/web/src/components/DiffViewer/DiffViewer.tsx @@ -467,7 +467,14 @@ const DiffViewerInternal: React.FC = ({ }} className={css.chevron} /> - + = ({ - - {commentItems[0].payload?.code_comment?.path} - + lineClamp={1} + tooltipProps={{ + portalClassName: css.popover + }}> + + {commentItems[0].payload?.code_comment?.path} + + diff --git a/web/src/pages/PullRequest/Conversation/Conversation.module.scss b/web/src/pages/PullRequest/Conversation/Conversation.module.scss index b82fb315d..3bb7aab4d 100644 --- a/web/src/pages/PullRequest/Conversation/Conversation.module.scss +++ b/web/src/pages/PullRequest/Conversation/Conversation.module.scss @@ -144,7 +144,7 @@ border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); - .fname { + .fname a { font-size: 13px !important; font-weight: 600 !important; color: var(--grey-900) !important; @@ -241,3 +241,13 @@ .commitContainer { padding-top: 1px; } + +.popover { + :global { + .bp3-popover-content { + padding: var(--spacing-medium); + max-width: 700px; + word-break: break-all; + } + } +} diff --git a/web/src/pages/PullRequest/Conversation/Conversation.module.scss.d.ts b/web/src/pages/PullRequest/Conversation/Conversation.module.scss.d.ts index 575f88f57..5fac565a5 100644 --- a/web/src/pages/PullRequest/Conversation/Conversation.module.scss.d.ts +++ b/web/src/pages/PullRequest/Conversation/Conversation.module.scss.d.ts @@ -35,6 +35,7 @@ export declare const menuWrapper: string export declare const mergeContainer: string export declare const mergedBox: string export declare const optionMenuIcon: string +export declare const popover: string export declare const refreshIcon: string export declare const repeatBtn: string export declare const selectButton: string diff --git a/web/src/pages/Repository/RepositoryContent/ContentHeader/ContentHeader.tsx b/web/src/pages/Repository/RepositoryContent/ContentHeader/ContentHeader.tsx index 7ac4a722e..f8cc00c93 100644 --- a/web/src/pages/Repository/RepositoryContent/ContentHeader/ContentHeader.tsx +++ b/web/src/pages/Repository/RepositoryContent/ContentHeader/ContentHeader.tsx @@ -96,7 +96,7 @@ export function ContentHeader({ }} onCreateBranch={openCreateNewBranchModal} /> - +