Skip to content

Commit f8473a5

Browse files
committed
Version 1.3.6 - Firefox release
2 parents afe386c + 3b08a68 commit f8473a5

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

.github/workflows/chrome-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
name: Checkout the repository
1515
- run: zip -r chrome-release.zip *
1616
name: Zip the extension
17-
- uses: actions/upload-artifact@v3
17+
- uses: actions/upload-artifact@v4
1818
name: Store the zip artifact
1919
with:
2020
name: chrome-release

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
A browser extension that displays the git graph for any GitHub repository.
66

77
[![Version](https://img.shields.io/badge/License-MIT-yellow)]()
8-
[![Version](https://img.shields.io/badge/Version-1.3.5-yellowgreen)]()
8+
[![Version](https://img.shields.io/badge/Version-1.3.6-yellowgreen)]()
99
[![Version](https://img.shields.io/badge/Chrome_CI/CD-Success-green)]()
1010
[![Version](https://img.shields.io/badge/Firefox_CI/CD-Success-green)]()
1111

js/drawGraph.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Maintaining a global variable storing the width of the svgContainer Element
2+
var maxX = 100;
3+
14
// Draws a curve between two given [commit] points
25
async function drawCurve(container, startx, starty, endx, endy, color) {
36
var firstLineEndY = starty + ((endy - starty - 40) / 2);
@@ -304,6 +307,9 @@ async function drawGraph(commits, commitDict) {
304307
var nextx = 30 + (14 * (indexArray[i + 1].indexOf(thisLineIndex)));
305308
var nexty = document.querySelectorAll('[circlesha="' + commits[i + 1].oid + '"]')[0].cy.baseVal.value;
306309
drawCurve(commitsGraphContainer, thisx, thisy, nextx, nexty, lineColors[thisLineIndex]);
310+
// Compairing the last container width to the new lines drawn's X coordinate
311+
// Using the larger of the two as the new width for the container
312+
maxX = Math.max(thisx,maxX);
307313
}
308314
}
309315
}
@@ -327,6 +333,15 @@ async function drawGraph(commits, commitDict) {
327333
}
328334
});
329335
});
336+
// Only updating width when it has crossed the min-width of 100
337+
if(maxX > 100){
338+
// Providing space for 13 lines at a time
339+
// Any more than that can hamper the UI of the screen
340+
maxX = Math.min(maxX,198)
341+
// Updating the width of the svgContainer Element
342+
var svgContainer = document.querySelector('#graphSvg');
343+
svgContainer.style.width = maxX;
344+
}
330345
}
331346

332347
// Get the vertical and horizontal position (center)

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.3.5",
2+
"version": "1.3.6",
33
"name": "Le Git Graph - Commits Graph for GitHub",
44
"description": "A browser extension that displays the git graph for any GitHub repository.",
55
"manifest_version": 3,

0 commit comments

Comments
 (0)