@gitkraken/gitkraken-components 13.0.0-vnext.3 → 13.0.0-vnext.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/components/dnd/DndComponent.d.ts +1 -1
- package/dist/components/dnd/DndContainer.d.ts +1 -1
- package/dist/components/graph/GraphColumn.d.ts +7 -2
- package/dist/components/graph/GraphContainer.d.ts +294 -31
- package/dist/components/graph/GraphHeaderRow.d.ts +5 -1
- package/dist/components/graph/GraphScrollMarker.d.ts +26 -5
- package/dist/components/graph/commitzone/CommitNode.d.ts +1 -1
- package/dist/components/graph/commitzone/CommitZone.d.ts +3 -2
- package/dist/components/graph/commitzone/GraphAvatar.d.ts +1 -1
- package/dist/components/graph/commitzone/edges/Arc.d.ts +2 -2
- package/dist/components/graph/commitzone/edges/Edges.d.ts +1 -1
- package/dist/components/graph/commitzone/edges/EndingEdge.d.ts +2 -2
- package/dist/components/graph/commitzone/edges/PassThroughEdge.d.ts +2 -2
- package/dist/components/graph/commitzone/edges/StartingEdge.d.ts +2 -2
- package/dist/components/graph/common/DraggableGraphHeader.d.ts +1 -1
- package/dist/components/graph/common/GenericGraphZone.d.ts +4 -2
- package/dist/components/graph/common/ScrollbarContainer.d.ts +1 -1
- package/dist/components/graph/common/StickyTimeline.d.ts +10 -0
- package/dist/components/graph/common/TimelineMessage.d.ts +6 -0
- package/dist/components/graph/messagezone/WorkDirMessageInput.d.ts +1 -1
- package/dist/components/graph/refzone/CreateRefNode.d.ts +1 -1
- package/dist/components/graph/refzone/RefNode.d.ts +11 -7
- package/dist/components/graph/refzone/RefNodeAnnotationTarget.d.ts +10 -0
- package/dist/components/graph/refzone/RefNodes.d.ts +4 -2
- package/dist/components/graph/refzone/RefZone.d.ts +8 -3
- package/dist/components/graph/rowAdornment/RowAdornmentLayer.d.ts +52 -0
- package/dist/components/graph/rowAdornment/RowAdornmentOverlay.d.ts +19 -0
- package/dist/components/graph/rowRenderers/CommitMessageZoneRow.d.ts +2 -1
- package/dist/components/graph/rowRenderers/CommitZoneRow.d.ts +2 -0
- package/dist/components/graph/rowRenderers/CommitsInfoRow.d.ts +1 -1
- package/dist/components/graph/rowRenderers/RefZoneRow.d.ts +2 -0
- package/dist/components/graph/shared/Avatar.d.ts +1 -1
- package/dist/components/graph/shared/FileDiffTypeIcon.d.ts +2 -1
- package/dist/components/graph/shared/WipStatsPill.d.ts +11 -0
- package/dist/components/resizable/Resizable.d.ts +2 -7
- package/dist/domain/commit/CommitHelpers.d.ts +2 -2
- package/dist/domain/commit/CommitTypes.d.ts +1 -0
- package/dist/domain/edge/EdgeHelpers.d.ts +4 -4
- package/dist/domain/generic/GenericTypes.d.ts +6 -0
- package/dist/domain/graph/GraphConstants.d.ts +18 -2
- package/dist/domain/graph/GraphEdgeHelpers.d.ts +34 -0
- package/dist/domain/graph/GraphHelpers.d.ts +29 -5
- package/dist/domain/graph/GraphTypes.d.ts +101 -10
- package/dist/domain/graph/PinnedBranchHelpers.d.ts +21 -0
- package/dist/domain/graph/ScopedGraphHelpers.d.ts +15 -0
- package/dist/domain/graph/row/ProcessedGraphRowObj.d.ts +6 -5
- package/dist/domain/graph/rowAdornment/RowAdornmentHelpers.d.ts +14 -0
- package/dist/domain/graph/rowAdornment/RowAdornmentTypes.d.ts +97 -0
- package/dist/domain/hostingservice/HostingServiceTypes.d.ts +2 -1
- package/dist/domain/reactvirtualized/ReactVirtualizedHelpers.d.ts +1 -1
- package/dist/domain/ref/RefConstants.d.ts +4 -1
- package/dist/domain/ref/RefTypes.d.ts +1 -1
- package/dist/domain/workdir/WorkDirHelpers.d.ts +50 -0
- package/dist/domain/workdir/WorkDirTypes.d.ts +51 -0
- package/dist/index.d.ts +16 -1
- package/dist/index.js +21 -2
- package/dist/styles.css +2 -2
- package/dist/types.d.ts +1 -0
- package/dist/utils/ObjectUtils.d.ts +29 -0
- package/package.json +100 -93
- package/CHANGELOG.md +0 -15
- package/ThirdPartyNotices.txt +0 -227
- package/dist/types.js +0 -1
package/README.md
CHANGED
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
This is a shared module between the GitKraken app and GitLens to share React components.
|
|
4
4
|
|
|
5
5
|
## Requires resolution to React 17
|
|
6
|
+
|
|
6
7
|
> [!WARNING]
|
|
7
8
|
> In order for this package to work properly, you must resolve React to version 17 in your own project.
|
|
8
9
|
> The reason for this is because this library's react-bootstrap dependency lists React 16 as a dependency, and npm/yarn 1 do not provide a way for dependencies to lock sub-dependencies. Therefore it is up to your project to force this library's react-bootstrap to use react 17.
|
|
9
10
|
> The following is an example of what to put into your package.json:
|
|
11
|
+
|
|
10
12
|
```
|
|
11
13
|
"resolutions": {
|
|
12
14
|
"react": "17.0.2",
|
|
@@ -14,4 +16,8 @@ This is a shared module between the GitKraken app and GitLens to share React com
|
|
|
14
16
|
}
|
|
15
17
|
```
|
|
16
18
|
|
|
19
|
+
## Guides
|
|
20
|
+
|
|
21
|
+
- [Multi-WIP rows](./docs/multi-wip-rows.md) — rendering secondary (per-worktree) WIP rows, deferred stats loading, and stale-while-revalidate invalidation.
|
|
22
|
+
|
|
17
23
|
[CHANGELOG](./CHANGELOG.md)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CSSProperties, ReactElement, ReactNode } from 'react';
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
export type DndCanDrag = (sourceData?: any) => boolean;
|
|
4
4
|
export type DndOnBeginDrag = (event: React.DragEvent, sourceData?: any) => void;
|
|
5
5
|
export type DndOnDragEnter = (event: React.DragEvent, sourceData?: any, targetData?: any) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Drake } from 'dragula';
|
|
2
2
|
import type { ReactElement, ReactNode } from 'react';
|
|
3
|
-
import React from 'react';
|
|
3
|
+
import * as React from 'react';
|
|
4
4
|
export type DndDirection = 'vertical' | 'horizontal';
|
|
5
5
|
export type DndIsDraggable = (source: ReactElement<any>) => boolean;
|
|
6
6
|
export type DndIsDroppable = (source: ReactElement<any>, target: ReactElement<any>) => boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Alignment, GridCellRangeRenderer } from 'react-virtualized';
|
|
2
2
|
import type { ReactElement } from 'react';
|
|
3
3
|
import type { GraphMarkerType, GraphZone, GraphZoneType } from '../../domain/graph/GraphConstants';
|
|
4
|
-
import type { ColumnContentGenerator, GetExternalIcon, GraphMarkerColors, GraphMarkerRowIndices, OnGraphZoneResize, OnGraphZoneResizeEnd, OnGraphZoneResizeFromPropChange, OnScrollForZone, RowRenderersByIds } from '../../domain/graph/GraphTypes';
|
|
4
|
+
import type { ColumnContentGenerator, GetExternalIcon, GraphMarkerColors, GraphMarkerRowIndices, InteractiveScrollMarker, OnGraphZoneResize, OnGraphZoneResizeEnd, OnGraphZoneResizeFromPropChange, OnScrollForZone, OnScrollMarkerClicked, ProcessedGraphRow, RowRenderersByIds } from '../../domain/graph/GraphTypes';
|
|
5
5
|
import type { TranslationFn } from '../../domain/language/LanguageTypes';
|
|
6
6
|
import type { GetRealKeyForCellFunc } from '../../domain/reactvirtualized/ReactVirtualizedHelpers';
|
|
7
7
|
import type { OnMouseEnter } from '../../domain/ui/UiTypes';
|
|
@@ -20,9 +20,12 @@ type GraphColumnProps = {
|
|
|
20
20
|
graphZones: GraphZone[];
|
|
21
21
|
hasMoreCommits: boolean;
|
|
22
22
|
horizontalScrollHeight: number;
|
|
23
|
+
isFilteredSearch: boolean;
|
|
23
24
|
isLoadingRows: boolean;
|
|
24
25
|
markerColors: GraphMarkerColors;
|
|
25
26
|
markerRowIndices: GraphMarkerRowIndices;
|
|
27
|
+
interactiveScrollMarkers?: readonly InteractiveScrollMarker[];
|
|
28
|
+
onScrollMarkerClicked?: OnScrollMarkerClicked;
|
|
26
29
|
makeColumnContents?: ColumnContentGenerator;
|
|
27
30
|
onResize?: OnGraphZoneResize;
|
|
28
31
|
onResizeEnd?: OnGraphZoneResizeEnd;
|
|
@@ -31,13 +34,15 @@ type GraphColumnProps = {
|
|
|
31
34
|
onScrollToRowCausedUpdate?: OnScrollForZone;
|
|
32
35
|
onZoneEnter: OnMouseEnter;
|
|
33
36
|
cellRenderersByIds: RowRenderersByIds;
|
|
37
|
+
processedRows?: ProcessedGraphRow[];
|
|
34
38
|
scrollToAlignment?: Alignment;
|
|
35
39
|
scrollToIndex?: number;
|
|
36
40
|
scrollLeft: number;
|
|
37
41
|
scrollTop: number;
|
|
38
42
|
smartCellRangeRenderer: GridCellRangeRenderer;
|
|
43
|
+
stickyTimeline?: boolean;
|
|
39
44
|
translate: TranslationFn;
|
|
40
45
|
verticalScrollWidth: number;
|
|
41
46
|
};
|
|
42
|
-
export declare function GraphColumn({ branchUpstreamRowIndices, rowCount, cellRenderersByIds, columnIndex, customFooterRow, enabledScrollMarkerTypes, enableResizer, getExternalIcon, getKeyForCell, graphHeight, graphWidth, graphZoneType, graphZones, hasMoreCommits, horizontalScrollHeight, isLoadingRows, markerColors, markerRowIndices, onResize, onResizeEnd, onResizeFromPropChange, onScroll, onScrollToRowCausedUpdate, onZoneEnter, scrollLeft, scrollToAlignment, scrollToIndex, scrollTop, smartCellRangeRenderer, translate, verticalScrollWidth, }: GraphColumnProps): ReactElement<any> | null;
|
|
47
|
+
export declare function GraphColumn({ branchUpstreamRowIndices, rowCount, cellRenderersByIds, columnIndex, customFooterRow, enabledScrollMarkerTypes, enableResizer, getExternalIcon, getKeyForCell, graphHeight, graphWidth, graphZoneType, graphZones, hasMoreCommits, horizontalScrollHeight, isFilteredSearch, isLoadingRows, markerColors, markerRowIndices, interactiveScrollMarkers, onScrollMarkerClicked, onResize, onResizeEnd, onResizeFromPropChange, onScroll, onScrollToRowCausedUpdate, onZoneEnter, processedRows, scrollLeft, scrollToAlignment, scrollToIndex, scrollTop, smartCellRangeRenderer, stickyTimeline, translate, verticalScrollWidth, }: GraphColumnProps): ReactElement<any> | null;
|
|
43
48
|
export {};
|
|
@@ -1,20 +1,29 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import type { Alignment, ScrollParams } from 'react-virtualized';
|
|
3
2
|
import type { ReactElement } from 'react';
|
|
4
|
-
import React from 'react';
|
|
3
|
+
import * as React from 'react';
|
|
5
4
|
import type { Sha } from '../../domain/commit/CommitTypes';
|
|
6
5
|
import type { CssVariables } from '../../domain/generic/GenericTypes';
|
|
7
6
|
import type { GraphCommitDescDisplayMode, GraphMarkerType, GraphSearchMode, GraphZone, GraphZoneType, ShiftSelectMode } from '../../domain/graph/GraphConstants';
|
|
8
7
|
import type { ThrottledFn } from '../../domain/graph/GraphHelpers';
|
|
9
|
-
import type { AbsoluteNodeLeftByColumn, AvatarUrlByEmail, AvatarUrlRequestedByEmail, ChildrenBySha, ColumnColorByColumn, DownstreamsByUpstream,
|
|
8
|
+
import type { AbsoluteNodeLeftByColumn, AvatarUrlByEmail, AvatarUrlRequestedByEmail, ChildrenBySha, ColumnColorByColumn, DownstreamsByUpstream, ExcludeByType, ExcludeRefsById, ExcludeRemotesByName, FormatCommitMessage, FormatRefShorthand, GetExternalIcon, GetMissingAvatar, GetMissingRefMetadata, GraphColumnSetting, GraphColumnsSettings, GraphContexts, GraphMarkerColors, GraphMarkerRowIndices, GraphPlatform, GraphRefGroup, GraphRow, GraphScope, GraphZoneModeConstants, GraphZonesByType, Head, HighlightedShas, IncludeOnlyRefsById, IncludeOnlyRemotesByName, InteractiveScrollMarker, IsRefShorthandValid, IsSelectedBySha, NodeOffsetByColumn, NodeOpacityByColumn, OnClearCurrentlyHoveredGraphCommit, OnClickCommit, OnClickGraphRef, OnClickGraphRow, OnClickRef, OnColumnsCalculated, OnCommitContextMenu, OnCommitMessageChange, OnCurrentlyHoveredGraphCommit, OnDoubleClickCommit, OnDoubleClickGraphRef, OnDoubleClickGraphRow, OnDoubleClickRef, OnEmailsMissingAvatarUrls, OnFilterColumnClick, OnFormatCommitDateTime, OnGraphColumnReOrdered, OnGraphColumnResized, OnGraphColumnsReOrdered, OnGraphMouseEnter, OnGraphMouseLeave, OnGraphRefNodeHovered, OnGraphRefNodeUnhovered, OnGraphResized, OnGraphRowHovered, OnGraphRowUnhovered, OnGraphScrollForZone, OnGraphVisibleRowsChanged, OnGraphZoneResize, OnGraphZoneResizeEnd, OnLoadSelectedGraphRow, OnPopupGraphHeaderContextMenu, OnRefBeginDrag, OnRefCanDrag, OnRefCanDrop, OnRefContextMenu, OnRefCreate, OnRefCreateCancel, OnRefCreateContextMenu, OnRefDragEnter, OnRefDragLeave, OnRefDrop, OnRefEndDrag, OnRefNodeHovered, OnRefNodeUnhovered, OnRefShorthandChange, OnRefsMissingMetadata, OnRefZoneContextMenu, OnRefZoneHovered, OnRefZoneUnhovered, OnRowContextMenu, OnScrollForZone, OnSelectGraphRows, OnSettingsClick, OnShowMoreCommits, OnToggleRefNodesShown, OnToggleRefsVisibilityClick, OnWipMessageBlur, OnWipMessageFocus, ProcessedGraphRow, ProcessedGraphRowBySha, ReadonlyGraphRow, RefMetadataById, RefMetadataRequestedById, RefMetadataType, RefsMissingMetadata, Remote, ReserverInfoBySha, RowStats, RowStatsConstraints, ShaByRefId, Tag, TopAndBottomVisibleRowIndex } from '../../domain/graph/GraphTypes';
|
|
9
|
+
import type { RowAdornmentProvider } from '../../domain/graph/rowAdornment/RowAdornmentTypes';
|
|
10
10
|
import type { TranslationFn } from '../../domain/language/LanguageTypes';
|
|
11
11
|
import type { CreateRefFormData, RefIconsPosition } from '../../domain/ref/RefTypes';
|
|
12
|
-
import type {
|
|
13
|
-
import type { WorkDirStats } from '../../domain/workdir/WorkDirTypes';
|
|
12
|
+
import type { OnKeyDown, OnKeyUp, OnMouseDown, OnResizeParams } from '../../domain/ui/UiTypes';
|
|
13
|
+
import type { OnVisibleWipShasChanged, OnWipShasMissingStats, VisibleWipShas, WipNodeMetadataBySha, WipShasMissingStats, WorkDirStats } from '../../domain/workdir/WorkDirTypes';
|
|
14
14
|
import type { IGraphContainer } from './IGraphContainer';
|
|
15
15
|
type ClearScrollToIndex = () => void;
|
|
16
16
|
type OnZoneEnter = (e: React.MouseEvent<any>, zoneType: GraphZoneType, hoveredRefGroup?: GraphRefGroup, hoveredSha?: Sha) => void;
|
|
17
17
|
type OnGraphContainerBlurred = (event: React.FocusEvent<any>, hoveredRefGroup?: GraphRefGroup, hoveredSha?: Sha) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Options for the public selectCommits method.
|
|
20
|
+
*/
|
|
21
|
+
export interface SelectCommitsOptions {
|
|
22
|
+
/** If true, toggle selection; if false, replace selection. Default: false */
|
|
23
|
+
toggle?: boolean;
|
|
24
|
+
/** If true, scroll to ensure the focused commit is visible. Default: false */
|
|
25
|
+
ensureVisible?: boolean;
|
|
26
|
+
}
|
|
18
27
|
interface OwnProps {
|
|
19
28
|
formatCommitDateTime?: OnFormatCommitDateTime;
|
|
20
29
|
formatCommitMessage?: FormatCommitMessage;
|
|
@@ -30,6 +39,14 @@ export interface StateProps {
|
|
|
30
39
|
contexts?: GraphContexts | null;
|
|
31
40
|
createRefFormData?: CreateRefFormData | null;
|
|
32
41
|
dimMergeCommits?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Renders the graph as if every row's first parent is its sole parent — the same
|
|
44
|
+
* topology as `git log --first-parent --all`. Set this instead of filtering
|
|
45
|
+
* `--first-parent` upstream so toggling stays a re-process of the cached `graphRows`
|
|
46
|
+
* rather than a re-query. Composes with `scope`: scope walks honor first-parent
|
|
47
|
+
* ordering when this is set.
|
|
48
|
+
*/
|
|
49
|
+
onlyFirstParent?: boolean;
|
|
33
50
|
enableShowHideRefsOptions?: boolean;
|
|
34
51
|
downstreamsByUpstream?: DownstreamsByUpstream;
|
|
35
52
|
formatRefShorthand?: FormatRefShorthand;
|
|
@@ -38,13 +55,21 @@ export interface StateProps {
|
|
|
38
55
|
isRefShorthandValid?: IsRefShorthandValid;
|
|
39
56
|
showGhostRefsOnRowHover?: boolean;
|
|
40
57
|
showRemoteNamesOnRefs?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Whether stash rows can keep otherwise-unreferenced parent commits visible.
|
|
60
|
+
* Defaults to true for backwards compatibility. When false, a stash is shown
|
|
61
|
+
* only if its parent commit would already be visible for some other reason.
|
|
62
|
+
*/
|
|
63
|
+
stashesAnchorCommits?: boolean;
|
|
41
64
|
enabledRefMetadataTypes?: RefMetadataType[];
|
|
42
65
|
enabledScrollMarkerTypes?: GraphMarkerType[];
|
|
43
66
|
scrollRowPadding?: number;
|
|
44
67
|
enableMultiSelection?: boolean;
|
|
68
|
+
stickyTimeline?: boolean;
|
|
45
69
|
graphCommitDescDisplayMode?: GraphCommitDescDisplayMode;
|
|
46
70
|
graphRows: GraphRow[];
|
|
47
71
|
hasMoreCommits?: boolean;
|
|
72
|
+
hasMoreSearchResults?: boolean;
|
|
48
73
|
highlightedShas?: HighlightedShas;
|
|
49
74
|
excludeByType?: ExcludeByType;
|
|
50
75
|
excludeRefsById?: ExcludeRefsById;
|
|
@@ -54,6 +79,25 @@ export interface StateProps {
|
|
|
54
79
|
isInUnsupportedRebase?: boolean;
|
|
55
80
|
isLoadingRows?: boolean;
|
|
56
81
|
pendingCommitMessageSummary?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Full name of the branch to pin to the left-most column (column 0).
|
|
84
|
+
* Example: "refs/heads/main" or "refs/remotes/origin/main"
|
|
85
|
+
* If null or undefined, no branch is pinned.
|
|
86
|
+
*/
|
|
87
|
+
pinnedBranchFullName?: string | null;
|
|
88
|
+
/**
|
|
89
|
+
* Narrow the graph to commits reachable from a specific branch, its upstream (if any), and
|
|
90
|
+
* a merge-target tip commit. Anchors (tips + merge target) show all their refs and never
|
|
91
|
+
* propagate child refs to their parents. When an anchor's real parents are hidden, a
|
|
92
|
+
* synthetic wavy dashed edge is drawn to its nearest visible ancestor.
|
|
93
|
+
*/
|
|
94
|
+
scope?: GraphScope;
|
|
95
|
+
/**
|
|
96
|
+
* Fired when the helper determined that an anchor cannot reach a visible ancestor within the
|
|
97
|
+
* loaded graphRows (merge base not loaded). Consumer should fetch more data and re-render.
|
|
98
|
+
* Called once per processing pass, only when the set actually changes.
|
|
99
|
+
*/
|
|
100
|
+
onScopeAnchorsUnreachable?: (unreachableAnchors: Set<Sha>) => void;
|
|
57
101
|
shiftSelectMode?: ShiftSelectMode;
|
|
58
102
|
suppressNonRefRowTooltips?: boolean;
|
|
59
103
|
refMetadataById?: RefMetadataById | null;
|
|
@@ -66,8 +110,28 @@ export interface StateProps {
|
|
|
66
110
|
useAuthorInitialsForAvatars: boolean;
|
|
67
111
|
rowsStats?: Record<string, RowStats>;
|
|
68
112
|
rowsStatsLoading?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Controls when the WIP row is inserted into the graph.
|
|
115
|
+
* - 'auto' (default): shown only when there are pending working-tree changes.
|
|
116
|
+
* - 'always': shown even with a clean working tree, anchored at HEAD.
|
|
117
|
+
*/
|
|
118
|
+
wipVisibility?: 'always' | 'auto';
|
|
69
119
|
wipMessageEditable?: boolean;
|
|
70
120
|
workDirStats?: WorkDirStats;
|
|
121
|
+
wipNodeMetadataBySha?: WipNodeMetadataBySha;
|
|
122
|
+
/**
|
|
123
|
+
* Settle delay (ms) for the internal scroll-settle debounce that drives both
|
|
124
|
+
* `onVisibleWipShasChanged` and `onWipShasMissingStats`. Each scroll/visible-range change
|
|
125
|
+
* resets the timer; the callbacks fire once activity stops for this long. Raise it (e.g. 350)
|
|
126
|
+
* to avoid firing stats requests for rows that are only momentarily visible during fast scrolls.
|
|
127
|
+
* Defaults to 100.
|
|
128
|
+
*/
|
|
129
|
+
wipShasSettleDelayMs?: number;
|
|
130
|
+
/**
|
|
131
|
+
* Provider for row adornments.
|
|
132
|
+
* Graph subscribes to invalidate events and calls provide/resolve as needed.
|
|
133
|
+
*/
|
|
134
|
+
rowAdornmentProvider?: RowAdornmentProvider;
|
|
71
135
|
}
|
|
72
136
|
export interface DispatchProps {
|
|
73
137
|
onDoubleClickGraphRef?: OnDoubleClickGraphRef;
|
|
@@ -93,6 +157,12 @@ export interface DispatchProps {
|
|
|
93
157
|
onGraphColumnsReOrdered?: OnGraphColumnsReOrdered;
|
|
94
158
|
onFilterColumnClick?: OnFilterColumnClick;
|
|
95
159
|
onColumnResized?: OnGraphColumnResized;
|
|
160
|
+
/**
|
|
161
|
+
* Callback invoked when column numbers are calculated for each commit.
|
|
162
|
+
* Receives a map of SHA → column number.
|
|
163
|
+
* Used to sync column layout data back to the parent application.
|
|
164
|
+
*/
|
|
165
|
+
onColumnsCalculated?: OnColumnsCalculated;
|
|
96
166
|
onFocusWipNodeInput?: OnWipMessageFocus;
|
|
97
167
|
onMessageChange?: OnCommitMessageChange;
|
|
98
168
|
onPopupGraphHeaderContextMenu?: OnPopupGraphHeaderContextMenu;
|
|
@@ -110,6 +180,8 @@ export interface DispatchProps {
|
|
|
110
180
|
onGraphMouseLeave?: OnGraphMouseLeave;
|
|
111
181
|
onEmailsMissingAvatarUrls?: OnEmailsMissingAvatarUrls;
|
|
112
182
|
onRefsMissingMetadata?: OnRefsMissingMetadata;
|
|
183
|
+
onWipShasMissingStats?: OnWipShasMissingStats;
|
|
184
|
+
onVisibleWipShasChanged?: OnVisibleWipShasChanged;
|
|
113
185
|
}
|
|
114
186
|
interface Props extends OwnProps, StateProps, DispatchProps {
|
|
115
187
|
}
|
|
@@ -122,6 +194,7 @@ type ComponentState = {
|
|
|
122
194
|
cssVariablesWithDefaults: CssVariables;
|
|
123
195
|
currentlyHoveredCommitSha?: Sha;
|
|
124
196
|
dimMergeCommits: boolean;
|
|
197
|
+
onlyFirstParent: boolean;
|
|
125
198
|
dimRowsOfSelectedCommit: boolean;
|
|
126
199
|
enableShowHideRefsOptions: boolean;
|
|
127
200
|
highlightRowsOnRefHover: boolean;
|
|
@@ -139,6 +212,7 @@ type ComponentState = {
|
|
|
139
212
|
isLoadingRows: boolean;
|
|
140
213
|
numGraphColumns: number;
|
|
141
214
|
markerRowIndices: GraphMarkerRowIndices;
|
|
215
|
+
interactiveScrollMarkers: InteractiveScrollMarker[];
|
|
142
216
|
pendingCommitMessageSummary: string;
|
|
143
217
|
processedRows: ProcessedGraphRow[];
|
|
144
218
|
refIconsPosition: RefIconsPosition;
|
|
@@ -165,6 +239,7 @@ type HasMergeNodeChildBySha = {
|
|
|
165
239
|
[sha: Sha]: boolean;
|
|
166
240
|
};
|
|
167
241
|
declare class GraphContainer extends React.Component<Props, ComponentState> implements IGraphContainer {
|
|
242
|
+
static getDerivedStateFromProps(props: Props, state: ComponentState): Partial<ComponentState> | null;
|
|
168
243
|
private graphComponentRef;
|
|
169
244
|
private graphContainerRef;
|
|
170
245
|
private resizeObserver;
|
|
@@ -173,7 +248,8 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
|
|
|
173
248
|
isRefContextMenuShown: boolean;
|
|
174
249
|
isMounted: boolean;
|
|
175
250
|
selectedShas: Set<Sha>;
|
|
176
|
-
|
|
251
|
+
selectionAnchorSha?: Sha;
|
|
252
|
+
selectionFocusSha?: Sha;
|
|
177
253
|
processedGraphRowBySha: ProcessedGraphRowBySha;
|
|
178
254
|
shaByRefId: ShaByRefId;
|
|
179
255
|
childrenBySha: ChildrenBySha;
|
|
@@ -189,10 +265,16 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
|
|
|
189
265
|
shouldFireShowMoreCommits: boolean;
|
|
190
266
|
columnsToFreeWhenFound: ColumnsToFreeBySha;
|
|
191
267
|
hasMergeNodeChildBySha: HasMergeNodeChildBySha;
|
|
268
|
+
private _autoLoadTimer?;
|
|
192
269
|
reserverInfoBySha: ReserverInfoBySha;
|
|
193
270
|
columnsUsed: ColumnsUsed;
|
|
271
|
+
private pinnedBranchShas;
|
|
272
|
+
private scopeVisibility;
|
|
273
|
+
private syntheticEdgeChildShas;
|
|
274
|
+
private _lastReportedUnreachable;
|
|
194
275
|
rowsStats?: Record<string, RowStats>;
|
|
195
276
|
workDirStats: WorkDirStats;
|
|
277
|
+
private _markerColorsCache;
|
|
196
278
|
excludeByType: ExcludeByType;
|
|
197
279
|
excludeRefsById: ExcludeRefsById;
|
|
198
280
|
includeOnlyRefsById: IncludeOnlyRefsById;
|
|
@@ -208,18 +290,23 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
|
|
|
208
290
|
graphZonesByType: GraphZonesByType;
|
|
209
291
|
graphZoneOrdering: GraphZoneType[];
|
|
210
292
|
clientHeight: number;
|
|
211
|
-
missingAvatarsTimer?:
|
|
293
|
+
missingAvatarsTimer?: ReturnType<typeof setTimeout>;
|
|
212
294
|
pendingMissingAvatars: AvatarUrlByEmail;
|
|
213
295
|
requestedMissingAvatars: AvatarUrlRequestedByEmail;
|
|
214
|
-
missingRefsMetadataTimer?:
|
|
296
|
+
missingRefsMetadataTimer?: ReturnType<typeof setTimeout>;
|
|
215
297
|
pendingMissingRefsMetadata: RefsMissingMetadata;
|
|
216
298
|
requestedMissingRefsMetadata: RefMetadataRequestedById;
|
|
299
|
+
previousRefMetadataById: RefMetadataById | null;
|
|
300
|
+
requestedMissingWipStats: WipShasMissingStats;
|
|
301
|
+
visibleWipShasTimer?: ReturnType<typeof setTimeout>;
|
|
302
|
+
lastFiredVisibleWipShas: VisibleWipShas | undefined;
|
|
217
303
|
branchUpstreamRowIndices: number[];
|
|
304
|
+
private interactiveScrollMarkersFromRows;
|
|
218
305
|
downstreamsByUpstream: DownstreamsByUpstream;
|
|
219
|
-
timelinesInterval?:
|
|
306
|
+
timelinesInterval?: ReturnType<typeof setInterval>;
|
|
220
307
|
constructor(props: Props);
|
|
221
308
|
componentDidMount(): void;
|
|
222
|
-
|
|
309
|
+
componentDidUpdate(prevProps: Props, prevState: ComponentState): void;
|
|
223
310
|
componentWillUnmount(): void;
|
|
224
311
|
focus(): void;
|
|
225
312
|
getRefIconsPositionOrDefault(refIconsPosition?: RefIconsPosition | null): RefIconsPosition;
|
|
@@ -246,14 +333,76 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
|
|
|
246
333
|
onRefDragLeave: OnRefDragLeave;
|
|
247
334
|
onRefDrop: OnRefDrop;
|
|
248
335
|
onRefEndDrag: OnRefEndDrag;
|
|
336
|
+
private performRangeSelection;
|
|
249
337
|
onZoneRowClick(event: React.MouseEvent<any>, graphZoneType: GraphZoneType, sha: Sha): void;
|
|
250
|
-
|
|
338
|
+
private handleToggleSelection;
|
|
339
|
+
getShiftSelectRange(currentSha: Sha, shiftSelectMode: ShiftSelectMode): Sha[] | undefined;
|
|
340
|
+
/**
|
|
341
|
+
* Check if a commit can extend the current topological selection via Ctrl+Click.
|
|
342
|
+
*
|
|
343
|
+
* In topological mode, we maintain a contiguous path through the git graph.
|
|
344
|
+
* This method determines if adding a commit would maintain that contiguity.
|
|
345
|
+
*
|
|
346
|
+
* Graph orientation:
|
|
347
|
+
* - Lower row index = NEWER commits (children, at top of graph)
|
|
348
|
+
* - Higher row index = OLDER commits (parents, at bottom of graph)
|
|
349
|
+
* - `getDirectTopologicalPathBetween(A, B)` finds path from A to B following parent pointers,
|
|
350
|
+
* meaning B must be an ancestor (older) of A
|
|
351
|
+
*
|
|
352
|
+
* Three cases based on clicked commit's position relative to selection bounds:
|
|
353
|
+
*
|
|
354
|
+
* 1. NEWER than newest selected (clickedIndex < newestIndex):
|
|
355
|
+
* - Clicked commit would extend the TOP of the selection
|
|
356
|
+
* - Check: clicked → newest (is newest an ancestor of clicked?)
|
|
357
|
+
* - Example: Selection is rows 5-10, clicking row 3
|
|
358
|
+
* Must verify row 3 can reach row 5 by following parents
|
|
359
|
+
*
|
|
360
|
+
* 2. OLDER than oldest selected (clickedIndex > oldestIndex):
|
|
361
|
+
* - Clicked commit would extend the BOTTOM of the selection
|
|
362
|
+
* - Check: oldest → clicked (is clicked an ancestor of oldest?)
|
|
363
|
+
* - Example: Selection is rows 5-10, clicking row 12
|
|
364
|
+
* Must verify row 10 can reach row 12 by following parents
|
|
365
|
+
*
|
|
366
|
+
* 3. BETWEEN newest and oldest (newestIndex < clickedIndex < oldestIndex):
|
|
367
|
+
* - Clicked commit must be ON the existing path, not a parallel branch
|
|
368
|
+
* - Check BOTH directions:
|
|
369
|
+
* - newest → clicked (is clicked an ancestor of newest?)
|
|
370
|
+
* - clicked → oldest (is oldest an ancestor of clicked?)
|
|
371
|
+
* - Example: Selection is rows 5-10, clicking row 7
|
|
372
|
+
* Must verify row 5 → row 7 → row 10 forms a valid path
|
|
373
|
+
* - This prevents selecting commits on parallel branches that happen
|
|
374
|
+
* to merge into the same ancestor
|
|
375
|
+
*
|
|
376
|
+
* @returns true if the commit can be added while maintaining topological contiguity
|
|
377
|
+
*/
|
|
378
|
+
private canExtendTopologicalSelection;
|
|
379
|
+
private getTopologicalPathBetween;
|
|
380
|
+
private getDirectTopologicalPathBetween;
|
|
381
|
+
/**
|
|
382
|
+
* Finds the nearest commit that is topologically reachable from the anchor commit.
|
|
383
|
+
* Searches in the appropriate direction based on whether the anchor is ahead or behind the target.
|
|
384
|
+
* This is used as a fallback when the clicked commit is not directly topologically reachable.
|
|
385
|
+
*/
|
|
386
|
+
private findNearestTopologicallyReachableCommit;
|
|
387
|
+
/**
|
|
388
|
+
* Validates that a path has only 2 endpoints - the start and end commits.
|
|
389
|
+
* An endpoint is a commit that has no children or parents within the selected path
|
|
390
|
+
* (excluding the explicit start and end points).
|
|
391
|
+
*/
|
|
392
|
+
private hasOnlyTwoEndpoints;
|
|
393
|
+
/**
|
|
394
|
+
* Checks if a set of rows form a topologically contiguous set
|
|
395
|
+
* Rows are contiguous if all rows are connected via parent-child relationships (i.e., they form a single connected subgraph)
|
|
396
|
+
*/
|
|
397
|
+
areRowsContiguous(rows: ReadonlyGraphRow[]): boolean;
|
|
251
398
|
onClickRef: OnClickRef;
|
|
252
399
|
onClickCommit: OnClickCommit;
|
|
253
400
|
onDoubleClickCommit: OnDoubleClickCommit;
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
onWindowKeyDown:
|
|
401
|
+
onWindowBlur: (e: FocusEvent) => void;
|
|
402
|
+
onWindowKeyUp: () => void;
|
|
403
|
+
onWindowKeyDown: (e: KeyboardEvent) => void;
|
|
404
|
+
onWindowMouseDown: () => void;
|
|
405
|
+
private isKeyboardNavigating;
|
|
257
406
|
onKeyUp: OnKeyUp;
|
|
258
407
|
onKeyDown: OnKeyDown;
|
|
259
408
|
isNavigationKey(key: string): boolean;
|
|
@@ -265,19 +414,69 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
|
|
|
265
414
|
onRefZoneUnhovered: OnRefZoneUnhovered;
|
|
266
415
|
onShowMoreCommits: OnShowMoreCommits;
|
|
267
416
|
onScrollForZone: OnScrollForZone;
|
|
417
|
+
/**
|
|
418
|
+
* Checks if there are still highlighted commits that haven't been found yet,
|
|
419
|
+
* OR if there are more search results available to load.
|
|
420
|
+
* Used in filter mode to determine if we should continue loading more commits.
|
|
421
|
+
* @returns true if there are unfound highlighted commits or more search results available, false otherwise
|
|
422
|
+
*/
|
|
423
|
+
private hasUnfoundHighlightedCommits;
|
|
268
424
|
loadMoreCommitsIfNecessary(graphHeight: number, hasMoreCommits: boolean): void;
|
|
425
|
+
private shouldAutoLoadToFillViewport;
|
|
426
|
+
private autoLoadToFillViewport;
|
|
269
427
|
onScrollToRowCausedUpdateForFirstColumn: OnScrollForZone;
|
|
270
428
|
onCommitContextMenu: OnCommitContextMenu;
|
|
271
429
|
onRefContextMenu: OnRefZoneContextMenu;
|
|
272
|
-
|
|
430
|
+
/**
|
|
431
|
+
* Deep equality check for isSelectedBySha objects to avoid unnecessary scroll-to-selection
|
|
432
|
+
* when object reference changes but content is the same (e.g., after postMessage serialization)
|
|
433
|
+
*/
|
|
434
|
+
private areSelectedByShaEqual;
|
|
435
|
+
private _pendingRowsUpdate;
|
|
436
|
+
private _selectionVersion;
|
|
437
|
+
private _cachedSmartCellRangeRenderer;
|
|
438
|
+
private _cachedScrollLeftForRenderer;
|
|
439
|
+
private _cachedForceCache;
|
|
440
|
+
/**
|
|
441
|
+
* Gets or creates a cached smartCellRangeRenderer.
|
|
442
|
+
* Only recreates when scrollLeft or forceCache changes.
|
|
443
|
+
* This prevents react-virtualized from invalidating its cache on every render.
|
|
444
|
+
*/
|
|
445
|
+
private getOrCreateSmartCellRangeRenderer;
|
|
446
|
+
/**
|
|
447
|
+
* Gets commits rows by SHA
|
|
448
|
+
*
|
|
449
|
+
* @param shas - Array of commit SHAs to get
|
|
450
|
+
* @returns Array of ReadonlyGraphRow objects
|
|
451
|
+
*/
|
|
452
|
+
getCommits(shas: Sha[]): ReadonlyGraphRow[];
|
|
453
|
+
/**
|
|
454
|
+
* Selects commits in the graph
|
|
455
|
+
* @param shas - Array of commit SHAs to select
|
|
456
|
+
* @param options - Selection options (toggle, ensureVisible)
|
|
457
|
+
* @returns Array of selected ReadonlyGraphRow objects
|
|
458
|
+
*/
|
|
459
|
+
selectCommits(shas: Sha[], options?: SelectCommitsOptions): ReadonlyGraphRow[];
|
|
460
|
+
/**
|
|
461
|
+
* Internal method to select commits with full control over selection behavior
|
|
462
|
+
* @param shas - Array of commit SHAs to select
|
|
463
|
+
* @param options - Selection options including toggle, ensureVisible, isKeyboardNav, isTopological, isContiguous
|
|
464
|
+
* @returns Array of selected ReadonlyGraphRow objects
|
|
465
|
+
*/
|
|
466
|
+
private selectCommitsCore;
|
|
467
|
+
private predictScrollTop;
|
|
273
468
|
getCommitZoneContentWidthBetweenGutters(): number;
|
|
274
|
-
getSelectedShas(): Sha[];
|
|
275
469
|
getExcludeRemotesByName(): ExcludeRemotesByName;
|
|
276
470
|
getIncludeOnlyRemotesByName(): IncludeOnlyRemotesByName;
|
|
277
471
|
clearScrollToIndex: ClearScrollToIndex;
|
|
472
|
+
getVisibleRows: () => ProcessedGraphRow[];
|
|
278
473
|
getTopAndBottomVisibleRowIndex(): TopAndBottomVisibleRowIndex;
|
|
279
|
-
getOffsetSha(sha: Sha): Sha;
|
|
280
|
-
|
|
474
|
+
getOffsetSha(sha: Sha, scrollDirection: 'up' | 'down' | 'none', lastScrollDirection: 'up' | 'down' | 'none' | undefined, isKeyboardNav: boolean): Sha;
|
|
475
|
+
private _pendingScrollUpdate;
|
|
476
|
+
private _lastSelectedRowIndex;
|
|
477
|
+
private _lastScrollDirection;
|
|
478
|
+
private _scrollToAlignmentOverride;
|
|
479
|
+
selectSha(sha: Sha, isKeyboardNav?: boolean): void;
|
|
281
480
|
updateWidthByZone(widthToAssignForZone: number, graphZoneType: GraphZoneType, updatePreferredWidth?: boolean): void;
|
|
282
481
|
updateCommitZoneContentWidthFromChange(): void;
|
|
283
482
|
getCurrentWidthByZone(graphZoneType: GraphZoneType, withoutVerticalScrollWidth?: boolean): number;
|
|
@@ -312,16 +511,16 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
|
|
|
312
511
|
getLeftGutterBoxShadowAlpha(themeOpacityFactor: number): number;
|
|
313
512
|
getRightGutterBoxShadowAlpha(themeOpacityFactor: number): number;
|
|
314
513
|
updateMarkerRowIndices(types: GraphMarkerType[], nextProps?: GraphContainerProps): void;
|
|
514
|
+
private computeInteractiveScrollMarkers;
|
|
515
|
+
private onScrollMarkerClicked;
|
|
516
|
+
private getHeadPillDirection;
|
|
517
|
+
private onHeadPillClick;
|
|
315
518
|
getMarkerColors(): GraphMarkerColors;
|
|
316
519
|
initializeGraphZones(zoneSettings: GraphColumnsSettings | undefined, zoneOrdering: GraphZoneType[], width: number): GraphZone[];
|
|
317
520
|
maybeSortGraphZoneOrderingFromSettings(zoneSettings?: GraphColumnsSettings): void;
|
|
318
521
|
updateZonesFromSettings(zoneSettings?: GraphColumnsSettings): void;
|
|
319
|
-
getEdgeColumnMaxes(sha: Sha): number;
|
|
320
|
-
getEndingAndPassThroughEdgesByColumnFromPrevRow(graphRow: ProcessedGraphRow, prevRowEdges: RowEdges): RowEdges;
|
|
321
|
-
getFinalEdgeStateForGraphAndRow(graphRow: ProcessedGraphRow, prevRowEdges: RowEdges): RowEdges;
|
|
322
522
|
loadEdgesBySha(): void;
|
|
323
|
-
processRows(graphRows?: GraphRow[]): void;
|
|
324
|
-
getStartingEdgesByColumn(currentRow: ProcessedGraphRow): EdgeByColumn;
|
|
523
|
+
processRows(graphRows?: GraphRow[], pinnedBranchFullName?: string | null): void;
|
|
325
524
|
formatCommitDateTimeCallback: OnFormatCommitDateTime;
|
|
326
525
|
formatCommitMessageCallback: FormatCommitMessage;
|
|
327
526
|
formatRefShorthandCallback: FormatRefShorthand;
|
|
@@ -330,15 +529,73 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
|
|
|
330
529
|
getIconCallback: GetExternalIcon;
|
|
331
530
|
onMissingAvatar: GetMissingAvatar;
|
|
332
531
|
onMissingRefMetadata: GetMissingRefMetadata;
|
|
333
|
-
|
|
334
|
-
|
|
532
|
+
scheduleVisibleWipShasUpdate: () => void;
|
|
533
|
+
selectNext(shiftKey?: boolean, topological?: boolean, shiftSelectMode?: ShiftSelectMode): void;
|
|
534
|
+
selectPrevious(shiftKey?: boolean, topological?: boolean, shiftSelectMode?: ShiftSelectMode): void;
|
|
535
|
+
/**
|
|
536
|
+
* Navigate selection in the specified direction.
|
|
537
|
+
* @param direction - 'up' (towards newer/children) or 'down' (towards older/parents)
|
|
538
|
+
*/
|
|
539
|
+
private selectInDirection;
|
|
540
|
+
/**
|
|
541
|
+
* Determine the next SHA to select based on direction and mode.
|
|
542
|
+
*/
|
|
543
|
+
private getNextShaInDirection;
|
|
544
|
+
private getNextTopologicalSha;
|
|
545
|
+
private getPreviousTopologicalSha;
|
|
546
|
+
/**
|
|
547
|
+
* Find the next commit in the given direction that is topologically reachable from the anchor.
|
|
548
|
+
* Uses a hybrid approach: fast path for common cases, BFS fallback for complex graphs.
|
|
549
|
+
* @param preferSameColumn - If true, tries same-column navigation first (faster, used for ctrl+shift+arrow)
|
|
550
|
+
*/
|
|
551
|
+
private findNextReachableFromAnchor;
|
|
552
|
+
/**
|
|
553
|
+
* Fast reachability check - determines if targetSha is reachable from startSha.
|
|
554
|
+
* Uses BFS with visit limit for performance.
|
|
555
|
+
*/
|
|
556
|
+
private isReachableFrom;
|
|
557
|
+
/**
|
|
558
|
+
* Get the same-column child of a commit.
|
|
559
|
+
* Prefers children on the same column, then falls back to children where this commit is the first parent.
|
|
560
|
+
*/
|
|
561
|
+
private getSameColumnChild;
|
|
562
|
+
/**
|
|
563
|
+
* Jump to the previous branching point (towards newer commits), or tip if none.
|
|
564
|
+
* A branching point is a commit with visible children on a different column.
|
|
565
|
+
*/
|
|
566
|
+
private selectPreviousBranchingPoint;
|
|
567
|
+
/**
|
|
568
|
+
* Check if a commit is a branching point (has visible children on a different column).
|
|
569
|
+
*/
|
|
570
|
+
private isBranchingPoint;
|
|
571
|
+
/**
|
|
572
|
+
* Get the same-column parent of a commit.
|
|
573
|
+
*/
|
|
574
|
+
private getSameColumnParent;
|
|
575
|
+
/**
|
|
576
|
+
* Jump to the next branching point (towards older commits), or root if none.
|
|
577
|
+
* A branching point is a commit with visible children on a different column.
|
|
578
|
+
*/
|
|
579
|
+
private selectNextBranchingPoint;
|
|
580
|
+
selectNextRef(): void;
|
|
581
|
+
selectPreviousRef(): void;
|
|
335
582
|
selectHead(upstream?: boolean): void;
|
|
336
|
-
|
|
337
|
-
|
|
583
|
+
selectFirst(shiftKey?: boolean, shiftSelectMode?: ShiftSelectMode): void;
|
|
584
|
+
selectLast(shiftKey?: boolean, shiftSelectMode?: ShiftSelectMode): void;
|
|
585
|
+
selectPageUp(shiftKey?: boolean, shiftSelectMode?: ShiftSelectMode): void;
|
|
586
|
+
selectPageDown(shiftKey?: boolean, shiftSelectMode?: ShiftSelectMode): void;
|
|
587
|
+
/**
|
|
588
|
+
* Computes the column for a row.
|
|
589
|
+
*
|
|
590
|
+
* `parentsOverride` lets callers supply a different parent list than `graphRow.parents` —
|
|
591
|
+
* used by the scoped-graph feature to reserve lanes against synthetic ancestors when a
|
|
592
|
+
* row's real parents are hidden by scope filtering. Avoids mutating row.parents.
|
|
593
|
+
*/
|
|
594
|
+
getColumns(graphRow: GraphRow, parentsOverride?: Sha[]): number;
|
|
338
595
|
getFilteredHeadsForGraphRow(row: GraphRow, hasIncludes: boolean): Head[];
|
|
339
596
|
getFilteredRemotesForGraphRow(row: GraphRow, hasIncludes: boolean): Remote[];
|
|
340
|
-
|
|
341
|
-
loadRowsbySha(graphRows: GraphRow[]): void;
|
|
597
|
+
getBaseFilteredTagsForGraphRow(row: GraphRow, hasIncludesWithTags: boolean): Tag[];
|
|
598
|
+
loadRowsbySha(graphRows: GraphRow[], pinnedBranchFullName?: string | null): void;
|
|
342
599
|
updateRowStatsConstraints(): void;
|
|
343
600
|
updateTimelines(): void;
|
|
344
601
|
clearTimelines(): void;
|
|
@@ -361,13 +618,19 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
|
|
|
361
618
|
onGraphContainerBlurred: OnGraphContainerBlurred;
|
|
362
619
|
onGraphContainerMouseEnter: OnGraphMouseEnter;
|
|
363
620
|
onGraphContainerMouseLeave: OnGraphMouseLeave;
|
|
621
|
+
private _headerHoverRestoreTimer?;
|
|
622
|
+
onGraphHeaderMouseDown: () => void;
|
|
623
|
+
onGraphHeaderMouseUp: (event: React.MouseEvent<any>) => void;
|
|
624
|
+
onGraphHeaderWheel: (event: React.WheelEvent<any>) => void;
|
|
625
|
+
onGraphHeaderMouseMove: (event: React.MouseEvent<any>) => void;
|
|
626
|
+
private hoverRowForHeaderEvent;
|
|
364
627
|
onGraphResized: OnGraphResized;
|
|
365
628
|
onGraphVisibleRowsUpdated(): void;
|
|
366
629
|
getCurrentPlatform(): string;
|
|
367
630
|
isMacOSPlatform(): boolean;
|
|
368
|
-
|
|
631
|
+
isFilteredSearch(): boolean;
|
|
369
632
|
getGraphColumnSettingFromZoneType(graphZone: GraphZone): GraphColumnSetting;
|
|
370
|
-
decorateWithHelmet: (container: ReactElement<
|
|
633
|
+
decorateWithHelmet: (container: ReactElement<"div">, cssVariables: CssVariables, nonce?: string) => React.JSX.Element;
|
|
371
634
|
render(): React.JSX.Element;
|
|
372
635
|
}
|
|
373
636
|
export default GraphContainer;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import type { GraphZone } from '../../domain/graph/GraphConstants';
|
|
4
4
|
import type { ExcludeRefsById, GetExternalIcon, GraphColumnsSettings, GraphItemContext, IncludeOnlyRefsById, OnFilterColumnClick, OnGraphColumnReOrdered, OnGraphZoneResize, OnGraphZoneResizeEnd, OnGraphZoneResizeFromPropChange, OnPopupGraphHeaderContextMenu, OnSettingsClick, OnToggleRefNodesShown } from '../../domain/graph/GraphTypes';
|
|
5
5
|
import type { TranslationFn } from '../../domain/language/LanguageTypes';
|
|
@@ -29,6 +29,10 @@ type Props = {
|
|
|
29
29
|
translate: TranslationFn;
|
|
30
30
|
width: number;
|
|
31
31
|
height: number;
|
|
32
|
+
onMouseDownCapture?: React.MouseEventHandler<HTMLDivElement>;
|
|
33
|
+
onMouseMoveCapture?: React.MouseEventHandler<HTMLDivElement>;
|
|
34
|
+
onMouseUpCapture?: React.MouseEventHandler<HTMLDivElement>;
|
|
35
|
+
onWheel?: React.WheelEventHandler<HTMLDivElement>;
|
|
32
36
|
settingsContext?: GraphItemContext;
|
|
33
37
|
};
|
|
34
38
|
declare class GraphHeaderRow extends React.PureComponent<Props> {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import type { GraphMarkerType } from '../../domain/graph/GraphConstants';
|
|
4
|
-
import type { GraphMarkerColors, GraphMarkerRowIndices } from '../../domain/graph/GraphTypes';
|
|
4
|
+
import type { GetExternalIcon, GraphMarkerColors, GraphMarkerRowIndices, InteractiveScrollMarker, OnScrollMarkerClicked } from '../../domain/graph/GraphTypes';
|
|
5
5
|
interface Props {
|
|
6
6
|
branchUpstreamRowIndices: number[];
|
|
7
7
|
enabledScrollMarkerTypes: GraphMarkerType[];
|
|
@@ -9,14 +9,35 @@ interface Props {
|
|
|
9
9
|
viewportHeight: number;
|
|
10
10
|
markerRowIndices: GraphMarkerRowIndices;
|
|
11
11
|
markerColors: GraphMarkerColors;
|
|
12
|
+
scrollTop: number;
|
|
12
13
|
scrollWidth?: number;
|
|
13
14
|
totalRows: number;
|
|
15
|
+
interactiveMarkers?: readonly InteractiveScrollMarker[];
|
|
16
|
+
onMarkerClick?: OnScrollMarkerClicked;
|
|
17
|
+
getExternalIcon?: GetExternalIcon;
|
|
14
18
|
}
|
|
15
|
-
|
|
19
|
+
interface HoveredRow {
|
|
20
|
+
rowIndex: number;
|
|
21
|
+
markers: InteractiveScrollMarker[];
|
|
22
|
+
tooltipTop: number;
|
|
23
|
+
color: string;
|
|
24
|
+
}
|
|
25
|
+
interface State {
|
|
26
|
+
hovered: HoveredRow | null;
|
|
27
|
+
}
|
|
28
|
+
export default class ScrollMarker extends React.PureComponent<Props, State> {
|
|
16
29
|
canvas: HTMLCanvasElement | null;
|
|
30
|
+
state: State;
|
|
31
|
+
private memoMarkersByRow;
|
|
17
32
|
componentDidMount(): void;
|
|
18
|
-
componentDidUpdate(
|
|
33
|
+
componentDidUpdate(prevProps: Props): void;
|
|
19
34
|
updateCanvas(nextProps?: Props): void;
|
|
20
|
-
|
|
35
|
+
private setHoveredRow;
|
|
36
|
+
private pickRowColor;
|
|
37
|
+
private clearHoveredIfRow;
|
|
38
|
+
private onRowHitMove;
|
|
39
|
+
private onRowHitClick;
|
|
40
|
+
private getMarkersByRowMemo;
|
|
41
|
+
render(): ReactElement<'div'>;
|
|
21
42
|
}
|
|
22
43
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import type { CommitType } from '../../../domain/commit/CommitTypes';
|
|
4
4
|
import type { CssVariables } from '../../../domain/generic/GenericTypes';
|
|
5
5
|
import type { GetExternalIcon, GraphItemContext, GraphZoneModeConstants } from '../../../domain/graph/GraphTypes';
|