@gitkraken/gitkraken-components 13.0.0-vnext.3 → 13.0.0-vnext.30

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.
Files changed (64) hide show
  1. package/README.md +6 -0
  2. package/dist/components/dnd/DndComponent.d.ts +1 -1
  3. package/dist/components/dnd/DndContainer.d.ts +1 -1
  4. package/dist/components/graph/GraphColumn.d.ts +7 -2
  5. package/dist/components/graph/GraphContainer.d.ts +285 -31
  6. package/dist/components/graph/GraphHeaderRow.d.ts +5 -1
  7. package/dist/components/graph/GraphScrollMarker.d.ts +26 -5
  8. package/dist/components/graph/commitzone/CommitNode.d.ts +1 -1
  9. package/dist/components/graph/commitzone/CommitZone.d.ts +3 -2
  10. package/dist/components/graph/commitzone/GraphAvatar.d.ts +1 -1
  11. package/dist/components/graph/commitzone/edges/Arc.d.ts +2 -2
  12. package/dist/components/graph/commitzone/edges/Edges.d.ts +1 -1
  13. package/dist/components/graph/commitzone/edges/EndingEdge.d.ts +2 -2
  14. package/dist/components/graph/commitzone/edges/PassThroughEdge.d.ts +2 -2
  15. package/dist/components/graph/commitzone/edges/StartingEdge.d.ts +2 -2
  16. package/dist/components/graph/common/DraggableGraphHeader.d.ts +1 -1
  17. package/dist/components/graph/common/GenericGraphZone.d.ts +4 -2
  18. package/dist/components/graph/common/ScrollbarContainer.d.ts +1 -1
  19. package/dist/components/graph/common/StickyTimeline.d.ts +10 -0
  20. package/dist/components/graph/common/TimelineMessage.d.ts +6 -0
  21. package/dist/components/graph/messagezone/WorkDirMessageInput.d.ts +1 -1
  22. package/dist/components/graph/refzone/CreateRefNode.d.ts +1 -1
  23. package/dist/components/graph/refzone/RefNode.d.ts +11 -7
  24. package/dist/components/graph/refzone/RefNodeAnnotationTarget.d.ts +10 -0
  25. package/dist/components/graph/refzone/RefNodes.d.ts +4 -2
  26. package/dist/components/graph/refzone/RefZone.d.ts +8 -3
  27. package/dist/components/graph/rowAdornment/RowAdornmentLayer.d.ts +52 -0
  28. package/dist/components/graph/rowAdornment/RowAdornmentOverlay.d.ts +19 -0
  29. package/dist/components/graph/rowRenderers/CommitMessageZoneRow.d.ts +2 -1
  30. package/dist/components/graph/rowRenderers/CommitZoneRow.d.ts +2 -0
  31. package/dist/components/graph/rowRenderers/CommitsInfoRow.d.ts +1 -1
  32. package/dist/components/graph/rowRenderers/RefZoneRow.d.ts +2 -0
  33. package/dist/components/graph/shared/Avatar.d.ts +1 -1
  34. package/dist/components/graph/shared/FileDiffTypeIcon.d.ts +2 -1
  35. package/dist/components/graph/shared/WipStatsPill.d.ts +11 -0
  36. package/dist/components/resizable/Resizable.d.ts +2 -7
  37. package/dist/domain/commit/CommitHelpers.d.ts +2 -2
  38. package/dist/domain/commit/CommitTypes.d.ts +1 -0
  39. package/dist/domain/edge/EdgeHelpers.d.ts +4 -4
  40. package/dist/domain/generic/GenericTypes.d.ts +6 -0
  41. package/dist/domain/graph/GraphConstants.d.ts +18 -2
  42. package/dist/domain/graph/GraphEdgeHelpers.d.ts +34 -0
  43. package/dist/domain/graph/GraphHelpers.d.ts +29 -5
  44. package/dist/domain/graph/GraphTypes.d.ts +101 -10
  45. package/dist/domain/graph/PinnedBranchHelpers.d.ts +21 -0
  46. package/dist/domain/graph/ScopedGraphHelpers.d.ts +15 -0
  47. package/dist/domain/graph/row/ProcessedGraphRowObj.d.ts +6 -5
  48. package/dist/domain/graph/rowAdornment/RowAdornmentHelpers.d.ts +14 -0
  49. package/dist/domain/graph/rowAdornment/RowAdornmentTypes.d.ts +97 -0
  50. package/dist/domain/hostingservice/HostingServiceTypes.d.ts +2 -1
  51. package/dist/domain/reactvirtualized/ReactVirtualizedHelpers.d.ts +1 -1
  52. package/dist/domain/ref/RefConstants.d.ts +4 -1
  53. package/dist/domain/ref/RefTypes.d.ts +1 -1
  54. package/dist/domain/workdir/WorkDirHelpers.d.ts +50 -0
  55. package/dist/domain/workdir/WorkDirTypes.d.ts +51 -0
  56. package/dist/index.d.ts +16 -1
  57. package/dist/index.js +21 -2
  58. package/dist/styles.css +2 -2
  59. package/dist/types.d.ts +1 -0
  60. package/dist/utils/ObjectUtils.d.ts +29 -0
  61. package/package.json +100 -93
  62. package/CHANGELOG.md +0 -15
  63. package/ThirdPartyNotices.txt +0 -227
  64. 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, EdgeByColumn, ExcludeByType, ExcludeRefsById, ExcludeRemotesByName, FormatCommitMessage, FormatRefShorthand, GetExternalIcon, GetMissingAvatar, GetMissingRefMetadata, GraphColumnSetting, GraphColumnsSettings, GraphContexts, GraphMarkerColors, GraphMarkerRowIndices, GraphPlatform, GraphRefGroup, GraphRow, GraphZoneModeConstants, GraphZonesByType, Head, HighlightedShas, IncludeOnlyRefsById, IncludeOnlyRemotesByName, IsRefShorthandValid, IsSelectedBySha, NodeOffsetByColumn, NodeOpacityByColumn, OnClearCurrentlyHoveredGraphCommit, OnClickCommit, OnClickGraphRef, OnClickGraphRow, OnClickRef, 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, RefMetadataById, RefMetadataRequestedById, RefMetadataType, RefsMissingMetadata, Remote, ReserverInfoBySha, RowEdges, RowStats, RowStatsConstraints, ShaByRefId, Tag, TopAndBottomVisibleRowIndex } from '../../domain/graph/GraphTypes';
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 { OnBlur, OnKeyDown, OnKeyUp, OnMouseDown, OnResizeParams } from '../../domain/ui/UiTypes';
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;
@@ -38,13 +47,21 @@ export interface StateProps {
38
47
  isRefShorthandValid?: IsRefShorthandValid;
39
48
  showGhostRefsOnRowHover?: boolean;
40
49
  showRemoteNamesOnRefs?: boolean;
50
+ /**
51
+ * Whether stash rows can keep otherwise-unreferenced parent commits visible.
52
+ * Defaults to true for backwards compatibility. When false, a stash is shown
53
+ * only if its parent commit would already be visible for some other reason.
54
+ */
55
+ stashesAnchorCommits?: boolean;
41
56
  enabledRefMetadataTypes?: RefMetadataType[];
42
57
  enabledScrollMarkerTypes?: GraphMarkerType[];
43
58
  scrollRowPadding?: number;
44
59
  enableMultiSelection?: boolean;
60
+ stickyTimeline?: boolean;
45
61
  graphCommitDescDisplayMode?: GraphCommitDescDisplayMode;
46
62
  graphRows: GraphRow[];
47
63
  hasMoreCommits?: boolean;
64
+ hasMoreSearchResults?: boolean;
48
65
  highlightedShas?: HighlightedShas;
49
66
  excludeByType?: ExcludeByType;
50
67
  excludeRefsById?: ExcludeRefsById;
@@ -54,6 +71,25 @@ export interface StateProps {
54
71
  isInUnsupportedRebase?: boolean;
55
72
  isLoadingRows?: boolean;
56
73
  pendingCommitMessageSummary?: string;
74
+ /**
75
+ * Full name of the branch to pin to the left-most column (column 0).
76
+ * Example: "refs/heads/main" or "refs/remotes/origin/main"
77
+ * If null or undefined, no branch is pinned.
78
+ */
79
+ pinnedBranchFullName?: string | null;
80
+ /**
81
+ * Narrow the graph to commits reachable from a specific branch, its upstream (if any), and
82
+ * a merge-target tip commit. Anchors (tips + merge target) show all their refs and never
83
+ * propagate child refs to their parents. When an anchor's real parents are hidden, a
84
+ * synthetic wavy dashed edge is drawn to its nearest visible ancestor.
85
+ */
86
+ scope?: GraphScope;
87
+ /**
88
+ * Fired when the helper determined that an anchor cannot reach a visible ancestor within the
89
+ * loaded graphRows (merge base not loaded). Consumer should fetch more data and re-render.
90
+ * Called once per processing pass, only when the set actually changes.
91
+ */
92
+ onScopeAnchorsUnreachable?: (unreachableAnchors: Set<Sha>) => void;
57
93
  shiftSelectMode?: ShiftSelectMode;
58
94
  suppressNonRefRowTooltips?: boolean;
59
95
  refMetadataById?: RefMetadataById | null;
@@ -66,8 +102,28 @@ export interface StateProps {
66
102
  useAuthorInitialsForAvatars: boolean;
67
103
  rowsStats?: Record<string, RowStats>;
68
104
  rowsStatsLoading?: boolean;
105
+ /**
106
+ * Controls when the WIP row is inserted into the graph.
107
+ * - 'auto' (default): shown only when there are pending working-tree changes.
108
+ * - 'always': shown even with a clean working tree, anchored at HEAD.
109
+ */
110
+ wipVisibility?: 'always' | 'auto';
69
111
  wipMessageEditable?: boolean;
70
112
  workDirStats?: WorkDirStats;
113
+ wipNodeMetadataBySha?: WipNodeMetadataBySha;
114
+ /**
115
+ * Settle delay (ms) for the internal scroll-settle debounce that drives both
116
+ * `onVisibleWipShasChanged` and `onWipShasMissingStats`. Each scroll/visible-range change
117
+ * resets the timer; the callbacks fire once activity stops for this long. Raise it (e.g. 350)
118
+ * to avoid firing stats requests for rows that are only momentarily visible during fast scrolls.
119
+ * Defaults to 100.
120
+ */
121
+ wipShasSettleDelayMs?: number;
122
+ /**
123
+ * Provider for row adornments.
124
+ * Graph subscribes to invalidate events and calls provide/resolve as needed.
125
+ */
126
+ rowAdornmentProvider?: RowAdornmentProvider;
71
127
  }
72
128
  export interface DispatchProps {
73
129
  onDoubleClickGraphRef?: OnDoubleClickGraphRef;
@@ -93,6 +149,12 @@ export interface DispatchProps {
93
149
  onGraphColumnsReOrdered?: OnGraphColumnsReOrdered;
94
150
  onFilterColumnClick?: OnFilterColumnClick;
95
151
  onColumnResized?: OnGraphColumnResized;
152
+ /**
153
+ * Callback invoked when column numbers are calculated for each commit.
154
+ * Receives a map of SHA → column number.
155
+ * Used to sync column layout data back to the parent application.
156
+ */
157
+ onColumnsCalculated?: OnColumnsCalculated;
96
158
  onFocusWipNodeInput?: OnWipMessageFocus;
97
159
  onMessageChange?: OnCommitMessageChange;
98
160
  onPopupGraphHeaderContextMenu?: OnPopupGraphHeaderContextMenu;
@@ -110,6 +172,8 @@ export interface DispatchProps {
110
172
  onGraphMouseLeave?: OnGraphMouseLeave;
111
173
  onEmailsMissingAvatarUrls?: OnEmailsMissingAvatarUrls;
112
174
  onRefsMissingMetadata?: OnRefsMissingMetadata;
175
+ onWipShasMissingStats?: OnWipShasMissingStats;
176
+ onVisibleWipShasChanged?: OnVisibleWipShasChanged;
113
177
  }
114
178
  interface Props extends OwnProps, StateProps, DispatchProps {
115
179
  }
@@ -139,6 +203,7 @@ type ComponentState = {
139
203
  isLoadingRows: boolean;
140
204
  numGraphColumns: number;
141
205
  markerRowIndices: GraphMarkerRowIndices;
206
+ interactiveScrollMarkers: InteractiveScrollMarker[];
142
207
  pendingCommitMessageSummary: string;
143
208
  processedRows: ProcessedGraphRow[];
144
209
  refIconsPosition: RefIconsPosition;
@@ -165,6 +230,7 @@ type HasMergeNodeChildBySha = {
165
230
  [sha: Sha]: boolean;
166
231
  };
167
232
  declare class GraphContainer extends React.Component<Props, ComponentState> implements IGraphContainer {
233
+ static getDerivedStateFromProps(props: Props, state: ComponentState): Partial<ComponentState> | null;
168
234
  private graphComponentRef;
169
235
  private graphContainerRef;
170
236
  private resizeObserver;
@@ -173,7 +239,8 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
173
239
  isRefContextMenuShown: boolean;
174
240
  isMounted: boolean;
175
241
  selectedShas: Set<Sha>;
176
- lastFocusedSha?: Sha;
242
+ selectionAnchorSha?: Sha;
243
+ selectionFocusSha?: Sha;
177
244
  processedGraphRowBySha: ProcessedGraphRowBySha;
178
245
  shaByRefId: ShaByRefId;
179
246
  childrenBySha: ChildrenBySha;
@@ -189,10 +256,16 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
189
256
  shouldFireShowMoreCommits: boolean;
190
257
  columnsToFreeWhenFound: ColumnsToFreeBySha;
191
258
  hasMergeNodeChildBySha: HasMergeNodeChildBySha;
259
+ private _autoLoadTimer?;
192
260
  reserverInfoBySha: ReserverInfoBySha;
193
261
  columnsUsed: ColumnsUsed;
262
+ private pinnedBranchShas;
263
+ private scopeVisibility;
264
+ private syntheticEdgeChildShas;
265
+ private _lastReportedUnreachable;
194
266
  rowsStats?: Record<string, RowStats>;
195
267
  workDirStats: WorkDirStats;
268
+ private _markerColorsCache;
196
269
  excludeByType: ExcludeByType;
197
270
  excludeRefsById: ExcludeRefsById;
198
271
  includeOnlyRefsById: IncludeOnlyRefsById;
@@ -208,18 +281,23 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
208
281
  graphZonesByType: GraphZonesByType;
209
282
  graphZoneOrdering: GraphZoneType[];
210
283
  clientHeight: number;
211
- missingAvatarsTimer?: NodeJS.Timeout;
284
+ missingAvatarsTimer?: ReturnType<typeof setTimeout>;
212
285
  pendingMissingAvatars: AvatarUrlByEmail;
213
286
  requestedMissingAvatars: AvatarUrlRequestedByEmail;
214
- missingRefsMetadataTimer?: NodeJS.Timeout;
287
+ missingRefsMetadataTimer?: ReturnType<typeof setTimeout>;
215
288
  pendingMissingRefsMetadata: RefsMissingMetadata;
216
289
  requestedMissingRefsMetadata: RefMetadataRequestedById;
290
+ previousRefMetadataById: RefMetadataById | null;
291
+ requestedMissingWipStats: WipShasMissingStats;
292
+ visibleWipShasTimer?: ReturnType<typeof setTimeout>;
293
+ lastFiredVisibleWipShas: VisibleWipShas | undefined;
217
294
  branchUpstreamRowIndices: number[];
295
+ private interactiveScrollMarkersFromRows;
218
296
  downstreamsByUpstream: DownstreamsByUpstream;
219
- timelinesInterval?: NodeJS.Timeout;
297
+ timelinesInterval?: ReturnType<typeof setInterval>;
220
298
  constructor(props: Props);
221
299
  componentDidMount(): void;
222
- UNSAFE_componentWillReceiveProps(nextProps: Props): void;
300
+ componentDidUpdate(prevProps: Props, prevState: ComponentState): void;
223
301
  componentWillUnmount(): void;
224
302
  focus(): void;
225
303
  getRefIconsPositionOrDefault(refIconsPosition?: RefIconsPosition | null): RefIconsPosition;
@@ -246,14 +324,76 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
246
324
  onRefDragLeave: OnRefDragLeave;
247
325
  onRefDrop: OnRefDrop;
248
326
  onRefEndDrag: OnRefEndDrag;
327
+ private performRangeSelection;
249
328
  onZoneRowClick(event: React.MouseEvent<any>, graphZoneType: GraphZoneType, sha: Sha): void;
250
- getShiftSelectRange(currentSha: Sha): Sha[];
329
+ private handleToggleSelection;
330
+ getShiftSelectRange(currentSha: Sha, shiftSelectMode: ShiftSelectMode): Sha[] | undefined;
331
+ /**
332
+ * Check if a commit can extend the current topological selection via Ctrl+Click.
333
+ *
334
+ * In topological mode, we maintain a contiguous path through the git graph.
335
+ * This method determines if adding a commit would maintain that contiguity.
336
+ *
337
+ * Graph orientation:
338
+ * - Lower row index = NEWER commits (children, at top of graph)
339
+ * - Higher row index = OLDER commits (parents, at bottom of graph)
340
+ * - `getDirectTopologicalPathBetween(A, B)` finds path from A to B following parent pointers,
341
+ * meaning B must be an ancestor (older) of A
342
+ *
343
+ * Three cases based on clicked commit's position relative to selection bounds:
344
+ *
345
+ * 1. NEWER than newest selected (clickedIndex < newestIndex):
346
+ * - Clicked commit would extend the TOP of the selection
347
+ * - Check: clicked → newest (is newest an ancestor of clicked?)
348
+ * - Example: Selection is rows 5-10, clicking row 3
349
+ * Must verify row 3 can reach row 5 by following parents
350
+ *
351
+ * 2. OLDER than oldest selected (clickedIndex > oldestIndex):
352
+ * - Clicked commit would extend the BOTTOM of the selection
353
+ * - Check: oldest → clicked (is clicked an ancestor of oldest?)
354
+ * - Example: Selection is rows 5-10, clicking row 12
355
+ * Must verify row 10 can reach row 12 by following parents
356
+ *
357
+ * 3. BETWEEN newest and oldest (newestIndex < clickedIndex < oldestIndex):
358
+ * - Clicked commit must be ON the existing path, not a parallel branch
359
+ * - Check BOTH directions:
360
+ * - newest → clicked (is clicked an ancestor of newest?)
361
+ * - clicked → oldest (is oldest an ancestor of clicked?)
362
+ * - Example: Selection is rows 5-10, clicking row 7
363
+ * Must verify row 5 → row 7 → row 10 forms a valid path
364
+ * - This prevents selecting commits on parallel branches that happen
365
+ * to merge into the same ancestor
366
+ *
367
+ * @returns true if the commit can be added while maintaining topological contiguity
368
+ */
369
+ private canExtendTopologicalSelection;
370
+ private getTopologicalPathBetween;
371
+ private getDirectTopologicalPathBetween;
372
+ /**
373
+ * Finds the nearest commit that is topologically reachable from the anchor commit.
374
+ * Searches in the appropriate direction based on whether the anchor is ahead or behind the target.
375
+ * This is used as a fallback when the clicked commit is not directly topologically reachable.
376
+ */
377
+ private findNearestTopologicallyReachableCommit;
378
+ /**
379
+ * Validates that a path has only 2 endpoints - the start and end commits.
380
+ * An endpoint is a commit that has no children or parents within the selected path
381
+ * (excluding the explicit start and end points).
382
+ */
383
+ private hasOnlyTwoEndpoints;
384
+ /**
385
+ * Checks if a set of rows form a topologically contiguous set
386
+ * Rows are contiguous if all rows are connected via parent-child relationships (i.e., they form a single connected subgraph)
387
+ */
388
+ areRowsContiguous(rows: ReadonlyGraphRow[]): boolean;
251
389
  onClickRef: OnClickRef;
252
390
  onClickCommit: OnClickCommit;
253
391
  onDoubleClickCommit: OnDoubleClickCommit;
254
- onWindowKeyUp: OnKeyUp;
255
- onWindowBlur: OnBlur;
256
- onWindowKeyDown: OnKeyDown;
392
+ onWindowBlur: (e: FocusEvent) => void;
393
+ onWindowKeyUp: () => void;
394
+ onWindowKeyDown: (e: KeyboardEvent) => void;
395
+ onWindowMouseDown: () => void;
396
+ private isKeyboardNavigating;
257
397
  onKeyUp: OnKeyUp;
258
398
  onKeyDown: OnKeyDown;
259
399
  isNavigationKey(key: string): boolean;
@@ -265,19 +405,69 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
265
405
  onRefZoneUnhovered: OnRefZoneUnhovered;
266
406
  onShowMoreCommits: OnShowMoreCommits;
267
407
  onScrollForZone: OnScrollForZone;
408
+ /**
409
+ * Checks if there are still highlighted commits that haven't been found yet,
410
+ * OR if there are more search results available to load.
411
+ * Used in filter mode to determine if we should continue loading more commits.
412
+ * @returns true if there are unfound highlighted commits or more search results available, false otherwise
413
+ */
414
+ private hasUnfoundHighlightedCommits;
268
415
  loadMoreCommitsIfNecessary(graphHeight: number, hasMoreCommits: boolean): void;
416
+ private shouldAutoLoadToFillViewport;
417
+ private autoLoadToFillViewport;
269
418
  onScrollToRowCausedUpdateForFirstColumn: OnScrollForZone;
270
419
  onCommitContextMenu: OnCommitContextMenu;
271
420
  onRefContextMenu: OnRefZoneContextMenu;
272
- selectCommits(shas: Sha[], includeToPrevSel: boolean, isAutoOrKeyScroll: boolean): void;
421
+ /**
422
+ * Deep equality check for isSelectedBySha objects to avoid unnecessary scroll-to-selection
423
+ * when object reference changes but content is the same (e.g., after postMessage serialization)
424
+ */
425
+ private areSelectedByShaEqual;
426
+ private _pendingRowsUpdate;
427
+ private _selectionVersion;
428
+ private _cachedSmartCellRangeRenderer;
429
+ private _cachedScrollLeftForRenderer;
430
+ private _cachedForceCache;
431
+ /**
432
+ * Gets or creates a cached smartCellRangeRenderer.
433
+ * Only recreates when scrollLeft or forceCache changes.
434
+ * This prevents react-virtualized from invalidating its cache on every render.
435
+ */
436
+ private getOrCreateSmartCellRangeRenderer;
437
+ /**
438
+ * Gets commits rows by SHA
439
+ *
440
+ * @param shas - Array of commit SHAs to get
441
+ * @returns Array of ReadonlyGraphRow objects
442
+ */
443
+ getCommits(shas: Sha[]): ReadonlyGraphRow[];
444
+ /**
445
+ * Selects commits in the graph
446
+ * @param shas - Array of commit SHAs to select
447
+ * @param options - Selection options (toggle, ensureVisible)
448
+ * @returns Array of selected ReadonlyGraphRow objects
449
+ */
450
+ selectCommits(shas: Sha[], options?: SelectCommitsOptions): ReadonlyGraphRow[];
451
+ /**
452
+ * Internal method to select commits with full control over selection behavior
453
+ * @param shas - Array of commit SHAs to select
454
+ * @param options - Selection options including toggle, ensureVisible, isKeyboardNav, isTopological, isContiguous
455
+ * @returns Array of selected ReadonlyGraphRow objects
456
+ */
457
+ private selectCommitsCore;
458
+ private predictScrollTop;
273
459
  getCommitZoneContentWidthBetweenGutters(): number;
274
- getSelectedShas(): Sha[];
275
460
  getExcludeRemotesByName(): ExcludeRemotesByName;
276
461
  getIncludeOnlyRemotesByName(): IncludeOnlyRemotesByName;
277
462
  clearScrollToIndex: ClearScrollToIndex;
463
+ getVisibleRows: () => ProcessedGraphRow[];
278
464
  getTopAndBottomVisibleRowIndex(): TopAndBottomVisibleRowIndex;
279
- getOffsetSha(sha: Sha): Sha;
280
- selectSha(sha: Sha, isAutoOrKeyScroll?: boolean): void;
465
+ getOffsetSha(sha: Sha, scrollDirection: 'up' | 'down' | 'none', lastScrollDirection: 'up' | 'down' | 'none' | undefined, isKeyboardNav: boolean): Sha;
466
+ private _pendingScrollUpdate;
467
+ private _lastSelectedRowIndex;
468
+ private _lastScrollDirection;
469
+ private _scrollToAlignmentOverride;
470
+ selectSha(sha: Sha, isKeyboardNav?: boolean): void;
281
471
  updateWidthByZone(widthToAssignForZone: number, graphZoneType: GraphZoneType, updatePreferredWidth?: boolean): void;
282
472
  updateCommitZoneContentWidthFromChange(): void;
283
473
  getCurrentWidthByZone(graphZoneType: GraphZoneType, withoutVerticalScrollWidth?: boolean): number;
@@ -312,16 +502,16 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
312
502
  getLeftGutterBoxShadowAlpha(themeOpacityFactor: number): number;
313
503
  getRightGutterBoxShadowAlpha(themeOpacityFactor: number): number;
314
504
  updateMarkerRowIndices(types: GraphMarkerType[], nextProps?: GraphContainerProps): void;
505
+ private computeInteractiveScrollMarkers;
506
+ private onScrollMarkerClicked;
507
+ private getHeadPillDirection;
508
+ private onHeadPillClick;
315
509
  getMarkerColors(): GraphMarkerColors;
316
510
  initializeGraphZones(zoneSettings: GraphColumnsSettings | undefined, zoneOrdering: GraphZoneType[], width: number): GraphZone[];
317
511
  maybeSortGraphZoneOrderingFromSettings(zoneSettings?: GraphColumnsSettings): void;
318
512
  updateZonesFromSettings(zoneSettings?: GraphColumnsSettings): void;
319
- getEdgeColumnMaxes(sha: Sha): number;
320
- getEndingAndPassThroughEdgesByColumnFromPrevRow(graphRow: ProcessedGraphRow, prevRowEdges: RowEdges): RowEdges;
321
- getFinalEdgeStateForGraphAndRow(graphRow: ProcessedGraphRow, prevRowEdges: RowEdges): RowEdges;
322
513
  loadEdgesBySha(): void;
323
- processRows(graphRows?: GraphRow[]): void;
324
- getStartingEdgesByColumn(currentRow: ProcessedGraphRow): EdgeByColumn;
514
+ processRows(graphRows?: GraphRow[], pinnedBranchFullName?: string | null): void;
325
515
  formatCommitDateTimeCallback: OnFormatCommitDateTime;
326
516
  formatCommitMessageCallback: FormatCommitMessage;
327
517
  formatRefShorthandCallback: FormatRefShorthand;
@@ -330,15 +520,73 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
330
520
  getIconCallback: GetExternalIcon;
331
521
  onMissingAvatar: GetMissingAvatar;
332
522
  onMissingRefMetadata: GetMissingRefMetadata;
333
- selectNext(topological?: boolean): void;
334
- selectPrevious(topological?: boolean): void;
523
+ scheduleVisibleWipShasUpdate: () => void;
524
+ selectNext(shiftKey?: boolean, topological?: boolean, shiftSelectMode?: ShiftSelectMode): void;
525
+ selectPrevious(shiftKey?: boolean, topological?: boolean, shiftSelectMode?: ShiftSelectMode): void;
526
+ /**
527
+ * Navigate selection in the specified direction.
528
+ * @param direction - 'up' (towards newer/children) or 'down' (towards older/parents)
529
+ */
530
+ private selectInDirection;
531
+ /**
532
+ * Determine the next SHA to select based on direction and mode.
533
+ */
534
+ private getNextShaInDirection;
535
+ private getNextTopologicalSha;
536
+ private getPreviousTopologicalSha;
537
+ /**
538
+ * Find the next commit in the given direction that is topologically reachable from the anchor.
539
+ * Uses a hybrid approach: fast path for common cases, BFS fallback for complex graphs.
540
+ * @param preferSameColumn - If true, tries same-column navigation first (faster, used for ctrl+shift+arrow)
541
+ */
542
+ private findNextReachableFromAnchor;
543
+ /**
544
+ * Fast reachability check - determines if targetSha is reachable from startSha.
545
+ * Uses BFS with visit limit for performance.
546
+ */
547
+ private isReachableFrom;
548
+ /**
549
+ * Get the same-column child of a commit.
550
+ * Prefers children on the same column, then falls back to children where this commit is the first parent.
551
+ */
552
+ private getSameColumnChild;
553
+ /**
554
+ * Jump to the previous branching point (towards newer commits), or tip if none.
555
+ * A branching point is a commit with visible children on a different column.
556
+ */
557
+ private selectPreviousBranchingPoint;
558
+ /**
559
+ * Check if a commit is a branching point (has visible children on a different column).
560
+ */
561
+ private isBranchingPoint;
562
+ /**
563
+ * Get the same-column parent of a commit.
564
+ */
565
+ private getSameColumnParent;
566
+ /**
567
+ * Jump to the next branching point (towards older commits), or root if none.
568
+ * A branching point is a commit with visible children on a different column.
569
+ */
570
+ private selectNextBranchingPoint;
571
+ selectNextRef(): void;
572
+ selectPreviousRef(): void;
335
573
  selectHead(upstream?: boolean): void;
336
- getAvailableColumnAndUseIt(): number;
337
- getColumns(graphRow: GraphRow): number;
574
+ selectFirst(shiftKey?: boolean, shiftSelectMode?: ShiftSelectMode): void;
575
+ selectLast(shiftKey?: boolean, shiftSelectMode?: ShiftSelectMode): void;
576
+ selectPageUp(shiftKey?: boolean, shiftSelectMode?: ShiftSelectMode): void;
577
+ selectPageDown(shiftKey?: boolean, shiftSelectMode?: ShiftSelectMode): void;
578
+ /**
579
+ * Computes the column for a row.
580
+ *
581
+ * `parentsOverride` lets callers supply a different parent list than `graphRow.parents` —
582
+ * used by the scoped-graph feature to reserve lanes against synthetic ancestors when a
583
+ * row's real parents are hidden by scope filtering. Avoids mutating row.parents.
584
+ */
585
+ getColumns(graphRow: GraphRow, parentsOverride?: Sha[]): number;
338
586
  getFilteredHeadsForGraphRow(row: GraphRow, hasIncludes: boolean): Head[];
339
587
  getFilteredRemotesForGraphRow(row: GraphRow, hasIncludes: boolean): Remote[];
340
- getFilteredTagsForGraphRow(row: GraphRow, hasIncludes: boolean, rowHasVisibleChild: boolean): Tag[];
341
- loadRowsbySha(graphRows: GraphRow[]): void;
588
+ getBaseFilteredTagsForGraphRow(row: GraphRow, hasIncludesWithTags: boolean): Tag[];
589
+ loadRowsbySha(graphRows: GraphRow[], pinnedBranchFullName?: string | null): void;
342
590
  updateRowStatsConstraints(): void;
343
591
  updateTimelines(): void;
344
592
  clearTimelines(): void;
@@ -361,13 +609,19 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
361
609
  onGraphContainerBlurred: OnGraphContainerBlurred;
362
610
  onGraphContainerMouseEnter: OnGraphMouseEnter;
363
611
  onGraphContainerMouseLeave: OnGraphMouseLeave;
612
+ private _headerHoverRestoreTimer?;
613
+ onGraphHeaderMouseDown: () => void;
614
+ onGraphHeaderMouseUp: (event: React.MouseEvent<any>) => void;
615
+ onGraphHeaderWheel: (event: React.WheelEvent<any>) => void;
616
+ onGraphHeaderMouseMove: (event: React.MouseEvent<any>) => void;
617
+ private hoverRowForHeaderEvent;
364
618
  onGraphResized: OnGraphResized;
365
619
  onGraphVisibleRowsUpdated(): void;
366
620
  getCurrentPlatform(): string;
367
621
  isMacOSPlatform(): boolean;
368
- isCommitListFiltered(): boolean;
622
+ isFilteredSearch(): boolean;
369
623
  getGraphColumnSettingFromZoneType(graphZone: GraphZone): GraphColumnSetting;
370
- decorateWithHelmet: (container: ReactElement<'div'>, cssVariables: CssVariables, nonce?: string) => React.JSX.Element;
624
+ decorateWithHelmet: (container: ReactElement<"div">, cssVariables: CssVariables, nonce?: string) => React.JSX.Element;
371
625
  render(): React.JSX.Element;
372
626
  }
373
627
  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
- export default class ScrollMarker extends React.PureComponent<Props> {
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(nextProps: Props): void;
33
+ componentDidUpdate(prevProps: Props): void;
19
34
  updateCanvas(nextProps?: Props): void;
20
- render(): ReactElement<'canvas'>;
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';
@@ -1,8 +1,8 @@
1
1
  import type { ReactElement } from 'react';
2
- import React from 'react';
2
+ import * as React from 'react';
3
3
  import type { CommitType, Sha } from '../../../domain/commit/CommitTypes';
4
4
  import type { CssVariables, Style } from '../../../domain/generic/GenericTypes';
5
- import type { ColumnColorByColumn, GetExternalIcon, GraphItemContext, GraphZoneModeConstants, OnClearCurrentlyHoveredGraphCommit, OnClickCommit, OnCommitContextMenu, OnCurrentlyHoveredGraphCommit, OnDoubleClickCommit, RowEdges } from '../../../domain/graph/GraphTypes';
5
+ import type { ColumnColorByColumn, GetExternalIcon, GraphItemContext, GraphZoneModeConstants, OnClearCurrentlyHoveredGraphCommit, OnClickCommit, OnCommitContextMenu, OnCurrentlyHoveredGraphCommit, OnDoubleClickCommit, RowEdges, ScopeBoundaryKind } from '../../../domain/graph/GraphTypes';
6
6
  import type { TranslationFn } from '../../../domain/language/LanguageTypes';
7
7
  type Props = {
8
8
  authorEmail: string;
@@ -38,6 +38,7 @@ type Props = {
38
38
  rightGutterBoxShadowAlpha: number;
39
39
  rightGutterWidth: number;
40
40
  rowContext?: GraphItemContext;
41
+ scopeBoundaryKind?: ScopeBoundaryKind;
41
42
  scrollLeft: number;
42
43
  setAsCurrentlyHoveredGraphCommit: OnCurrentlyHoveredGraphCommit;
43
44
  sha: Sha;