| ... | @@ -16,6 +16,7 @@ import { useAtomCommand } from "~/state/use-atom-command"; | ... | @@ -16,6 +16,7 @@ import { useAtomCommand } from "~/state/use-atom-command"; |
| 16 | import { formatRelativeTimeLabel } from "~/timestampFormat"; | 16 | import { formatRelativeTimeLabel } from "~/timestampFormat"; |
| 17 | import { Button } from "../ui/button"; | 17 | import { Button } from "../ui/button"; |
| 18 | import { Menu, MenuItem, MenuPopup, MenuTrigger } from "../ui/menu"; | 18 | import { Menu, MenuItem, MenuPopup, MenuTrigger } from "../ui/menu"; |
| | 19 | import { MiddleTruncate } from "../ui/middle-truncate"; |
| 19 | import { ScrollArea } from "../ui/scroll-area"; | 20 | import { ScrollArea } from "../ui/scroll-area"; |
| 20 | import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip"; | 21 | import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip"; |
| 21 | import { openLinkPullRequestDialog } from "./LinkPullRequestDialog"; | 22 | import { openLinkPullRequestDialog } from "./LinkPullRequestDialog"; |
| ... | @@ -161,7 +162,17 @@ function LinkRow({ | ... | @@ -161,7 +162,17 @@ function LinkRow({ |
| 161 | /> | 162 | /> |
| 162 | ) : null} | 163 | ) : null} |
| 163 | {snapshot !== null ? ( | 164 | {snapshot !== null ? ( |
| 164 | <PullRequestRowBranches head={snapshot.headBranch} base={snapshot.baseBranch} /> | 165 | <> |
| | 166 | {/* Cut in the middle: rows from one owner differ in the repository name at the |
| | 167 | end, which a tail cut would hide. */} |
| | 168 | <Tooltip> |
| | 169 | <TooltipTrigger render={<span className="flex min-w-0 max-w-32 font-mono" />}> |
| | 170 | <MiddleTruncate value={link.repository} showTitle={false} /> |
| | 171 | </TooltipTrigger> |
| | 172 | <TooltipPopup>{link.repository}</TooltipPopup> |
| | 173 | </Tooltip> |
| | 174 | <PullRequestRowBranches head={snapshot.headBranch} base={snapshot.baseBranch} /> |
| | 175 | </> |
| 165 | ) : ( | 176 | ) : ( |
| 166 | <span className="truncate font-mono"> | 177 | <span className="truncate font-mono"> |
| 167 | {link.host}/{link.repository} | 178 | {link.host}/{link.repository} |