Overzicht: grafiek krimpt niet en past ook op 1280px
De paneelmaten staan inline op de slot, zodat lanes en tekst hun plaats houden, ook bij een oude stylesheet. De grafiek krijgt een vaste breedte en wordt niet geschaald; te lange committekst krijgt een ellipsis. De centrale kolom schuift naar rechts, ook bij 1280px. CSS en JS worden met Cache-Control: no-cache gegeven, zodat een self-update geen oude tekening over de nieuwe grafiek legt.
@@ -11,7 +11,7 @@ Het logo is de blauwe ster: [`assets/logo.svg`](assets/logo.svg).
11
11
## Wat het doet
12
12
13
13
- Repositories van een gebruiker of een groep, met bestanden, commits, branches, tags en releases.
14
- Op de project-overzichtspagina staat een commitgrafiek links van de centrale kolom, als er plek is. Elke commit staat op één regel; de lijnen lopen in verticale lanes met afgeronde 90-graden bochten, en de avatar is de commitknoop. De tekst begint in één kolom, rechts van de meest rechtse lane. De centrale kolom schuift iets naar rechts om de grafiek ruimte te geven; past het links niet, dan hangt hij rechts, anders blijft hij verborgen. De lijn van de in de dropdown gekozen branch gloeit. De hoofdbranch gebruikt de BlueGit-blauw; andere branches krijgen een vaste kleur uit hun naam. De grafiek wordt in het geheugen bewaard (LRU) en bij een push ververst, zodat herhaald laden geen git-I/O op schijf doet.
14
- Op de project-overzichtspagina staat een commitgrafiek links van de centrale kolom, als er plek is. Elke commit staat op één regel; de lijnen lopen in verticale lanes met afgeronde 90-graden bochten, en de avatar is de commitknoop. De tekst begint in één kolom, rechts van de meest rechtse lane. De centrale kolom schuift naar rechts om de grafiek ruimte te geven, ook op een scherm van 1280px; de grafiek wordt niet verkleind, te lange committekst krijgt een ellipsis. Past het links niet, dan hangt hij rechts, anders blijft hij verborgen. De lijn van de in de dropdown gekozen branch gloeit. De hoofdbranch gebruikt de BlueGit-blauw; andere branches krijgen een vaste kleur uit hun naam. De grafiek wordt in het geheugen bewaard (LRU) en bij een push ververst, zodat herhaald laden geen git-I/O op schijf doet.
15
15
- Merge requests met reviews, squash en het verwijderen van de bronbranch na een merge.
16
16
- Issues, met beschrijvingssjablonen in `.bluegit/issue_templates`. Merge requests gebruiken `.bluegit/merge_request_templates`. `Default.md` vult een lege beschrijving. Dezelfde namen onder `.gitlab/` zijn een terugval.
17
17
- Een ingebouwde CI-runner, Steve. Het bestand is `blue-ci-cd.yml`. Elke job draait in een eigen container. `image: bluegit/base` en de andere aliassen zijn image-presets die Steve lokaal bouwt.
@@ -11,7 +11,7 @@ Het logo is de blauwe ster: [`assets/logo.svg`](assets/logo.svg).11
## Wat het doet11
## Wat het doet12
12
13
- Repositories van een gebruiker of een groep, met bestanden, commits, branches, tags en releases.13
- Repositories van een gebruiker of een groep, met bestanden, commits, branches, tags en releases.14
- Op de project-overzichtspagina staat een commitgrafiek links van de centrale kolom, als er plek is. Elke commit staat op één regel; de lijnen lopen in verticale lanes met afgeronde 90-graden bochten, en de avatar is de commitknoop. De tekst begint in één kolom, rechts van de meest rechtse lane. De centrale kolom schuift iets naar rechts om de grafiek ruimte te geven; past het links niet, dan hangt hij rechts, anders blijft hij verborgen. De lijn van de in de dropdown gekozen branch gloeit. De hoofdbranch gebruikt de BlueGit-blauw; andere branches krijgen een vaste kleur uit hun naam. De grafiek wordt in het geheugen bewaard (LRU) en bij een push ververst, zodat herhaald laden geen git-I/O op schijf doet.14
- Op de project-overzichtspagina staat een commitgrafiek links van de centrale kolom, als er plek is. Elke commit staat op één regel; de lijnen lopen in verticale lanes met afgeronde 90-graden bochten, en de avatar is de commitknoop. De tekst begint in één kolom, rechts van de meest rechtse lane. De centrale kolom schuift naar rechts om de grafiek ruimte te geven, ook op een scherm van 1280px; de grafiek wordt niet verkleind, te lange committekst krijgt een ellipsis. Past het links niet, dan hangt hij rechts, anders blijft hij verborgen. De lijn van de in de dropdown gekozen branch gloeit. De hoofdbranch gebruikt de BlueGit-blauw; andere branches krijgen een vaste kleur uit hun naam. De grafiek wordt in het geheugen bewaard (LRU) en bij een push ververst, zodat herhaald laden geen git-I/O op schijf doet.15
- Merge requests met reviews, squash en het verwijderen van de bronbranch na een merge.15
- Merge requests met reviews, squash en het verwijderen van de bronbranch na een merge.16
- Issues, met beschrijvingssjablonen in `.bluegit/issue_templates`. Merge requests gebruiken `.bluegit/merge_request_templates`. `Default.md` vult een lege beschrijving. Dezelfde namen onder `.gitlab/` zijn een terugval.16
- Issues, met beschrijvingssjablonen in `.bluegit/issue_templates`. Merge requests gebruiken `.bluegit/merge_request_templates`. `Default.md` vult een lege beschrijving. Dezelfde namen onder `.gitlab/` zijn een terugval.17
- Een ingebouwde CI-runner, Steve. Het bestand is `blue-ci-cd.yml`. Elke job draait in een eigen container. `image: bluegit/base` en de andere aliassen zijn image-presets die Steve lokaal bouwt.17
- Een ingebouwde CI-runner, Steve. Het bestand is `blue-ci-cd.yml`. Elke job draait in een eigen container. `image: bluegit/base` en de andere aliassen zijn image-presets die Steve lokaal bouwt.@@ -95,6 +95,6 @@ Webhooks gaan niet naar een privénetwerk. De classificatie staat in `internal/s
95
95
96
96
## Commitgrafiek
97
97
98
De project-overzichtspagina toont een commitgrafiek links van de centrale kolom, als die ruimte breed genoeg is. Elke commit staat op één regel. Lijnen lopen in verticale lanes en buigen met afgeronde 90-graden hoeken naar een andere lane. De avatar van de auteur is de commitknoop, op de lane. De committekst staat in één linkse kolom die begint net rechts van de meest rechtse lane. De centrale kolom schuift iets naar rechts zodat de grafiek meer ruimte krijgt. Past hij links niet, dan hangt hij rechts van de kolom; anders blijft hij verborgen. De lane van de in de branch-dropdown gekozen branch gloeit (client-side, zonder extra request). De hoofdbranch is altijd `--blue`. Andere branches krijgen een deterministische kleur uit een palet van CSS-variabelen, op basis van de branchnaam.
98
De project-overzichtspagina toont een commitgrafiek links van de centrale kolom, als die ruimte breed genoeg is. Elke commit staat op één regel. Lijnen lopen in verticale lanes en buigen met afgeronde 90-graden hoeken naar een andere lane. De avatar van de auteur is de commitknoop, op de lane. De committekst staat in één linkse kolom die begint net rechts van de meest rechtse lane. De centrale kolom schuift naar rechts zodat de grafiek meer ruimte krijgt, ook bij een vensterbreedte van 1280px. De lanes en het SVG worden niet geschaald; de tekstkolom begint altijd rechts van de meest rechtse lane en kapt af met een ellipsis. Past de grafiek links niet, dan hangt hij rechts van de kolom; anders blijft hij verborgen. Stylesheets en scripts worden met Cache-Control: no-cache gegeven, zodat een self-update geen oude CSS over de nieuwe tekening legt. De lane van de in de branch-dropdown gekozen branch gloeit (client-side, zonder extra request). De hoofdbranch is altijd `--blue`. Andere branches krijgen een deterministische kleur uit een palet van CSS-variabelen, op basis van de branchnaam.
99
99
100
100
De gelegde grafiek (recente commits over alle branches, inclusief merges en forks) staat in een begrensde LRU-cache in het geheugen, per repository (en hoofdbranch). Een herhaalde pageview doet geen git-I/O. Bij een push wist `refsChanged` de entry en vult `refreshCache` hem op de achtergrond opnieuw. Deze cache schrijft niet naar schijf en is onafhankelijk van de optionele leescache.
@@ -95,6 +95,6 @@ Webhooks gaan niet naar een privénetwerk. De classificatie staat in `internal/s95
95
96
## Commitgrafiek96
## Commitgrafiek97
97
98
De project-overzichtspagina toont een commitgrafiek links van de centrale kolom, als die ruimte breed genoeg is. Elke commit staat op één regel. Lijnen lopen in verticale lanes en buigen met afgeronde 90-graden hoeken naar een andere lane. De avatar van de auteur is de commitknoop, op de lane. De committekst staat in één linkse kolom die begint net rechts van de meest rechtse lane. De centrale kolom schuift iets naar rechts zodat de grafiek meer ruimte krijgt. Past hij links niet, dan hangt hij rechts van de kolom; anders blijft hij verborgen. De lane van de in de branch-dropdown gekozen branch gloeit (client-side, zonder extra request). De hoofdbranch is altijd `--blue`. Andere branches krijgen een deterministische kleur uit een palet van CSS-variabelen, op basis van de branchnaam.98
De project-overzichtspagina toont een commitgrafiek links van de centrale kolom, als die ruimte breed genoeg is. Elke commit staat op één regel. Lijnen lopen in verticale lanes en buigen met afgeronde 90-graden hoeken naar een andere lane. De avatar van de auteur is de commitknoop, op de lane. De committekst staat in één linkse kolom die begint net rechts van de meest rechtse lane. De centrale kolom schuift naar rechts zodat de grafiek meer ruimte krijgt, ook bij een vensterbreedte van 1280px. De lanes en het SVG worden niet geschaald; de tekstkolom begint altijd rechts van de meest rechtse lane en kapt af met een ellipsis. Past de grafiek links niet, dan hangt hij rechts van de kolom; anders blijft hij verborgen. Stylesheets en scripts worden met Cache-Control: no-cache gegeven, zodat een self-update geen oude CSS over de nieuwe tekening legt. De lane van de in de branch-dropdown gekozen branch gloeit (client-side, zonder extra request). De hoofdbranch is altijd `--blue`. Andere branches krijgen een deterministische kleur uit een palet van CSS-variabelen, op basis van de branchnaam.99
99
100
De gelegde grafiek (recente commits over alle branches, inclusief merges en forks) staat in een begrensde LRU-cache in het geheugen, per repository (en hoofdbranch). Een herhaalde pageview doet geen git-I/O. Bij een push wist `refsChanged` de entry en vult `refreshCache` hem op de achtergrond opnieuw. Deze cache schrijft niet naar schijf en is onafhankelijk van de optionele leescache.100
De gelegde grafiek (recente commits over alle branches, inclusief merges en forks) staat in een begrensde LRU-cache in het geheugen, per repository (en hoofdbranch). Een herhaalde pageview doet geen git-I/O. Bij een push wist `refsChanged` de entry en vult `refreshCache` hem op de achtergrond opnieuw. Deze cache schrijft niet naar schijf en is onafhankelijk van de optionele leescache.@@ -6,6 +6,7 @@ import (
6
6
"net/http/cookiejar"
7
7
"net/http/httptest"
8
8
"net/url"
9
"os"
9
10
"path/filepath"
10
11
"strings"
11
12
"testing"
@@ -47,8 +48,8 @@ func TestOverviewRendersCommitGraph(t *testing.T) {
47
48
if !strings.Contains(page, `data-branch="master"`) {
48
49
t.Fatalf("gloed-attribuut ontbreekt:\n%s", page)
49
50
}
50
if !strings.Contains(page, "--graph-w:") {
51
t.Fatalf("paneelbreedte ontbreekt")
51
if !strings.Contains(page, `class="commitgraph-slot"`) || !strings.Contains(page, "--graph-w:") || !strings.Contains(page, "--graph-lanes-w:") || !strings.Contains(page, "--graph-svg-w:") {
52
t.Fatalf("inline paneelmaten ontbreken op de slot:\n%s", page)
52
53
}
53
54
if strings.Contains(page, "ZgotmplZ") {
54
55
t.Fatalf("css-kleur werd weggestreept:\n%s", page)
@@ -243,3 +244,39 @@ func TestSVGColorsAreSafe(t *testing.T) {
243
244
t.Fatalf("verwacht afgeronde bochten in %s", svg)
244
245
}
245
246
}
247
248
func TestGraphCSSDoesNotShrinkLanes(t *testing.T) {
249
css, err := os.ReadFile("static/style.css")
250
if err != nil {
251
t.Fatal(err)
252
}
253
s := string(css)
254
for _, want := range []string{
255
"min-width: var(--graph-w)",
256
"flex: 0 0 var(--graph-w)",
257
"minmax(0, 1fr)",
258
"text-overflow: ellipsis",
259
"--graph-lanes-w",
260
} {
261
if !strings.Contains(s, want) {
262
t.Fatalf("stylesheet mist %q", want)
263
}
264
}
265
if strings.Contains(s, "@media (min-width: 1860px)") {
266
t.Fatal("oude 1860px-drempel verbergt de grafiek nog op 1280/1920")
267
}
268
}
269
270
func TestAssetCSSAndJSAreNotCached(t *testing.T) {
271
ts, client, _ := graphTestRepo(t)
272
css := mustGet(t, client, ts.URL+"/assets/style.css")
273
if got := css.Header.Get("Cache-Control"); got != "no-cache" {
274
t.Fatalf("style.css Cache-Control=%q, wil no-cache", got)
275
}
276
_ = css.Body.Close()
277
js := mustGet(t, client, ts.URL+"/assets/repo.js")
278
if got := js.Header.Get("Cache-Control"); got != "no-cache" {
279
t.Fatalf("repo.js Cache-Control=%q, wil no-cache", got)
280
}
281
_ = js.Body.Close()
282
}
@@ -6,6 +6,7 @@ import (6
"net/http/cookiejar"6
"net/http/cookiejar"7
"net/http/httptest"7
"net/http/httptest"8
"net/url"8
"net/url"9
"os"9
"path/filepath"10
"path/filepath"10
"strings"11
"strings"11
"testing"12
"testing"@@ -47,8 +48,8 @@ func TestOverviewRendersCommitGraph(t *testing.T) {47
if !strings.Contains(page, `data-branch="master"`) {48
if !strings.Contains(page, `data-branch="master"`) {48
t.Fatalf("gloed-attribuut ontbreekt:\n%s", page)49
t.Fatalf("gloed-attribuut ontbreekt:\n%s", page)49
}50
}50
if !strings.Contains(page, "--graph-w:") {51
if !strings.Contains(page, `class="commitgraph-slot"`) || !strings.Contains(page, "--graph-w:") || !strings.Contains(page, "--graph-lanes-w:") || !strings.Contains(page, "--graph-svg-w:") {51
t.Fatalf("paneelbreedte ontbreekt")52
t.Fatalf("inline paneelmaten ontbreken op de slot:\n%s", page)52
}53
}53
if strings.Contains(page, "ZgotmplZ") {54
if strings.Contains(page, "ZgotmplZ") {54
t.Fatalf("css-kleur werd weggestreept:\n%s", page)55
t.Fatalf("css-kleur werd weggestreept:\n%s", page)@@ -243,3 +244,39 @@ func TestSVGColorsAreSafe(t *testing.T) {243
t.Fatalf("verwacht afgeronde bochten in %s", svg)244
t.Fatalf("verwacht afgeronde bochten in %s", svg)244
}245
}245
}246
}247
248
func TestGraphCSSDoesNotShrinkLanes(t *testing.T) {249
css, err := os.ReadFile("static/style.css")250
if err != nil {251
t.Fatal(err)252
}253
s := string(css)254
for _, want := range []string{255
"min-width: var(--graph-w)",256
"flex: 0 0 var(--graph-w)",257
"minmax(0, 1fr)",258
"text-overflow: ellipsis",259
"--graph-lanes-w",260
} {261
if !strings.Contains(s, want) {262
t.Fatalf("stylesheet mist %q", want)263
}264
}265
if strings.Contains(s, "@media (min-width: 1860px)") {266
t.Fatal("oude 1860px-drempel verbergt de grafiek nog op 1280/1920")267
}268
}269
270
func TestAssetCSSAndJSAreNotCached(t *testing.T) {271
ts, client, _ := graphTestRepo(t)272
css := mustGet(t, client, ts.URL+"/assets/style.css")273
if got := css.Header.Get("Cache-Control"); got != "no-cache" {274
t.Fatalf("style.css Cache-Control=%q, wil no-cache", got)275
}276
_ = css.Body.Close()277
js := mustGet(t, client, ts.URL+"/assets/repo.js")278
if got := js.Header.Get("Cache-Control"); got != "no-cache" {279
t.Fatalf("repo.js Cache-Control=%q, wil no-cache", got)280
}281
_ = js.Body.Close()282
}@@ -360,6 +360,11 @@ func (s *Server) asset(w http.ResponseWriter, r *http.Request) {
360
360
http.Error(w, "assets", http.StatusInternalServerError)
361
361
return
362
362
}
363
// CSS/JS moeten na een self-update niet uit een oude cache komen:
364
// een achtergebleven stylesheet zet de tekst over de lanes.
365
if strings.HasSuffix(name, ".css") || strings.HasSuffix(name, ".js") {
366
w.Header().Set("Cache-Control", "no-cache")
367
}
363
368
http.ServeFileFS(w, r, sub, name)
364
369
}
365
370
@@ -360,6 +360,11 @@ func (s *Server) asset(w http.ResponseWriter, r *http.Request) {360
http.Error(w, "assets", http.StatusInternalServerError)360
http.Error(w, "assets", http.StatusInternalServerError)361
return361
return362
}362
}363
// CSS/JS moeten na een self-update niet uit een oude cache komen:364
// een achtergebleven stylesheet zet de tekst over de lanes.365
if strings.HasSuffix(name, ".css") || strings.HasSuffix(name, ".js") {366
w.Header().Set("Cache-Control", "no-cache")367
}363
http.ServeFileFS(w, r, sub, name)368
http.ServeFileFS(w, r, sub, name)364
}369
}365
370
@@ -15,18 +15,24 @@
15
15
el.classList.toggle("is-glow", branchMatch(el, name));
16
16
});
17
17
slot.classList.remove("is-right", "is-hidden");
18
var node = graph;
19
var rect = node.getBoundingClientRect();
18
var rect = graph.getBoundingClientRect();
19
if (rect.width === 0) return;
20
20
var side = document.querySelector(".sidenav");
21
var leftBound = 8;
21
var sideRight = 0;
22
22
if (side && getComputedStyle(side).display !== "none") {
23
leftBound = Math.max(leftBound, side.getBoundingClientRect().right + 8);
23
sideRight = side.getBoundingClientRect().right;
24
24
}
25
if (rect.width === 0) return;
26
if (rect.left < leftBound) {
25
// In de flow met gereserveerde breedte: vertrouw de CSS, tenzij
26
// de grafiek duidelijk onder de zijbalk schuift. Niet verplaatsen
27
// om een rand van een paar pixels.
28
var reserved = parseFloat(getComputedStyle(slot).width) || 0;
29
if (reserved > 0 && rect.left >= sideRight - 1) {
30
return;
31
}
32
if (rect.left < sideRight - 1) {
27
33
slot.classList.add("is-right");
28
rect = node.getBoundingClientRect();
29
if (rect.right > window.innerWidth - 8 || rect.width === 0) {
34
rect = graph.getBoundingClientRect();
35
if (rect.right > window.innerWidth - 8 || rect.width === 0 || rect.left < sideRight - 1) {
30
36
slot.classList.remove("is-right");
31
37
slot.classList.add("is-hidden");
32
38
}
@@ -15,18 +15,24 @@15
el.classList.toggle("is-glow", branchMatch(el, name));15
el.classList.toggle("is-glow", branchMatch(el, name));16
});16
});17
slot.classList.remove("is-right", "is-hidden");17
slot.classList.remove("is-right", "is-hidden");18
var node = graph;18
var rect = graph.getBoundingClientRect();19
var rect = node.getBoundingClientRect();19
if (rect.width === 0) return;20
var side = document.querySelector(".sidenav");20
var side = document.querySelector(".sidenav");21
var leftBound = 8;21
var sideRight = 0;22
if (side && getComputedStyle(side).display !== "none") {22
if (side && getComputedStyle(side).display !== "none") {23
leftBound = Math.max(leftBound, side.getBoundingClientRect().right + 8);23
sideRight = side.getBoundingClientRect().right;24
}24
}25
if (rect.width === 0) return;25
// In de flow met gereserveerde breedte: vertrouw de CSS, tenzij26
if (rect.left < leftBound) {26
// de grafiek duidelijk onder de zijbalk schuift. Niet verplaatsen27
// om een rand van een paar pixels.28
var reserved = parseFloat(getComputedStyle(slot).width) || 0;29
if (reserved > 0 && rect.left >= sideRight - 1) {30
return;31
}32
if (rect.left < sideRight - 1) {27
slot.classList.add("is-right");33
slot.classList.add("is-right");28
rect = node.getBoundingClientRect();34
rect = graph.getBoundingClientRect();29
if (rect.right > window.innerWidth - 8 || rect.width === 0) {35
if (rect.right > window.innerWidth - 8 || rect.width === 0 || rect.left < sideRight - 1) {30
slot.classList.remove("is-right");36
slot.classList.remove("is-right");31
slot.classList.add("is-hidden");37
slot.classList.add("is-hidden");32
}38
}@@ -1532,13 +1532,16 @@ li.rel-asset form.rel-asset-actions { display: inline-flex; align-items: center;
1532
1532
form.cancelform { display: inline; }
1533
1533
1534
1534
/* Commitgrafiek links van de centrale kolom. In de flow, zodat de
1535
kolom iets naar rechts schuift en de lanes + tekst ruimte krijgen.
1536
Past het links niet, dan hangt hij rechts; anders blijft hij verborgen. */
1535
kolom naar rechts schuift. De paneelbreedte (--graph-w) komt inline
1536
uit de server en krimpt niet: lanes blijven op schaal, tekst krijgt
1537
een ellipsis. Past hij niet links, dan hangt hij rechts; anders
1538
blijft hij verborgen. */
1537
1539
.commitgraph-slot {
1538
1540
display: none;
1539
1541
position: sticky;
1540
1542
top: calc(var(--top-h) + var(--sp-4));
1541
1543
width: 0;
1544
min-width: 0;
1542
1545
flex: none;
1543
1546
align-self: flex-start;
1544
1547
z-index: 5;
@@ -1546,30 +1549,44 @@ form.cancelform { display: inline; }
1546
1549
.commitgraph {
1547
1550
position: relative;
1548
1551
width: var(--graph-w);
1552
min-width: var(--graph-w);
1553
max-width: var(--graph-w);
1549
1554
max-height: calc(100vh - var(--top-h) - var(--sp-6));
1550
overflow-x: visible;
1555
overflow-x: hidden;
1551
1556
overflow-y: auto;
1552
1557
font-size: var(--fs-sm);
1553
1558
color: var(--ink);
1559
zoom: 1;
1560
transform: none;
1554
1561
}
1555
.commitgraph-list { list-style: none; margin: 0; padding: 0; position: relative; }
1562
.commitgraph-list { list-style: none; margin: 0; padding: 0; position: relative; width: var(--graph-w); min-width: var(--graph-w); }
1556
1563
.commitgraph-svg {
1557
1564
position: absolute;
1558
1565
top: 0;
1559
1566
left: var(--graph-ref-w);
1567
width: var(--graph-svg-w, auto);
1568
max-width: none;
1569
height: auto;
1560
1570
pointer-events: none;
1561
1571
z-index: 0;
1562
1572
}
1563
1573
.commitgraph-row {
1564
1574
display: grid;
1565
grid-template-columns: var(--graph-ref-w) calc(var(--lanes, 1) * var(--graph-lane) + 8px) minmax(var(--graph-msg-w), 1fr);
1575
grid-template-columns: var(--graph-ref-w) var(--graph-lanes-w, calc(var(--lanes, 1) * var(--graph-lane) + 8px)) minmax(0, 1fr);
1566
1576
align-items: center;
1567
1577
height: var(--graph-row);
1568
1578
position: relative;
1579
min-width: var(--graph-w);
1569
1580
}
1570
1581
.commitgraph-refs {
1571
1582
display: flex; gap: 2px; justify-content: flex-end; align-items: center;
1572
min-width: 0; overflow: hidden; padding-right: 4px;
1583
width: var(--graph-ref-w); min-width: var(--graph-ref-w);
1584
overflow: hidden; padding-right: 4px;
1585
}
1586
.commitgraph-lanes {
1587
width: var(--graph-lanes-w, calc(var(--lanes, 1) * var(--graph-lane) + 8px));
1588
min-width: var(--graph-lanes-w, calc(var(--lanes, 1) * var(--graph-lane) + 8px));
1589
flex: none;
1573
1590
}
1574
1591
.commitgraph-ref {
1575
1592
flex: 0 1 auto;
@@ -1620,30 +1637,48 @@ form.cancelform { display: inline; }
1620
1637
box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--c, var(--blue));
1621
1638
}
1622
1639
.commitgraph-ref.is-glow { box-shadow: 0 0 0 1px var(--c, var(--blue)); }
1623
/* In de flow links als grafiek + centrale kolom in de contentbak passen.
1624
Met sidebar (240px): viewport >= 240 + graph + gap + 1180.
1625
Zonder: viewport >= graph + gap + 1180. --graph-w is typisch 400px. */
1626
@container maincol (min-width: 1620px) {
1627
.commitgraph-slot { display: block; width: var(--graph-w); }
1640
/* Toon links als de contentbak de grafiek plus een bruikbare
1641
hoofdkolom (~480px) kan dragen. Op 1280px met sidebar (content
1642
~1040px) past dat; de hoofdkolom schuift naar rechts en mag
1643
smaller worden. Daaronder: rechts of verborgen. */
1644
@container maincol (min-width: 900px) {
1645
.commitgraph-slot {
1646
display: block;
1647
width: var(--graph-w);
1648
min-width: var(--graph-w);
1649
flex: 0 0 var(--graph-w);
1650
}
1628
1651
.commitgraph { margin-right: var(--graph-gap); }
1629
1652
}
1630
@media (min-width: 1860px) {
1631
.frame.with-side .commitgraph-slot { display: block; width: var(--graph-w); }
1653
@media (min-width: 1140px) {
1654
.frame.with-side .commitgraph-slot {
1655
display: block;
1656
width: var(--graph-w);
1657
min-width: var(--graph-w);
1658
flex: 0 0 var(--graph-w);
1659
}
1632
1660
.frame.with-side .commitgraph { margin-right: var(--graph-gap); }
1633
1661
}
1634
@media (min-width: 1620px) {
1635
.frame:not(.with-side) .commitgraph-slot { display: block; width: var(--graph-w); }
1662
@media (min-width: 900px) {
1663
.frame:not(.with-side) .commitgraph-slot {
1664
display: block;
1665
width: var(--graph-w);
1666
min-width: var(--graph-w);
1667
flex: 0 0 var(--graph-w);
1668
}
1636
1669
.frame:not(.with-side) .commitgraph { margin-right: var(--graph-gap); }
1637
1670
}
1638
@media (max-width: 1619px) {
1671
@media (max-width: 899px) {
1639
1672
.frame:not(.with-side) .commitgraph-slot:not(.is-right) { display: none; }
1640
1673
}
1641
@media (max-width: 1859px) {
1674
@media (max-width: 1139px) {
1642
1675
.frame.with-side .commitgraph-slot:not(.is-right) { display: none; }
1643
1676
}
1644
1677
.commitgraph-slot.is-right {
1645
1678
display: block;
1646
1679
width: 0;
1680
min-width: 0;
1681
flex: none;
1647
1682
order: 1;
1648
1683
}
1649
1684
.commitgraph-slot.is-right .commitgraph {
@@ -1651,3 +1686,4 @@ form.cancelform { display: inline; }
1651
1686
margin-right: 0;
1652
1687
}
1653
1688
.commitgraph-slot.is-hidden { display: none !important; }
1689
@@ -1532,13 +1532,16 @@ li.rel-asset form.rel-asset-actions { display: inline-flex; align-items: center;1532
form.cancelform { display: inline; }1532
form.cancelform { display: inline; }1533
1533
1534
/* Commitgrafiek links van de centrale kolom. In de flow, zodat de1534
/* Commitgrafiek links van de centrale kolom. In de flow, zodat de1535
kolom iets naar rechts schuift en de lanes + tekst ruimte krijgen.1535
kolom naar rechts schuift. De paneelbreedte (--graph-w) komt inline1536
Past het links niet, dan hangt hij rechts; anders blijft hij verborgen. */1536
uit de server en krimpt niet: lanes blijven op schaal, tekst krijgt1537
een ellipsis. Past hij niet links, dan hangt hij rechts; anders1538
blijft hij verborgen. */1537
.commitgraph-slot {1539
.commitgraph-slot {1538
display: none;1540
display: none;1539
position: sticky;1541
position: sticky;1540
top: calc(var(--top-h) + var(--sp-4));1542
top: calc(var(--top-h) + var(--sp-4));1541
width: 0;1543
width: 0;1544
min-width: 0;1542
flex: none;1545
flex: none;1543
align-self: flex-start;1546
align-self: flex-start;1544
z-index: 5;1547
z-index: 5;@@ -1546,30 +1549,44 @@ form.cancelform { display: inline; }1546
.commitgraph {1549
.commitgraph {1547
position: relative;1550
position: relative;1548
width: var(--graph-w);1551
width: var(--graph-w);1552
min-width: var(--graph-w);1553
max-width: var(--graph-w);1549
max-height: calc(100vh - var(--top-h) - var(--sp-6));1554
max-height: calc(100vh - var(--top-h) - var(--sp-6));1550
overflow-x: visible;1555
overflow-x: hidden;1551
overflow-y: auto;1556
overflow-y: auto;1552
font-size: var(--fs-sm);1557
font-size: var(--fs-sm);1553
color: var(--ink);1558
color: var(--ink);1559
zoom: 1;1560
transform: none;1554
}1561
}1555
.commitgraph-list { list-style: none; margin: 0; padding: 0; position: relative; }1562
.commitgraph-list { list-style: none; margin: 0; padding: 0; position: relative; width: var(--graph-w); min-width: var(--graph-w); }1556
.commitgraph-svg {1563
.commitgraph-svg {1557
position: absolute;1564
position: absolute;1558
top: 0;1565
top: 0;1559
left: var(--graph-ref-w);1566
left: var(--graph-ref-w);1567
width: var(--graph-svg-w, auto);1568
max-width: none;1569
height: auto;1560
pointer-events: none;1570
pointer-events: none;1561
z-index: 0;1571
z-index: 0;1562
}1572
}1563
.commitgraph-row {1573
.commitgraph-row {1564
display: grid;1574
display: grid;1565
grid-template-columns: var(--graph-ref-w) calc(var(--lanes, 1) * var(--graph-lane) + 8px) minmax(var(--graph-msg-w), 1fr);1575
grid-template-columns: var(--graph-ref-w) var(--graph-lanes-w, calc(var(--lanes, 1) * var(--graph-lane) + 8px)) minmax(0, 1fr);1566
align-items: center;1576
align-items: center;1567
height: var(--graph-row);1577
height: var(--graph-row);1568
position: relative;1578
position: relative;1579
min-width: var(--graph-w);1569
}1580
}1570
.commitgraph-refs {1581
.commitgraph-refs {1571
display: flex; gap: 2px; justify-content: flex-end; align-items: center;1582
display: flex; gap: 2px; justify-content: flex-end; align-items: center;1572
min-width: 0; overflow: hidden; padding-right: 4px;1583
width: var(--graph-ref-w); min-width: var(--graph-ref-w);1584
overflow: hidden; padding-right: 4px;1585
}1586
.commitgraph-lanes {1587
width: var(--graph-lanes-w, calc(var(--lanes, 1) * var(--graph-lane) + 8px));1588
min-width: var(--graph-lanes-w, calc(var(--lanes, 1) * var(--graph-lane) + 8px));1589
flex: none;1573
}1590
}1574
.commitgraph-ref {1591
.commitgraph-ref {1575
flex: 0 1 auto;1592
flex: 0 1 auto;@@ -1620,30 +1637,48 @@ form.cancelform { display: inline; }1620
box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--c, var(--blue));1637
box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--c, var(--blue));1621
}1638
}1622
.commitgraph-ref.is-glow { box-shadow: 0 0 0 1px var(--c, var(--blue)); }1639
.commitgraph-ref.is-glow { box-shadow: 0 0 0 1px var(--c, var(--blue)); }1623
/* In de flow links als grafiek + centrale kolom in de contentbak passen.1640
/* Toon links als de contentbak de grafiek plus een bruikbare1624
Met sidebar (240px): viewport >= 240 + graph + gap + 1180.1641
hoofdkolom (~480px) kan dragen. Op 1280px met sidebar (content1625
Zonder: viewport >= graph + gap + 1180. --graph-w is typisch 400px. */1642
~1040px) past dat; de hoofdkolom schuift naar rechts en mag1626
@container maincol (min-width: 1620px) {1643
smaller worden. Daaronder: rechts of verborgen. */1627
.commitgraph-slot { display: block; width: var(--graph-w); }1644
@container maincol (min-width: 900px) {1645
.commitgraph-slot {1646
display: block;1647
width: var(--graph-w);1648
min-width: var(--graph-w);1649
flex: 0 0 var(--graph-w);1650
}1628
.commitgraph { margin-right: var(--graph-gap); }1651
.commitgraph { margin-right: var(--graph-gap); }1629
}1652
}1630
@media (min-width: 1860px) {1653
@media (min-width: 1140px) {1631
.frame.with-side .commitgraph-slot { display: block; width: var(--graph-w); }1654
.frame.with-side .commitgraph-slot {1655
display: block;1656
width: var(--graph-w);1657
min-width: var(--graph-w);1658
flex: 0 0 var(--graph-w);1659
}1632
.frame.with-side .commitgraph { margin-right: var(--graph-gap); }1660
.frame.with-side .commitgraph { margin-right: var(--graph-gap); }1633
}1661
}1634
@media (min-width: 1620px) {1662
@media (min-width: 900px) {1635
.frame:not(.with-side) .commitgraph-slot { display: block; width: var(--graph-w); }1663
.frame:not(.with-side) .commitgraph-slot {1664
display: block;1665
width: var(--graph-w);1666
min-width: var(--graph-w);1667
flex: 0 0 var(--graph-w);1668
}1636
.frame:not(.with-side) .commitgraph { margin-right: var(--graph-gap); }1669
.frame:not(.with-side) .commitgraph { margin-right: var(--graph-gap); }1637
}1670
}1638
@media (max-width: 1619px) {1671
@media (max-width: 899px) {1639
.frame:not(.with-side) .commitgraph-slot:not(.is-right) { display: none; }1672
.frame:not(.with-side) .commitgraph-slot:not(.is-right) { display: none; }1640
}1673
}1641
@media (max-width: 1859px) {1674
@media (max-width: 1139px) {1642
.frame.with-side .commitgraph-slot:not(.is-right) { display: none; }1675
.frame.with-side .commitgraph-slot:not(.is-right) { display: none; }1643
}1676
}1644
.commitgraph-slot.is-right {1677
.commitgraph-slot.is-right {1645
display: block;1678
display: block;1646
width: 0;1679
width: 0;1680
min-width: 0;1681
flex: none;1647
order: 1;1682
order: 1;1648
}1683
}1649
.commitgraph-slot.is-right .commitgraph {1684
.commitgraph-slot.is-right .commitgraph {@@ -1651,3 +1686,4 @@ form.cancelform { display: inline; }1651
margin-right: 0;1686
margin-right: 0;1652
}1687
}1653
.commitgraph-slot.is-hidden { display: none !important; }1688
.commitgraph-slot.is-hidden { display: none !important; }1689
@@ -1,6 +1,6 @@
1
1
{{define "commitgraph"}}
2
<div class="commitgraph-slot">
3
<aside class="commitgraph" aria-label="{{t "graph.label"}}" style="--lanes: {{.Graph.Lanes}}; --graph-w: {{.Graph.PanelWidth}}px" data-selected="{{.Rev}}">
2
<div class="commitgraph-slot" style="--lanes: {{.Graph.Lanes}}; --graph-w: {{.Graph.PanelWidth}}px; --graph-lanes-w: {{.Graph.TextX}}px; --graph-svg-w: {{.Graph.Width}}px">
3
<aside class="commitgraph" aria-label="{{t "graph.label"}}" data-selected="{{.Rev}}">
4
4
{{.Graph.SVG}}
5
5
<ol class="commitgraph-list">
6
6
{{range .Graph.Rows}}
@@ -1,6 +1,6 @@1
{{define "commitgraph"}}1
{{define "commitgraph"}}2
<div class="commitgraph-slot">2
<div class="commitgraph-slot" style="--lanes: {{.Graph.Lanes}}; --graph-w: {{.Graph.PanelWidth}}px; --graph-lanes-w: {{.Graph.TextX}}px; --graph-svg-w: {{.Graph.Width}}px">3
<aside class="commitgraph" aria-label="{{t "graph.label"}}" style="--lanes: {{.Graph.Lanes}}; --graph-w: {{.Graph.PanelWidth}}px" data-selected="{{.Rev}}">3
<aside class="commitgraph" aria-label="{{t "graph.label"}}" data-selected="{{.Rev}}">4
{{.Graph.SVG}}4
{{.Graph.SVG}}5
<ol class="commitgraph-list">5
<ol class="commitgraph-list">6
{{range .Graph.Rows}}6
{{range .Graph.Rows}}