diff --git a/package.json b/package.json index 9dcacaf..15fce2a 100644 --- a/package.json +++ b/package.json @@ -2106,6 +2106,13 @@ "scope": "window", "order": 11 }, + "gitlens.graph.showGhostRefsOnRowHover": { + "type": "boolean", + "default": true, + "markdownDescription": "Specifies whether to show a ghost ref of the hovered/selected row in the _Commit Graph_", + "scope": "window", + "order": 12 + }, "gitlens.graph.defaultItemLimit": { "type": "number", "default": 500, diff --git a/src/config.ts b/src/config.ts index 28f8b6e..c779a51 100644 --- a/src/config.ts +++ b/src/config.ts @@ -380,6 +380,7 @@ export interface GraphConfig { dateStyle: DateStyle | null; defaultItemLimit: number; highlightRowsOnRefHover: boolean; + showGhostRefsOnRowHover: boolean; pageItemLimit: number; searchItemLimit: number; statusBar: { diff --git a/src/plus/webviews/graph/graphWebview.ts b/src/plus/webviews/graph/graphWebview.ts index 0c4ae2c..74da455 100644 --- a/src/plus/webviews/graph/graphWebview.ts +++ b/src/plus/webviews/graph/graphWebview.ts @@ -358,7 +358,8 @@ export class GraphWebview extends WebviewBase { configuration.changed(e, 'graph.avatars') || configuration.changed(e, 'graph.dateFormat') || configuration.changed(e, 'graph.dateStyle') || - configuration.changed(e, 'graph.highlightRowsOnRefHover') + configuration.changed(e, 'graph.highlightRowsOnRefHover') || + configuration.changed(e, 'graph.showGhostRefsOnRowHover') ) { void this.notifyDidChangeConfiguration(); } @@ -747,6 +748,7 @@ export class GraphWebview extends WebviewBase { dateStyle: configuration.get('graph.dateStyle') ?? configuration.get('defaultDateStyle'), enableMultiSelection: false, highlightRowsOnRefHover: configuration.get('graph.highlightRowsOnRefHover'), + showGhostRefsOnRowHover: configuration.get('graph.showGhostRefsOnRowHover'), shaLength: configuration.get('advanced.abbreviatedShaLength'), }; return config; diff --git a/src/plus/webviews/graph/protocol.ts b/src/plus/webviews/graph/protocol.ts index 0a2a6a4..66df95d 100644 --- a/src/plus/webviews/graph/protocol.ts +++ b/src/plus/webviews/graph/protocol.ts @@ -75,6 +75,7 @@ export interface GraphComponentConfig { dateStyle: DateStyle; enableMultiSelection?: boolean; highlightRowsOnRefHover?: boolean; + showGhostRefsOnRowHover?: boolean; shaLength?: number; } diff --git a/src/webviews/apps/plus/graph/GraphWrapper.tsx b/src/webviews/apps/plus/graph/GraphWrapper.tsx index 9b52b88..58b66dc 100644 --- a/src/webviews/apps/plus/graph/GraphWrapper.tsx +++ b/src/webviews/apps/plus/graph/GraphWrapper.tsx @@ -686,7 +686,8 @@ export function GraphWrapper({ hasMoreCommits={pagingState?.hasMore} height={mainHeight} highlightedShas={searchHighlights} - // highlightRowssOnRefHover={graphConfig?.highlightRowsOnRefHover} + highlightRowsOnRefHover={graphConfig?.highlightRowsOnRefHover} + showGhostRefsOnRowHover={graphConfig?.showGhostRefsOnRowHover} isLoadingRows={isLoading} isSelectedBySha={graphSelectedRows} nonce={nonce} diff --git a/src/webviews/apps/settings/partials/commit-graph.html b/src/webviews/apps/settings/partials/commit-graph.html index ba67ff0..46e3a62 100644 --- a/src/webviews/apps/settings/partials/commit-graph.html +++ b/src/webviews/apps/settings/partials/commit-graph.html @@ -78,6 +78,20 @@
+ +
+
+ +
+
+