fix: expand git history dialog height

Give the history dialog more vertical space
Let the commit list fill the dialog height
This commit is contained in:
Bohdan Triapitsyn
2026-05-06 01:34:58 +03:00
parent 9af3b49e7b
commit a6582bbcff
2 changed files with 7 additions and 4 deletions
+2 -1
View File
@@ -2315,7 +2315,7 @@ export const GitView: React.FC = () => {
</div> </div>
<Dialog open={isHistoryDialogOpen} onOpenChange={setIsHistoryDialogOpen}> <Dialog open={isHistoryDialogOpen} onOpenChange={setIsHistoryDialogOpen}>
<DialogContent className="max-w-5xl max-h-[80vh] flex flex-col overflow-hidden"> <DialogContent className="max-w-5xl h-[90vh] max-h-[90vh] flex flex-col overflow-hidden">
<DialogHeader> <DialogHeader>
<DialogTitle>{t('gitView.history.title')}</DialogTitle> <DialogTitle>{t('gitView.history.title')}</DialogTitle>
<DialogDescription> <DialogDescription>
@@ -2334,6 +2334,7 @@ export const GitView: React.FC = () => {
loadingCommitHashes={loadingCommitHashes} loadingCommitHashes={loadingCommitHashes}
onCopyHash={handleCopyCommitHash} onCopyHash={handleCopyCommitHash}
showHeader={false} showHeader={false}
contentMaxHeightClassName="h-full max-h-none"
branchDivider={historyBranchDivider} branchDivider={historyBranchDivider}
/> />
</div> </div>
@@ -34,6 +34,7 @@ interface HistorySectionProps {
loadingCommitHashes: Set<string>; loadingCommitHashes: Set<string>;
onCopyHash: (hash: string) => void; onCopyHash: (hash: string) => void;
showHeader?: boolean; showHeader?: boolean;
contentMaxHeightClassName?: string;
branchDivider?: { branchDivider?: {
insertBeforeIndex: number; insertBeforeIndex: number;
branchName: string; branchName: string;
@@ -52,6 +53,7 @@ export const HistorySection: React.FC<HistorySectionProps> = ({
loadingCommitHashes, loadingCommitHashes,
onCopyHash, onCopyHash,
showHeader = true, showHeader = true,
contentMaxHeightClassName = 'max-h-[50vh]',
branchDivider = null, branchDivider = null,
}) => { }) => {
const { t } = useI18n(); const { t } = useI18n();
@@ -96,7 +98,7 @@ export const HistorySection: React.FC<HistorySectionProps> = ({
); );
const content = ( const content = (
<ScrollableOverlay outerClassName="min-h-0 max-h-[50vh]" className="w-full"> <ScrollableOverlay outerClassName={`min-h-0 ${contentMaxHeightClassName}`} className="h-full w-full">
{log.all.length === 0 ? ( {log.all.length === 0 ? (
<div className="flex h-full items-center justify-center p-4"> <div className="flex h-full items-center justify-center p-4">
<p className="typography-ui-label text-muted-foreground"> <p className="typography-ui-label text-muted-foreground">
@@ -134,10 +136,10 @@ export const HistorySection: React.FC<HistorySectionProps> = ({
if (!showHeader) { if (!showHeader) {
if (hasSplitHistory) { if (hasSplitHistory) {
return <section>{content}</section>; return <section className="h-full min-h-0">{content}</section>;
} }
return ( return (
<section className="rounded-xl border border-border/60 bg-background/70 overflow-hidden"> <section className="h-full min-h-0 rounded-xl border border-border/60 bg-background/70 overflow-hidden">
{content} {content}
</section> </section>
); );