Compare commits

...
Author SHA1 Message Date
l0ng-ai 478939fcfa fix(vcs): stop Git Log panes flashing a scrollbar while resizing
The split panels' own overflow: auto showed a native scrollbar whenever a
fractional panel height left 1px of rounding overflow, so it flickered while
the tool window was dragged. The log's panes scroll themselves; their panels
now clip instead.
2026-11-20 21:43:40 +08:00
3 changed files with 16 additions and 9 deletions

No files matched your search

+4 -3
View File
@@ -24,6 +24,7 @@ import { CommitDetails } from "./log/CommitDetails";
import { CommitList } from "./log/CommitList";
import { FilterBar } from "./log/FilterBar";
import { useLogRepositories, useReadOnlyLog } from "./log/logHooks";
import { PANE_STYLE } from "./log/shared";
import { LogIdContext } from "./logContext";
import { invalidateLogDetails } from "./logDetails";
import { useLogOptions } from "./logOptions";
@@ -223,13 +224,13 @@ export function LogView() {
>
{showBranches && (
<>
<SplitPanel id="branches" defaultSize="18%" minSize="120px">
<SplitPanel id="branches" style={PANE_STYLE} defaultSize="18%" minSize="120px">
<BranchesPanel />
</SplitPanel>
<SplitHandle />
</>
)}
<SplitPanel id="commits" defaultSize="54%" minSize="25%">
<SplitPanel id="commits" style={PANE_STYLE} defaultSize="54%" minSize="25%">
<div className={styles.log}>
<FilterBar />
<CommitList />
@@ -238,7 +239,7 @@ export function LogView() {
{showDetails && (
<>
<SplitHandle />
<SplitPanel id="details" defaultSize="28%" minSize="15%">
<SplitPanel id="details" style={PANE_STYLE} defaultSize="28%" minSize="15%">
<CommitDetails key={selection.join(" ") || "none"} commits={commits} />
</SplitPanel>
</>
+5 -5
View File
@@ -52,7 +52,7 @@ import { commitKey, commitRepo } from "../multiRoot";
import { currentRepo, repoName } from "../store";
import { CommitMessage } from "./CommitMessage";
import { useDropdownMenu, useReadOnlyLog } from "./logHooks";
import { toggle } from "./shared";
import { PANE_STYLE, toggle } from "./shared";
const LogMergePreview = lazyComponent(() => import("../GitMergeDiff").then((m) => m.GitMergeDiff));
@@ -312,7 +312,7 @@ export function CommitDetails({ commits }: { commits: Commit[] }) {
const details = (
<SplitGroup orientation="vertical" id="git-log-details" storageKey="openidea.vcs.logDetailsSplit">
<SplitPanel id="files" defaultSize="60%" minSize="60px">
<SplitPanel id="files" style={PANE_STYLE} defaultSize="60%" minSize="60px">
<div
className={styles.filesPane}
onFocusCapture={() => setContext("vcsLogChangesFocus", true)}
@@ -412,7 +412,7 @@ export function CommitDetails({ commits }: { commits: Commit[] }) {
</div>
</SplitPanel>
<SplitHandle />
<SplitPanel id="message" minSize="60px">
<SplitPanel id="message" style={PANE_STYLE} minSize="60px">
<div className={styles.messageBox}>
{many ? (
chosen.map((c) => <CommitMessage key={commitKey(c)} commit={c} compact />)
@@ -434,11 +434,11 @@ export function CommitDetails({ commits }: { commits: Commit[] }) {
id={`git-log-preview-${diffLocation}`}
storageKey={`openidea.vcs.logPreviewSplit.${diffLocation}`}
>
<SplitPanel id="changes" defaultSize="55%" minSize="20%">
<SplitPanel id="changes" style={PANE_STYLE} defaultSize="55%" minSize="20%">
{details}
</SplitPanel>
<SplitHandle />
<SplitPanel id="preview" minSize="20%">
<SplitPanel id="preview" style={PANE_STYLE} minSize="20%">
{selectedChange ? (
selectedChange.mergeParents?.length === 2 && selectedChange.after ? (
<LogMergePreview
+7 -1
View File
@@ -1,6 +1,6 @@
import type { Commit } from "@/bindings";
import { type MenuItem } from "@/ui";
import { type ReactNode } from "react";
import { type CSSProperties, type ReactNode } from "react";
import { type LogOptions } from "../logOptions";
import { updateLogOptions } from "../logStore";
@@ -8,6 +8,12 @@ export const ROW = 26;
export const LANE = 14;
/**
* Style for the log's split panels. Their panes scroll themselves; the panel's own
* `overflow: auto` showed a scrollbar for sub-pixel overflow while a split was dragged.
*/
export const PANE_STYLE: CSSProperties = { overflow: "hidden" };
export interface LogColumn {
id: string;
title: string;