add tree view (#906)

This commit is contained in:
马曜峥行
2026-04-14 20:08:59 +03:00
committed by GitHub
parent 1656c3bb93
commit 43a4c0c874
9 changed files with 434 additions and 35 deletions
@@ -50,6 +50,7 @@ interface ChangeRowProps {
isReverting: boolean;
stats?: { insertions: number; deletions: number };
rowPaddingClassName?: string;
indentPx?: number;
}
export const ChangeRow = React.memo<ChangeRowProps>(function ChangeRow({
@@ -61,6 +62,7 @@ export const ChangeRow = React.memo<ChangeRowProps>(function ChangeRow({
isReverting,
stats,
rowPaddingClassName,
indentPx = 0,
}) {
const descriptor = useMemo(() => describeChange(file), [file]);
const indicatorLabel = descriptor.description;
@@ -105,6 +107,7 @@ export const ChangeRow = React.memo<ChangeRowProps>(function ChangeRow({
tabIndex={0}
onClick={onViewDiff}
onKeyDown={handleKeyDown}
style={indentPx > 0 ? { paddingLeft: `${indentPx}px` } : undefined}
>
<button
type="button"