Selaa lähdekoodia

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

main
Ramin Tadayon 2 vuotta sitten
committed by GitHub
vanhempi
commit
3c67f2c44c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
6 muutettua tiedostoa jossa 27 lisäystä ja 1 poistoa
  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 Näytä tiedosto

@ -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 Näytä tiedosto

@ -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 Näytä tiedosto

@ -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 Näytä tiedosto

@ -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 Näytä tiedosto

@ -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 Näytä tiedosto

@ -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"

Ladataan…
Peruuta
Tallenna