Bladeren bron

Add and send setting to graph for showing remote names on ref branches (#2256)

main
Ramin Tadayon 2 jaren geleden
committed by GitHub
bovenliggende
commit
3c67f2c44c
Geen bekende sleutel gevonden voor deze handtekening in de database GPG sleutel-ID: 4AEE18F83AFDEB23
6 gewijzigde bestanden met toevoegingen van 27 en 1 verwijderingen
  1. +7
    -0
      package.json
  2. +1
    -0
      src/config.ts
  3. +3
    -1
      src/plus/webviews/graph/graphWebview.ts
  4. +1
    -0
      src/plus/webviews/graph/protocol.ts
  5. +1
    -0
      src/webviews/apps/plus/graph/GraphWrapper.tsx
  6. +14
    -0
      src/webviews/apps/settings/partials/commit-graph.html

+ 7
- 0
package.json Bestand weergeven

@ -2135,6 +2135,13 @@
"scope": "window",
"order": 13
},
"gitlens.graph.showRemoteNamesOnRefs": {
"type": "boolean",
"default": false,
"markdownDescription": "Specifies whether to show remote names on remote branches in the _Commit Graph_",
"scope": "window",
"order": 14
},
"gitlens.graph.defaultItemLimit": {
"type": "number",
"default": 500,

+ 1
- 0
src/config.ts Bestand weergeven

@ -382,6 +382,7 @@ export interface GraphConfig {
highlightRowsOnRefHover: boolean;
showDetailsView: 'open' | 'selection' | false;
showGhostRefsOnRowHover: boolean;
showRemoteNamesOnRefs: boolean;
pageItemLimit: number;
searchItemLimit: number;
statusBar: {

+ 3
- 1
src/plus/webviews/graph/graphWebview.ts Bestand weergeven

@ -468,7 +468,8 @@ export class GraphWebview extends WebviewBase {
configuration.changed(e, 'graph.dateFormat') ||
configuration.changed(e, 'graph.dateStyle') ||
configuration.changed(e, 'graph.highlightRowsOnRefHover') ||
configuration.changed(e, 'graph.showGhostRefsOnRowHover')
configuration.changed(e, 'graph.showGhostRefsOnRowHover') ||
configuration.changed(e, 'graph.showRemoteNamesOnRefs')
) {
void this.notifyDidChangeConfiguration();
}
@ -1127,6 +1128,7 @@ export class GraphWebview extends WebviewBase {
enableMultiSelection: false,
highlightRowsOnRefHover: configuration.get('graph.highlightRowsOnRefHover'),
showGhostRefsOnRowHover: configuration.get('graph.showGhostRefsOnRowHover'),
showRemoteNamesOnRefs: configuration.get('graph.showRemoteNamesOnRefs'),
idLength: configuration.get('advanced.abbreviatedShaLength'),
};
return config;

+ 1
- 0
src/plus/webviews/graph/protocol.ts Bestand weergeven

@ -96,6 +96,7 @@ export interface GraphComponentConfig {
enableMultiSelection?: boolean;
highlightRowsOnRefHover?: boolean;
showGhostRefsOnRowHover?: boolean;
showRemoteNamesOnRefs?: boolean;
idLength?: number;
}

+ 1
- 0
src/webviews/apps/plus/graph/GraphWrapper.tsx Bestand weergeven

@ -711,6 +711,7 @@ export function GraphWrapper({
highlightedShas={searchResults?.ids as GraphContainerProps['highlightedShas']}
highlightRowsOnRefHover={graphConfig?.highlightRowsOnRefHover}
showGhostRefsOnRowHover={graphConfig?.showGhostRefsOnRowHover}
showRemoteNamesOnRefs={graphConfig?.showRemoteNamesOnRefs}
isLoadingRows={isLoading}
isSelectedBySha={selectedRows}
nonce={nonce}

+ 14
- 0
src/webviews/apps/settings/partials/commit-graph.html Bestand weergeven

@ -116,6 +116,20 @@
<div class="setting">
<div class="setting__input">
<input
id="graph.showRemoteNamesOnRefs"
name="graph.showRemoteNamesOnRefs"
type="checkbox"
data-setting
/>
<label for="graph.showRemoteNamesOnRefs"
>Show remote names on remote branches</label
>
</div>
</div>
<div class="setting">
<div class="setting__input">
<input
id="graph.dateStyle"
name="graph.dateStyle"
type="checkbox"

Laden…
Annuleren
Opslaan