Browse Source

Updates settings UI ordering

Updates graph limit settings to match view limit naming
main
Eric Amodio 2 years ago
parent
commit
ec44f30c68
3 changed files with 65 additions and 65 deletions
  1. +59
    -59
      package.json
  2. +2
    -2
      src/config.ts
  3. +4
    -4
      src/plus/webviews/graph/graphWebview.ts

+ 59
- 59
package.json View File

@ -2087,9 +2087,67 @@
}
},
{
"id": "graph",
"title": "Commit Graph",
"order": 105,
"properties": {
"gitlens.graph.defaultItemLimit": {
"type": "number",
"default": 500,
"markdownDescription": "Specifies the default number of items to show in the _Commit Graph_. Use 0 to specify no limit",
"scope": "window",
"order": 10
},
"gitlens.graph.pageItemLimit": {
"type": "number",
"default": 200,
"markdownDescription": "Specifies the number of additional items to fetch when paginating in the _Commit Graph_. Use 0 to specify no limit",
"scope": "window",
"order": 20
},
"gitlens.graph.columnColors": {
"type": "array",
"items": {
"type": "string",
"pattern": "^#(?:[0-9a-fA-F]{3,4}){1,2}$"
},
"default": [
"#15a0bf",
"#0669f7",
"#8e00c2",
"#c517b6",
"#d90171",
"#cd0101",
"#f25d2e",
"#f2ca33",
"#7bd938",
"#2ece9d"
],
"markdownDescription": "Specifies the colors used for the different columns in the _Commit Graph_",
"scope": "window",
"order": 30,
"maxItems": 10,
"minItems": 10
}
}
},
{
"id": "visual-history",
"title": "Visual File History",
"order": 106,
"properties": {
"gitlens.visualHistory.queryLimit": {
"type": "number",
"default": 20,
"markdownDescription": "Specifies the limit on the how many commits can be queried for statistics in the Visual File History, because of rate limits. Only applies to virtual workspaces.",
"scope": "window"
}
}
},
{
"id": "rebase-editor",
"title": "Interactive Rebase Editor",
"order": 105,
"order": 107,
"properties": {
"gitlens.rebaseEditor.ordering": {
"type": "string",
@ -2458,19 +2516,6 @@
}
},
{
"id": "visual-history",
"title": "Visual File History",
"order": 113,
"properties": {
"gitlens.visualHistory.queryLimit": {
"type": "number",
"default": 20,
"markdownDescription": "Specifies the limit on the how many commits can be queried for statistics in the Visual File History, because of rate limits. Only applies to virtual workspaces.",
"scope": "window"
}
}
},
{
"id": "date-times",
"title": "Date & Times",
"order": 120,
@ -3005,51 +3050,6 @@
}
},
{
"id": "graph",
"title": "Graph",
"order": 124,
"properties": {
"gitlens.graph.defaultLimit": {
"type": "number",
"default": 500,
"markdownDescription": "Specifies the default number of items to show in the graph list. Use 0 to specify no limit",
"scope": "window",
"order": 10
},
"gitlens.graph.pageLimit": {
"type": "number",
"default": 200,
"markdownDescription": "Specifies the number of items to show in a each page when paginating a graph list. Use 0 to specify no limit",
"scope": "window",
"order": 20
},
"gitlens.graph.columnColors": {
"type": "array",
"items": {
"type": "string",
"pattern": "^#(?:[0-9a-fA-F]{3,4}){1,2}$"
},
"default": [
"#15a0bf",
"#0669f7",
"#8e00c2",
"#c517b6",
"#d90171",
"#cd0101",
"#f25d2e",
"#f2ca33",
"#7bd938",
"#2ece9d"
],
"markdownDescription": "Specifies the colors used for the different columns in the graph",
"scope": "window",
"order": 30,
"maxItems": 10,
"minItems": 10
}
}
},
{
"id": "advanced",
"title": "Advanced",
"order": 1000,

+ 2
- 2
src/config.ts View File

@ -378,8 +378,8 @@ export interface GraphColumnConfig {
}
export interface GraphConfig {
defaultLimit: number;
pageLimit: number;
defaultItemLimit: number;
pageItemLimit: number;
columnColors: string[];
}

+ 4
- 4
src/plus/webviews/graph/graphWebview.ts View File

@ -99,8 +99,8 @@ export class GraphWebview extends WebviewWithConfigBase {
private async moreCommits(limit?: number) {
if (this.currentLog?.more !== undefined) {
const { defaultLimit, pageLimit } = this.getConfig();
const nextLog = await this.currentLog.more(limit ?? pageLimit ?? defaultLimit);
const { defaultItemLimit, pageItemLimit } = this.getConfig();
const nextLog = await this.currentLog.more(limit ?? pageItemLimit ?? defaultItemLimit);
if (nextLog !== undefined) {
this.currentLog = nextLog;
}
@ -173,10 +173,10 @@ export class GraphWebview extends WebviewWithConfigBase {
return undefined;
}
const { defaultLimit, pageLimit } = this.getConfig();
const { defaultItemLimit, pageItemLimit } = this.getConfig();
return this.container.git.getLog(repository.uri, {
all: true,
limit: pageLimit ?? defaultLimit,
limit: pageItemLimit ?? defaultItemLimit,
});
}

Loading…
Cancel
Save