Преглед изворни кода

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

main
Ramin Tadayon пре 2 година
committed by GitHub
родитељ
комит
3c67f2c44c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
6 измењених фајлова са 27 додато и 1 уклоњено
  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 Прегледај датотеку

@ -2135,6 +2135,13 @@
"scope": "window", "scope": "window",
"order": 13 "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": { "gitlens.graph.defaultItemLimit": {
"type": "number", "type": "number",
"default": 500, "default": 500,

+ 1
- 0
src/config.ts Прегледај датотеку

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

+ 3
- 1
src/plus/webviews/graph/graphWebview.ts Прегледај датотеку

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

+ 1
- 0
src/plus/webviews/graph/protocol.ts Прегледај датотеку

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

+ 1
- 0
src/webviews/apps/plus/graph/GraphWrapper.tsx Прегледај датотеку

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

+ 14
- 0
src/webviews/apps/settings/partials/commit-graph.html Прегледај датотеку

@ -116,6 +116,20 @@
<div class="setting"> <div class="setting">
<div class="setting__input"> <div class="setting__input">
<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" id="graph.dateStyle"
name="graph.dateStyle" name="graph.dateStyle"
type="checkbox" type="checkbox"

Loading…
Откажи
Сачувај